Search completed in 1.08 seconds.
6989 results for "status":
Your results are loading. Please wait...
Creating a status bar extension - Archive of obsolete content
ate increasingly intricate extensions for the firefox browser. some of the samples in this series may be similar to samples you've seen elsewhere, but the goal of this series of articles is to help compile information for new extension developers into one place to make it easy to jump in and get started. ...
...if this sounds a lot like the existing building an extension article, you're right. however, this sample will be expanded upon in later articles in the series. download the sample you can download a copy of this sample to look over -- or to use as the basis for your own extension. ...
...extension. download the sample the install manifest the install manifest, install.rdf, is a text file containing information that tells the host application important information about the extension. ...
...And 14 more matches
Creating a dynamic status bar extension - Archive of obsolete content
« previousnext » this article builds upon the article creating a status bar extension, which creates a static status bar panel in the firefox status bar, by dynamically updating its content with information fetched from the web every few minutes. specifically, this sample displays a stock quote in the status bar, and, when you mouse over it, displays a tooltip containing more detailed information about the stock. concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details. download the sample you can download a copy of this sample to look over, or to use as the basis for your own extension. ...
... a tooltip containing more detailed information about the stock. concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details. download the sample you can download a copy of this sample to look over, or to use as the basis for your own extension. or, if you've already got the code from the creating a status bar extension sample, you can follow this tutorial to update that existing code with new features. download the sample update the install manifest replace all occurrences of the first sample's id, "status-bar-sample-1", with the new sample's id, "stockwatcher", and update the front end metadata to describe our new extension. see install manifests for details. update the chrome manifest the chrome...
...if you need to brush up, visit the chrome manifest section. ...
...And 11 more matches
statustext - Archive of obsolete content
« xul reference home statustext type: string used to set the text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the text. in firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. ...
... « xul reference home statustext type: string used to set the text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the text. in firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. ...
... set the text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the text. in firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. ...
...And 9 more matches
Implementation Status - Archive of obsolete content
mozilla xforms is not actively maintained any more since about 2010! limitations and extensions the extension has some limitations and custom extension to the xforms 1.1 specification. these can be found on the mozilla xforms specials page. specification chapter index here we give an overview of xforms 1.1 specification chapters and the current status of the mozilla support. ...
... actively maintained any more since about 2010! ...
...re we give an overview of xforms 1.1 specification chapters and the current status of the mozilla support. the sections are marked with their current status: supported, partial support, in progress, and not currently supported. we have listed the most relevant bugs here, but check out the bugzilla xforms buglist for the complete list. 3. ...
...And 9 more matches
<statusbarpanel> - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] firefox 4 note the status bar has been removed. refer to the add-on bar. an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...l element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...r. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. ...
...And 6 more matches
statusbar - Archive of obsolete content
i suggest using the add-on bar instead. « xul reference home [ examples | attributes | properties | methods | related ] an element used to create a status bar, usually placed along the bottom of a window. it is virtually equivalent to a standard box, but may be rendered differently. contains statusbarpanels. ...
... i suggest using the add-on bar instead. « xul reference home [ examples | attributes | properties | methods | related ] an element used to create a status bar, usually placed along the bottom of a window. it is virtually equivalent to a standard box, but may be rendered differently. contains statusbarpanels. ...
... i suggest using the add-on bar instead. « xul reference home [ examples | attributes | properties | methods | related ] an element used to create a status bar, usually placed along the bottom of a window. it is virtually equivalent to a standard box, but may be rendered differently. contains statusbarpanels. ...
...And 5 more matches
MediaKeySession.onkeystatuseschange - Web APIs
this interface inherits from the extendableevent interface. ...
... this interface inherits from the extendableevent interface. ...
... this interface inherits from the extendableevent interface. ...
...And 4 more matches
Using the status role - Accessibility
description this technique demonstrates how to use the status role and describes the effect it has on browsers and assistive technology. the status role is a type of live region and a container whose content is advisory information for the user that is not important enough to justify an alert, and is often presented as a status bar. when the role is added to an element, the browser will send out an accessible status event to assistive technology products which can then notify the user about it. status information content must be provided within a status object, and it should be ensured that this object does not receive focus. if another part of the page controls what appears in the status, the relationship should be made explicit via the aria-controls attribute. assistive technologie...
...ts which can then notify the user about it. status information content must be provided within a status object, and it should be ensured that this object does not receive focus. if another part of the page controls what appears in the status, the relationship should be made explicit via the aria-controls attribute. assistive technologies may reserve some cells of a braille display to render the status. possible effects on user agents and assistive technology when the status role is added to an element, or such an element becomes visible, the user agent should do the following: expose the element as having a status role in the operating system's accessibility api. fire an accessible status event using the operating system's accessibility api if it supports it. assistive technology pro...
...le, the user agent should do the following: expose the element as having a status role in the operating system's accessibility api. fire an accessible status event using the operating system's accessibility api if it supports it. assistive technology products should listen for such an event and notify the user accordingly: screen readers may provide a special key to announce the current status, and this should present the contents of any status live region. these should be announced when the user is idle, unless aria-live=”assertive” has been set and in which case the user may be interrupted. screen magnifiers may enlarge the status. note: opinons may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and the...
...And 4 more matches
HTTP response status codes - HTTP
Web › HTTP › Status
you can find an updated specification in rfc 7231. if you receive a response that is not in this list, it is a non-standard response, possibly custom to the server's software. 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. ...
...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. 102 processing (webdav) this code indicates that the server has received and is processing the request, but no response is available yet. 103 early hints this status code is primarily intended to be used with the link header, letting the user agent start preloading resources while the server prepares a response. successful responses 200 ok the request has succeeded. the meaning of the success depends on the http method: get: the resource has been fetched and is transmitted in the message body. head: the entity headers are in the message body. pu...
... server handles the request, or for batch processing. 203 non-authoritative information this response code means the returned meta-information is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy. this is mostly used for mirrors or backups of another resource. except for that specific case, the "200 ok" response is preferred to this status. 204 no content there is no content to send for this request, but the headers may be useful. the user-agent may update its cached headers for this resource with the new ones. 205 reset content tells the user-agent to reset the document which sent this request. 206 partial content this response code is used when the range header is sent from the client to request only part of a resource. 20...
...And 4 more matches
FontFace.status - Web APIs
Web › API › FontFace › status
working draft initial definition. ...
... working draft initial definition. ...
... working draft initial definition. ...
...And 3 more matches
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. ...
... 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. ...
... 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. ...
...And 3 more matches
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. if the server response doesn't explicitly specify a status text, statustext will assume the default value "ok". ...
...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. if the server response doesn't explicitly specify a status text, statustext will assume the default value "ok". ...
...tus, 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. if the server response doesn't explicitly specify a status text, statustext will assume the default value "ok". ...
...And 3 more matches
Enabling the behavior - updating the status periodically - Archive of obsolete content
now that we have code to retrieve tinderbox status and update the icon, we need to run it periodically. function loadtinderboxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinderboxstatus; gxmlhttprequest.open("get", "http://tinderbox.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.send(null); window.settimeout(loadtinderboxstatus, 60000); } window.settimeout(loadtinderboxstatus, 1000); window.settimeout schedules functions to run at some future time. we use it inside the loadtinderboxstatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation. this allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slow...
...inderbox without overloading the tinderbox server or slowing down mozilla with requests. our code is now ready to run, but mozilla doesn't know about it yet. to enable its functionality, we have to add a reference to our javascript code into navigator.xul, just as we put a reference to our css code into that file back in specifying the appearance. put the javascript code into a file called tinderstatus.js in the same directory as navigator.xul and reference it in navigator.xul where other javascript scripts are referenced: ... <!-- navigator --> <script type="application/javascript" src="chrome://navigator/content/browser.js"/> <script type="application/javascript" src="chrome://navigator/content/navigator.js"/> <script type="application/javascript" src="chrome://navigator/c...
...to confirm this state, go to tinderbox and verify that the panel displays the current worst state of active tinderbox clients. « previousnext » ...
...type="application/javascript" src="chrome://navigator/content/navigatordd.js"/> <script type="application/javascript" src="chrome://navigator/content/sessionhistoryui.js"/> <script type="application/javascript" src="chrome://navigator/content/tinderstatus.js"/> <!-- hook for stringbundle overlays --> ... with this code in place, restarting mozilla should cause the tinderbox status panel to display the current tinderbox state. to confirm this state, go to tinderbox and verify that the panel displays the current worst state of active tinderbox clients. « previousnext » ...
Activity Monitor, Battery Status Menu and top
note: the power profiling overview is worth reading at this point if you haven't already. it may make parts of this document easier to understand. activity monitor this is a built-in os x tool that shows real-time process measurements. it is well-known and its "energy impact" measure is likely to be consulted by users to compare the power consumption of different programs. (apple support documentation specifically recommends it for troubleshooting battery life problems.) unfortunately "energy impact" is not a good measure for either users or software developers and it should be avoided. ...
...and periodically measures, among other things, cpu usage and idle wakeups for each running process. tests indicate that it is almost certainly using the same "energy impact" formula to compute the "average energy impact", using measurements from the past 8 hours of wake time (i.e. if a laptop is closed for several hours and then reopened, those hours are not included in the calculation.) battery status menu when you click on the battery icon in the os x menu bar you get a drop-down menu that includes a list of “apps using significant energy”. this is crude but prominent, and therefore worth understanding — even though it's not much use for profiling applications. when you open this menu for the first time in a while it says “collecting power usage information” for a few seconds, a...
...plication name in the menu activity monitor will be opened and that application’s entry will be highlighted. based on these facts it seems reasonable to assume that “energy impact” is again being used to determine which applications are "using significant energy". testing shows that once an energy-intensive application is started it takes less than a minute for it to show up in the battery status menu. and once the application stops using high amounts of energy it takes a few minutes to disappear. the exception is when the application is closed, in which case it disappears immediately. and it appears that a program with an “energy impact” of roughly 20 or more will eventually show up as significant, and programs that have much higher “energy impact” values tend to show up more qui...
...ion stops using high amounts of energy it takes a few minutes to disappear. the exception is when the application is closed, in which case it disappears immediately. and it appears that a program with an “energy impact” of roughly 20 or more will eventually show up as significant, and programs that have much higher “energy impact” values tend to show up more quickly. all of these battery status menu observations are difficult to make reliably and so should be treated with caution. it is clear, however, that the window used by the battery status menu is measured in seconds or minutes, which is much less than the 8 hour window used for “average energy impact” in activity monitor. top top is similar to activity monitor, but is a command-line utility. to see power-related measurements...
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a message on the status line, get agent information, and check on the current version of the plug-in api and the browser. displaying a status line message users are accustomed to checking the ui status line at the bottom of the browser window for updates on the progress of an operation or the url of a link on the page. you can also use the status line to notify the user of plug-in-related information. the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the browser shows. in fact, your plug-in interface should be consistent with the rest of the browser in this way. to accomplish t...
...use the status line to notify the user of plug-in-related information. the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the browser shows. in fact, your plug-in interface should be consistent with the rest of the browser in this way. to accomplish this, the plug-in calls the npn_status method to display your message on the status line. void npn_status(npp instance, const char *message); the instance parameter is the current plug-in instance, that is, the one that the status message belongs to. in the message parameter, pass the string you want to display on the status line. ...
...you should use a different method to display messages that the user needs to see, such as error messages. ...
...you should use a different method to display messages that the user needs to see, such as error messages. getting agent information a plug-in can check which browser is running on the user's current system. ...
Battery Status API - Web APIs
the battery status api, more often referred to as the battery api, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change. this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss. the battery status api extends window.navigator with a navigator.getbattery() method returning a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status. ...
...this is done by listening for the chargingchange, levelchange, chargingtimechange, dischargingtimechange events. ...
... ...
... ...
msGraphicsTrustStatus - Web APIs
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. msgraphicstruststatus is a read-only property which returns an object containing information on protected video playback. ...
...t on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. msgraphicstruststatus is a read-only property which returns an object containing information on protected video playback. this proprietary property is specific to internet explorer and microsoft edge. ...
...e web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. msgraphicstruststatus is a read-only property which returns an object containing information on protected video playback. this proprietary property is specific to internet explorer and microsoft edge. ...
... msgraphicstruststatus is a read-only property which returns an object containing information on protected video playback. this proprietary property is specific to internet explorer and microsoft edge. syntax status = object.msgraphicstruststatus; example //specifies the output device id that the audio will be sent to. ...
XRPermissionStatus - Web APIs
granted an array of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called. ...
... granted an array of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called. ...
... granted an array of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called. any feature which was specified in either the optionalfeatures or requiredfeatures when calling navigator.permissions.query() are listed in granted if and only if permission to use them is granted. ...
...ray of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called. any feature which was specified in either the optionalfeatures or requiredfeatures when calling navigator.permissions.query() are listed in granted if and only if permission to use them is granted. methods no methods are defined by xrpermissionstatus. usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus' in that specification. working draft initial definition. ...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
our mozilla extension now exists, but it doesn't do anything. to make it work we have to add javascript code that changes its status when the tinderbox status changes. the first step is to write a function that queries the tinderbox server and retrieves the current status. var gxmlhttprequest; function loadtinderboxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinderboxstatus; gxmlhttprequest.open("get", "http://tinderbox.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.send(null); } xmlhttprequest is an interface in mozilla for retrieving documents via http. although it is designed to retrieve xml content and parse it into a dom, it can retrieve (but not parse) other kinds of content as well. in this case we use it to retrieve an html p...
...ge containing a brief summary of the current tinderbox state. that document gets updated by the tinderbox server every time a build finishes. it displays a list of active tinderbox clients along with the result of their last build attempt. xmlhttprequest is easy to use in the simple case we have here. we use new to create a new instance of it, set the instance's onload property to updatetinderboxstatus(), the function we want to execute when the document finishes loading, call its open method with the type of http request we want to make and the url of the document to retrieve, and then call its send method to send the request. xmlhttprequest will retrieve the document located at the given url and call the updatetinderboxstatus() function when it is done. notice that we defined the instance o...
... type of http request we want to make and the url of the document to retrieve, and then call its send method to send the request. xmlhttprequest will retrieve the document located at the given url and call the updatetinderboxstatus() function when it is done. notice that we defined the instance of xmlhttprequest as a global variable. this is because we need to reference it in the updatetinderboxstatus() function as well as the current function, and we can't pass the object from one function to the other because the one doesn't call the other directly. « previousnext » ...
getSessionStatusAt - Archive of obsolete content
...
... ...
... ...
statusbarpanel-menu-iconic - Archive of obsolete content
the image will appear instead of the label. ...
...the image will appear instead of the label. ...
...the image will appear instead of the label. ...
Xptcall Porting Status
what is this? ...
... what is this? ...
...t is this? ...
MediaKeyStatusMap - Web APIs
the mediakeystatusmap interface of the encryptedmediaextensions api is a read-only map of media key statuses by key ids. properties mediakeystatusmap.size read only returns the number of key/value pars in the status map. methods mediakeystatusmap.entries() read only returns a new iterator object containing an array of [key, value] for each element in the status map, in insertion order. mediakeystatusmap.foreach(callback[, argument]) read only calls callback once for each key-value pair in the status map, in insertion order. if argument is present it will be passed to the callback. mediakeystatusmap.get() read only returns the value associated with the given key, or undefined if there is none. ...
...of [key, value] for each element in the status map, in insertion order. mediakeystatusmap.foreach(callback[, argument]) read only calls callback once for each key-value pair in the status map, in insertion order. if argument is present it will be passed to the callback. mediakeystatusmap.get() read only returns the value associated with the given key, or undefined if there is none. mediakeystatusmap.has() read only returns a boolean asserting whether a value has been associated with the given key. mediakeystatusmap.keys() read only returns a new iterator object containing keys for each element in the status map, in insertion order. mediakeystatusmap.values() read only returns a new iterator object containing values for each element in the status map, in insertion order. mediakeys...
...eys() read only returns a new iterator object containing keys for each element in the status map, in insertion order. mediakeystatusmap.values() read only returns a new iterator object containing values for each element in the status map, in insertion order. mediakeystatusmap.[@@iterator]() read only returns a new iterator object containing an array of [key, value] for each element in the status map, in insertion order. specifications specification status comment encrypted media extensionsthe definition of 'mediakeystatusmap' in that specification. recommendation initial definition. ...
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
the webglrenderingcontext.checkframebufferstatus() method of the webgl api returns the completeness status of the webglframebuffer object. syntax glenum gl.checkframebufferstatus(target); parameters target a glenum specifying the binding point (target). possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image. when using a webgl 2 context, the following values are available additionally: gl.draw_framebuffer: equivalent to gl.framebuffer. used as a destination for drawing, rendering, clearing, and writing operations. gl.read_framebuffer: used as a source for reading operations. return value a glenum indicating the completeness status of the framebuffer or 0 if an error occurs. possib...
... ext.framebuffer_incomplete_view_targets_ovr: if baseviewindex is not the same for all framebuffer attachment points where the value of framebuffer_attachment_object_type is not none, the framebuffer is considered incomplete. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); // ... gl.checkframebufferstatus(gl.framebuffer); specifications specification status comment webgl 1.0the definition of 'checkframebufferstatus' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glcheckframebufferstatus' in that specification. standard man page of the opengl api. webgl 2.0the definition of 'checkframebuffe...
...gl.framebuffer); specifications specification status comment webgl 1.0the definition of 'checkframebufferstatus' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glcheckframebufferstatus' in that specification. standard man page of the opengl api. webgl 2.0the definition of 'checkframebufferstatus' in that specification. editor's draft updated definition for webgl 2. opengl es 3.0the definition of 'glcheckframebufferstatus' in that specification. standard man page of the (similar) opengl es 3 api. ...
Window.statusbar - Web APIs
Web › API › Window › statusbar
the window.statusbar property returns the statusbar object, whose visibility can be toggled in the window. syntax objref = window.statusbar example the following complete html example shows a way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window. ...
...of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.statusbar.visible=!window.statusbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. also be aware that dynamically updating the visibilty of the va...
..., the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page. specifications specification status comment html living standardthe definition of 'window.statusbar' in that specification. living standard html5the definition of 'window.statusbar' in that specification. recommendation ...
XRPermissionStatus.granted - Web APIs
currently, all of these strings come from the xrreferencespacetype enumerated type. the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them. ...
...currently, all of these strings come from the xrreferencespacetype enumerated type. the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them. ...
... instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus.granted' in that specification. working draft initial definition. ...
Enabling the behavior - updating the status bar panel - Archive of obsolete content
in order for loadtinderboxstatus() to have any effect we need to define a matching updatetinderboxstatus() function. 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. the color red...
...erty of the xmlhttprequest instance) for one of several color references. the color red (represented by the rgb code ee0000) means a tinderbox client failed to build mozilla. the color orange ("ffaaoo") means a client successfully built mozilla, but the build failed tests. the color green ("11dd11") means the client successfully built and tested mozilla. when it finds a color, it sets the panel's status attribute to the corresponding status, which causes the previously defined css rules to switch to the icon appropriate for that status. because our conditional looks for worse states (bustage, test failures) first, it will display those states before displaying the success state. « previousnext » ...
statusBar - Archive of obsolete content
the class statusbar contains functions to add and control the statusbar of the browser. you can find the complete sourcecode in the status-bar-panel.js file in your jetpack repository. namespace: jetpack.statusbar methods copybackground embediframe append the append methods adds a new item to the statusbar. many of the options are optional. syntax jetpack.statusbar.append(options); possible options are: url width (string/length) the width of the panel-item html (string) the html code which will be used inside the item onload (event) this event fires when the item was appended. its acutally not implemented in the current version. onready (event) occurs when the item was loaded onunload (event) triggers when the item was removed. ...
...atusbar.append(options); possible options are: url width (string/length) the width of the panel-item html (string) the html code which will be used inside the item onload (event) this event fires when the item was appended. its acutally not implemented in the current version. onready (event) occurs when the item was loaded onunload (event) triggers when the item was removed. example jetpack.statusbar.append({ html: 'hello <i>world</i>!', onready: function(widget){ $(widget).click(function(){ jetpack.tabs.open("http://www.jogkey.de"); }); } }); ...
statusText - Archive of obsolete content
...
... ...
statusbarpanel-iconic - Archive of obsolete content
specify the image using the src attribute. the image will appear instead of the label. ...
...specify the image using the src attribute. the image will appear instead of the label. ...
NPN_Status - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets a plug-in display a message on the browser's status line. syntax #include <npapi.h> void npn_status(npp instance, const char* message); parameters the function has the following parameters: instance pointer to the current plug-in instance. message pointer the buffer that contains the status message string to display. description you can use this function to make your plug-in display status information in the browser window, in the same place the browser does. ...
...rameters: instance pointer to the current plug-in instance. message pointer the buffer that contains the status message string to display. description you can use this function to make your plug-in display status information in the browser window, in the same place the browser does. if your plug-in has a button or other object that acts as a link when clicked, you can call npn_status() to display a description or url when the user moves the cursor over it. the browser always displays the last status line message it receives, regardless of the message source. your message is always displayed, but you have no control over how long it stays in the status line before another message replaces it. see also npn_useragent() npp ...
PRStatus
type for status code returned by some functions. ...
... type for status code returned by some functions. ...
PR_GetConnectStatus
returns the function returns one of these values: if successful, pr_success. if unsuccessful, pr_failure. the reason for the failure can be retrieved via pr_geterror. if pr_geterror returns pr_in_progress_error, the nonblocking connection is still in progress and has not completed yet.other errors indicate that the connection has failed. ...
... ...
FC_GetFunctionStatus
name fc_getfunctionstatus - get the status of a function running in parallel syntax ck_rv fc_getfunctionstatus( ck_session_handle hsession ); parameters hsession [in] session handle. description fc_getfunctionstatus is a legacy function that simply returns ckr_function_not_parallel. return value fc_getfunctionstatus always returns ckr_function_not_parallel. ...
...nctionstatus - get the status of a function running in parallel syntax ck_rv fc_getfunctionstatus( ck_session_handle hsession ); parameters hsession [in] session handle. description fc_getfunctionstatus is a legacy function that simply returns ckr_function_not_parallel. return value fc_getfunctionstatus always returns ckr_function_not_parallel. ...
MediaKeyStatusMap.entries() - Web APIs
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
PermissionStatus - Web APIs
the permissionstatus interface of the permissions api provides the state of an object and an event handler for monitoring changes to said state. 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'. later versions of the specification replace this with permissionstatus.state. event handler permissionstatus.onchange an event called whenever permissionstatus.status changes. ...
...prompt'. permissionstatus.statusread only returns the state of a requested permission; one of 'granted', 'denied', or 'prompt'. later versions of the specification replace this with permissionstatus.state. event handler permissionstatus.onchange an event called whenever permissionstatus.status changes. example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission status is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'permissionstatus' in that specification. working draft initial definition. ...
Response.status - Web APIs
Web › API › Response › status
the status read-only property of the response interface contains the status code of the response (e.g., 200 for a success). syntax var mystatus = response.status; value a number (to be precise, an unsigned short). 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>. note that at the top of the fetch() block we log the response status value to the console. var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.stat...
...og the response status value to the console. var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.status); // returns 200 response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'status' in that specification. living standard initial definition ...
Response.statusText - Web APIs
the statustext read-only property of the response interface contains the status message corresponding to the status code (e.g., ok for 200). syntax var mystatustext = response.statustext; value a bytestring. the default value is "". 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>. note that at the top of the fetch() block we log the response statustext value to the console. var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { c...
...etch(), 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>. note that at the top of the fetch() block we log the response statustext value to the console. 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. living standard initial definition ...
statusbar - Archive of obsolete content
« xul reference home statusbar type: id if you set this attribute to the id of a statusbar element, the label on the statusbar will update to the statustext of the items on the menu as the user moves the mouse over them. ...
statusbar - Archive of obsolete content
« xul reference statusbar type: id of statusbar element gets and sets the value of the statusbar attribute. ...
statusbarpanel-iconic-text - Archive of obsolete content
specify the image using the src attribute. specify the text using the label attribute. the image will appear before the label. ...
Mozilla MathML Status
sections related to semantics/content mathml or irrelevant features are left blank or not listed at all. if only the main features of an element are implemented then its section is marked as supported but details of unsupported attributes are specified below. the top-level math element see § 2.2. attribute notes display implemented. maxwidth, overflow not implemented. see bug 534962. ...
mozIVisitStatusCallback
toolkit/components/places/moziasynchistory.idlscriptable this interface provides callback handling functionality for moziasynchistory.isurivisited 1.0 66 introduced gecko 11.0 inherits from: nsisupports last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) method overview void isvisited(in nsiuri auri, in boolean avisitedstatus); methods isvisited() called when the moziasynchistory.isurivisited() method's check to determine whether a given uri has been visited has completed. implement this method to determine the results of the request. void isvisited( in nsiuri auri, in boolean avisitedstatus ); parameters auri the uri that was checked to see if it's been visited. avisitedstatus true if the specified u...
nsMsgJunkStatus
defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl typedef unsigned long nsmsgjunkstatus; typedef unsigned long nsmsgjunkscore; ...
keyStatuses - Web APIs
the mediakeysession.keystatuses read-only property returns a reference to a read-only mediakeystatusmap of the current session's keys and their statuses. syntax var mediakeystatusmapobj = mediakeysessionobj.keystatuses; specifications specification status comment encrypted media extensionsthe definition of 'keystatuses' in that specification. recommendation initial definition ...
MediaKeyStatusMap.forEach() - Web APIs
the foreach property of the mediakeystatusmap interface calls callback once for each key-value pair in the status map, in insertion order. if an argument is present it will be passed to the callback. syntax mediakeystatusmap.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue the current element being processed in the array. index the index of the current element being processed in the array. array which array foreach() is being applied to. thisarg optional value used as this when executing callback. returns undefined. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the com...
MediaKeyStatusMap.size - Web APIs
recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
PermissionStatus.onchange - Web APIs
the onchange event handler of the permissionstatus interface is called whenever the permissionstatus.state property changes. syntax permissionstatus.onchange = function() { ... } permissionstatus.addeventlistener('change', function() { ... }) example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission state has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'onchange' in that specification. working draft initial definition. ...
PermissionStatus.state - Web APIs
the state read-only property of the permissionstatus interface returns the state of a requested permission. this property returns one of 'granted', 'denied', or 'prompt'. syntax var permission = permissionstatus.state; example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'state' in that specification. working draft initial definition. ...
SecurityPolicyViolationEvent.statusCode - Web APIs
the statuscode read-only property of the securitypolicyviolationevent interface is a number representing the http status code of the document or worker in which the violation occurred. syntax let status = violationeventinstance.statuscode; value a number representing the status code of the document or worker in which the violation occurred. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.statuscode); }); specifications specification status comment content security policy level 3the definition of 'statuscode' in that specification. working draft initial definition ...
WebGLContextEvent.statusMessage - Web APIs
the read-only webglcontextevent.statusmessage property contains additional event status information, or is an empty string if no additional information is available. examples the statusmessage property can contain a platform dependent string with details of an event. this can occur, for example, if the webglcontextcreationerror event is fired. var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log('webgl context creation failed:' + e.statusmessage || 'unknown error'); }, false); specifications specification status comment webgl 1.0the definition of 'webglcontextevent.statusmessage' in that specification. recommendation initial definiti...
Window.defaultStatus - Web APIs
obsolete since gecko 23 (firefox 23 / thunderbird 23 / seamonkey 2.20)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. summary gets/sets the status bar text for the given window. syntax var smsg = window.defaultstatus; window.defaultstatus = smsg; parameters smsg is a string containing the text to be displayed by default in the statusbar. example <html> <body onload="window.defaultstatus='hello!';"/> <button onclick="window.confirm('are you sure you want to quit?');">confirm</button> </body> </html> notes to set the status once the window has been opened, use window.status. specification html5 ...
Window.status - Web APIs
Web › API › Window › status
the status property of the window interface was originally intended to set the text in the status bar at the bottom of the browser window. however, the html standard now requires setting window.status to have no effect on the text displayed in the status bar. syntax window.status = string; var value = window.status; specifications specification status comment html living standardthe definition of 'window.status' in that specification. living standard ...
HTTP Index - HTTP
Web › HTTP › Index
er, needscompattable, needscontent, needsexample, reference the alt-svc header is used to list alternate ways to reach this website. 66 authorization http, http header, reference, request header, header the http authorization request header contains the credentials to authenticate a user agent with a server, usually after the server has responded with a 401 unauthorized status and the www-authenticate header. 67 cache-control cache-control, general header, http, http header, reference the cache-control general-header field is used to specify directives for caching mechanisms in both requests and responses. caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the...
...not changed. additionally, etags help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). 118 early-data client hints, http, header, request the early-data header is set by an intermediate to indicates that the request has been conveyed in tls early data, and additionally indicates that an 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). 119 expect http, http header, reference, request header the expect http request header indicates expectations that need to be fulfilled by the server in order to properly handle the request. 120 expect-ct http, reference, header the expect-ct header allows sites to...
... back the requested resource only if it matches one of the listed etags. for put and other non-safe methods, it will only upload the resource in this case. 157 if-modified-since conditional requests, http, http header, reference, request header 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. unlike if-unmodified-since, if-modified-since can only be used with a get or head. 158 if-none-match conditional requests, http, http head...
...And 61 more matches
Index - Web APIs
Web › API › Index
tionary contains the expiry month of the card used to make the payment. 262 basiccardresponse.expiryyear api, basic card payment, basiccardresponse, experimental, payment request, payment request api, property, reference, expiryyear the expiryyear property of the basiccardresponse dictionary contains the expiry year of the card used to make the payment. 263 battery status api api, apps, battery, battery api, battery status api, guide, mobile, obsolete, overview the battery status api, more often referred to as the battery api, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change. this can be used to adjust your app's resource usage to reduce battery ...
...y property is the secondary target, depending on the type of event: 1393 fontface api, css font loading api, fontface, fonts, interface, reference the fontface interface represents a single usable font face. it allows control of the source of the font face, being a url to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status. 1394 fontface.fontface() api, css font loading api, constructor, fontface, fonts, reference the fontface() constructor creates a new fontface object. 1395 fontface.display api, css font loading api, fontface, fonts, property, reference, display the display property of the fontface interface determines how a font face is displayed based on whether and whe...
... to the font-feature-settings descriptor. 1397 fontface.load api, css font loading api, fontface, fonts, method, reference, load the load() method of the fontface interface loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object. 1398 fontface.status api, css font loading api, fontface, fonts, property, reference, status the status read-only property of the fontface interface returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error". 1399 fontface.stretch api, css font loading api, fontface, fonts, property, reference, stretch the stretch property of the fo...
...And 50 more matches
sslfnc.html
db_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration files and performs other tasks required to run network security services. database files are opened read-only. syntax #include "nss.h" secstatus nss_init(char *configdir); parameter this function has the following parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside. returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_geterror t...
...a time. this may be helpful if you have an export license that permits more or fewer capabilities than those allowed by the other export policy functions. nss_initreadwrite sets up configuration files and performs other tasks required to run network security services. unlike nss_init, nss_initreadwrite provides both read and write access to database files. syntax #include "nss.h" secstatus nss_initreadwrite(char *configdir); parameter this function has the following parameter: configdir a pointer to a string containing the pathname of the directory where the certificate, key, and security module databases reside. returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_g...
...hic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions. nss_nodb_init performs tasks required to run network security services without setting up configuration files. important: this nss function is not intended for use with ssl, which requires that the certificate and key database files be opened. syntax #include "nss.h" secstatus nss_nodb_init(char *reserved); parameter this function has the following parameter: reserved should be null.. returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. use pr_geterror to retrieve the error code. description nss_nodb_init opens only the temporary database and the interna...
...And 39 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft. version 2 contains a lot of changes regarding the last stable version svg 1.1. those changes are listed below including their support status within mozilla applications. ...
... svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft. version 2 contains a lot of changes regarding the last stable version svg 1.1. those changes are listed below including their support status within mozilla applications. ...
...g 1.2 draft. version 2 contains a lot of changes regarding the last stable version svg 1.1. those changes are listed below including their support status within mozilla applications. ...
...And 36 more matches
Index - Archive of obsolete content
ebextensions, export exports bookmarks to an html bookmark file. 311 bookmarks.import() api, add-ons, bookmarks, extensions, method, non-standard, reference, webextensions, import imports bookmarks from an html bookmark file. 312 adding preferences to an extension add-ons, extensions, preferences system, xul this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to watch. it also adds a preference dialog that lets you switch to a stock other than one of the ones included in the popup menu. 313 an interview with douglas bowman of wired news web development, web standards one of the web's oldest news sites, wired news draws ...
...85 creating a mozilla extension add-ons, extensions a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection). ...
...sion add-ons, extensions a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection). this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). the extension will access tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. 386 adding the structure add-ons, extensions the ui for our extension is an icon in the status bar. to implement this ui, we'll ad...
...And 24 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
dir, headerfilename, encryptedfilename); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-d -d <dbdirpath> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable ...
...n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycontext *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fp...
...; goto cleanup; } } rv = vfy_end(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (vfy) { vfy_destroycontext(vfy, pr_true); } return rv; } /* * write cryptographic parameters to header file */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; const char *header; const char *trailer; switch (type) { case symkey: header = enckey_header; trailer = enckey_trailer; break; case mackey: header = mackey_header; trailer = mackey_tra...
...And 24 more matches
Encrypt Decrypt_MAC_Using Token
takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id. */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key. */ pk11symkey * gener...
...v != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key. */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key. */ key = pk11_tokenkeygen(slot, mechanism...
...henticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key. ...
...And 24 more matches
Enc Dec MAC Output Public Key as CSR
stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; secitem *data = (secitem *)port_zalloc(sizeof(secitem)); if (!data) { pr_fprintf(pr_stderr, "error while allocating memory\n"); rv = secfailure; goto cleanup; } data->len = seckey_publickeystrength(pubkey); data->data = (unsigned char*)port_zalloc((data->len)*s...
...if (rv != secsuccess) { rv = secfailure; } else { *wrappedkey = data; return secsuccess; } cleanup: if (data) { secitem_freeitem(data, pr_true); } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsucc...
...ll, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11context *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secst...
...And 22 more matches
sample2
-d %s -b %s -e %s -o : output file name is not found\n", progname, dbdir, headerfilename, encryptedfilename); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-d -d <dbdirpath> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfailure; goto cleanup; } /*...
...> 0) { rv = sgn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycontext *vfy = null; prfiledesc *infile = null; /* open the input file for reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for reading.\n", infilename); rv = secfa...
...) { rv = vfy_update(vfy, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_update\n"); goto cleanup; } } rv = vfy_end(vfy); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while vfy_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (vfy) { vfy_destroycontext(vfy, pr_true); } return rv; } /* * write cryptographic parameters to header file */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; const char *header; const char *trailer; switch (type) { case symkey: header = enckey_header; trailer = enckey_trailer; break; case mackey: header = mackey_header; trailer = mackey_trailer; break; case iv: header = iv_header; trailer = iv_trailer; break; case mac: header = mac_header; traile...
...And 22 more matches
Install script template - Archive of obsolete content
he secondary install } function writeplidsolution() { //concatenate the secondary install path with the filename to make a fully qualified pathname var qualifiedsecondaryfolderdll = secondaryfolder + plugin_file; var qualifiedsecondaryfolderxpt = secondaryfolder + component_file; // write plid keys (mozilla.org/projects/plugins/first-install-problem.html) // write plid keys to hklm var hklm_status = registerplid(hkey_local_machine, reg_moz_path, plid, qualifiedsecondaryfolderdll, qualifiedsecondaryfolderxpt, plugin_description, company_name, software_name, version, mimetype, suffix, suffix_description); logcomment("moz first install installation: registerplid("+hkey_local_machine+") returned, status "+hklm_status); if (hklm_status == fal...
...aryfolderxpt, plugin_description, company_name, software_name, version, mimetype, suffix, suffix_description); logcomment("moz first install installation: registerplid("+hkey_local_machine+") returned, status "+hklm_status); if (hklm_status == false) { // write plid keys (mozilla.org/projects/plugins/first-install-problem.html) // write plid keys to hkcu var hkcu_status = registerplid(hkey_current_user, reg_moz_path, plid, qualifiedsecondaryfolderdll, qualifiedsecondaryfolderxpt, plugin_description, company_name, software_name, version, mimetype, suffix, suffix_description); logcomment("first install installation: registerplid("+hkey_current_user+") returned, status "+hklm_status); if (hkcu_status != 0) {...
... qualifiedsecondaryfolderdll, qualifiedsecondaryfolderxpt, plugin_description, company_name, software_name, version, mimetype, suffix, suffix_description); logcomment("first install installation: registerplid("+hkey_current_user+") returned, status "+hklm_status); if (hkcu_status != 0) { logcomment("could not write to the registry. errorcode="+hkcu_status); return hkcu_status; } } return 0; } /** * function for preinstallation of plugin (firstinstall). * you should not stop the install process because the function failed, * you still have a chance to install the plugin for the already * installed gecko browsers. * * @param dirpath directory path from getfolder * @param spacerequired required space in kilobytes * **/...
...And 20 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
/* this source code form is subject to the terms of the mozilla public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
...illa public * license, v. 2.0. if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/. ...
...rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism,...
...And 19 more matches
Encrypt Decrypt MAC Keys As Session Objects
t takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * genera...
...rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism,...
...thenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr...
...And 18 more matches
Encrypt and decrypt MAC using token
t takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * genera...
...rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism,...
...thenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr...
...And 18 more matches
EncDecMAC using token object - sample 3
fy 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", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_t...
...adrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation ...
...{ rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : digestop()\...
...And 18 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
way data binding. now we will see how components can also expose methods and variables. the following new components will be developed throughout the course of this article: moreactions: displays the check all and remove completed buttons, and emits the corresponding events required to handle their functionality. newtodo: displays the <input> field and add button for adding a new todo. todosstatus: displays the "x out of y items completed" status heading. code along with us git clone the github repo (if you haven't already done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/05-advanced-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concept...
...ctions. actions are also very useful for seamlessly integrating with third party libraries. component binding: exposing component methods and variables using the bind:this={component} directive there's still one accessibility annoyance left. when the user presses the delete button, the focus vanishes. so, the last feature we will be looking at in this article involves setting the focus on the status heading after a todo has been deleted. why the status heading? in this case, the element that had the focus has been deleted, so there's not a clear candidate to receive focus. we've picked the status heading because it's near the list of todos, and it's a way to give a visual feedback about the removal of the task, as well as indicating what's happened to screenreader users. first we'll extrac...
...ng after a todo has been deleted. why the status heading? in this case, the element that had the focus has been deleted, so there's not a clear candidate to receive focus. we've picked the status heading because it's near the list of todos, and it's a way to give a visual feedback about the removal of the task, as well as indicating what's happened to screenreader users. first we'll extract the status heading to its own component. create a new file — components/todosstatus.svelte. add the following contents to it: <script> export let todos $: totaltodos = todos.length $: completedtodos = todos.filter(todo => todo.completed).length </script> <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> import the file at the beginning of todos.sv...
...And 15 more matches
Adding the structure - Archive of obsolete content
« previousnext » the ui for our extension is an icon in the status bar. to implement this ui, we'll add a statusbarpanel element to the statusbar element in the navigator.xul file. ...
... « previousnext » the ui for our extension is an icon in the status bar. to implement this ui, we'll add a statusbarpanel element to the statusbar element in the navigator.xul file. ...
... « previousnext » the ui for our extension is an icon in the status bar. to implement this ui, we'll add a statusbarpanel element to the statusbar element in the navigator.xul file. ...
...And 13 more matches
Making it into a static overlay - Archive of obsolete content
the two ways of doing that are to integrate it into the mozilla codebase (in which case it is no longer an extension but rather part of the default mozilla distribution) and to package it into an installer that users can run from within mozilla to add the extension to their mozilla installation. most extensions are distributed as installer packages, and that's how we'll distribute our extension. integrating extensions into the mozilla codebase is beyond the scope of this tutorial, but for more information see mozilla.org's hacking documentation. ...
...d extensability. dynamic overlays also make it possible to modify a xul file without actually changing the code of the file itself, which is necessary when installing an extension like ours. we'll first make the file into a static overlay, then we'll make it into a dynamic overlay. ...
...self, which is necessary when installing an extension like ours. we'll first make the file into a static overlay, then we'll make it into a dynamic overlay. ...
...And 12 more matches
Index
ady have two layers, the basic nspr layer and an ssl library layer. the mozilla applications define a third layer where application specific processing is performed. you can find more details in the nspr reference documents. nss occassionally has to create outbound network connections, in addition to the connections requested by the application. examples are retrieving ocsp (online certificate status protocol) information or downloading a crl (certificate revocation list). however, nss doesn't have an implementation to work with network proxies. if you must support proxies in your application, you are able to register your own implementation of an http request callback interface, and nss can use your application code that supports proxies. when using hashing, encryption, and decryption fun...
...formed, there must be a set of security databases available. modutil can be used to create these files. the only required argument is the database that where the databases will be located. modutil -create -dbdir [sql:]directory adding a cryptographic module adding a pkcs #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms. this can be done by supplying all of the information through modutil directly or by running a jar file and install script. for the most basic case, simply upload the library: modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] for example: modutil -dbdir sql:/home/my/sharednssdb -add "example pk...
...on about the pkcs #11 modules that are available to an application or server to use. the list of all modules, information about specific modules, and database configuration specs for modules can all be viewed. to simply get a list of modules in the database, use the -list command. ...
...And 12 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
d shape to create a xpi package that installs our extension as a dynamic overlay. xpis have a complex structure designed to separate ui layers from each other. to make our xpi we'll start out by creating a directory to hold the files we're going to add to the xpi. then we'll modify urls in our files so they point to the right place. ...
...out by creating a directory to hold the files we're going to add to the xpi. then we'll modify urls in our files so they point to the right place. after that we'll create a contents.rdf file describing the tinderstatus component for the chrome registry and an install.js script to perform the installation. finally we'll zip the files into an archive. start out by creating a directory called tinderstatus-installer. create a tinderstatus subdirectory in it and a content sub-subdirectory in that subdirectory. copy the following files into the content sub-subdirectory: tinderstatusoverlay.xul tinderstatus.js tinderstatus.css tb-busted.png tb-nostatus.png tb-success.png tb-testfailed.png these are the files we're going to put into the xpi. we need to change some urls in the copy of tinders...
...erstatusoverlay.xul tinderstatus.js tinderstatus.css tb-busted.png tb-nostatus.png tb-success.png tb-testfailed.png these are the files we're going to put into the xpi. ...
...And 11 more matches
Building the WebLock UI
ock component that's meant to be added to the existing mozilla browser[other-mozlike-browsers]. it uses xul, which is an xml language that gecko knows how to render as user interface, but it also interacts with particular parts of the mozilla user interface, where it must install itself as an extension to the ui. specifically, the user interface we create in this chapter will be overlaid into the statusbar of the browser component, where it will provide a small icon the user can click to access the web lock interface. weblock indicator in browser user interface package list the user interface described in this section is comprised of four files: weblockoverlay.xul is the file that defines the little status icon in the browser. weblock.xul defines the web lock manager dialog. weblock.cs...
... var tf = document.getelementbyid("dialog.input"); // weblock is global and declared above weblock.addsite(tf.value); } this javascript function can be called directly from the xul widget, where the input string is retrieved as the value property of the textbox element. you also need to create the function that displays the weblock window itself when the user clicks the weblock icon in the statusbar. that function uses the opendialog method from the window object and takes the url to the xul file in which the dialog is defined: function loadweblock() { window.opendialog("chrome://weblock/weblock.xul"); } xul the entire user interface of the mozilla browser and all of the applications that go with it, including the mail client, the irc client, and others, have been defined in an xml ...
...mponent, and the mozilla overlay mechanism is the way to do this. overlays are xul files that register themselves to be dynamically inserted into the appropriate parts of the browser ui at runtime. weblockoverlay.xul the xul that defines the new icon is small: it's a little icon that calls a javascript function to load the weblock.xul file we defined previously. the icon is actually a separate <statusbarpanel/> element that gets overlaid into the main browser, along with some javascript and some css to control the behavior and appearance of the element, respectively. here is that xul file in its entirety: the weblock overlay <?xml version="1.0"?> <?xml-stylesheet href="chrome://navigator/content/weblock.css" type="text/css"?> <overlay id="weblockoverlay" xmlns="http://www.mozilla.o...
...And 11 more matches
Index
Mozilla › Tech › XPCOM › Index
any, and (unless you tell it you already have) addrefs the new. 82 reference manual xpcom this section will help you if you're already familiar with nscomptr but you need details. if you've never use nscomptrs before, you might want to read the getting started guide first. if you're trying to fix a broken build, the faq might lead you to the answer more quickly. 83 status, recent changes, and plans xpcom no summary! 84 using nsiclassinfo xpcom if you use a c++ class which implements nsiclassinfo from javascript, then you don't have to explicitly call queryinterface on the javascript object to access the object's interfaces. 85 using nsidirectoryservice extensions, guide, xpcom nsdirectoryservice implements the ns...
...ns_shutdownxpcom functions, functions:frozen, xpcom, xpcom api reference the ns_shutdownxpcom function terminates use of xpcom in the calling process. 139 nsresult errors, mozilla, reference, référence(2), xpcom, xpcom api reference the nsresult data type is a strongly-typed enum used to represent a value returned by an xpcom function; these are typically error or status codes. for a list of defined result values, see error codes returned by mozilla apis. 140 folders thunderbird the folder classes all implement the nsimsgfolder interface. there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder. they all inherit from nsmsgdbfolder, which implements a lot of the core functionality. rss feeds are implemen...
...om, xpcom interface reference determine whether the given channel and its content window hierarchy is third party. this is done as follows: 225 mozivisitinfo no summary! 226 mozivisitinfocallback interfaces, interfaces:scriptable, places, reference, xpcom interface reference called when a moziplaceinfo couldn't be processed. 227 mozivisitstatuscallback interfaces, interfaces:scriptable, places, reference, xpcom interface reference called when the moziasynchistory.isurivisited() method's check to determine whether a given uri has been visited has completed. implement this method to determine the results of the request. 228 nsiabcard interfaces, interfaces:scriptable, xpcom, xpcom api reference, thunderbird ...
...And 10 more matches
Background Tasks API - Web APIs
he goal: to be able to add requests to call functions to a queue, with an idle callback that runs those functions whenever the system is idle for long enough a time to make progress. variable declarations let tasklist = []; let totaltaskcount = 0; let currenttasknumber = 0; let taskhandle = null; these variables are used to manage the list of tasks that are waiting to be performed, as well as status information about the task queue and its execution: tasklist is an array of objects, each representing one task waiting to be run. totaltaskcount is a counter of the number of tasks that have been added to the queue; it will only go up, never down. we use this to do the math to present progress as a precentage of total work to do. currenttasknumber is used to track how many tasks have been p...
...lementbyid("currenttasknumber"); let progressbarelem = document.getelementbyid("progress"); let startbuttonelem = document.getelementbyid("startbutton"); let logelem = document.getelementbyid("log"); next we have variables which reference the dom elements we need to interact with. ...
...t the total number of tasks created into the status display in the progress box. currenttasknumberelem is the element used to display the number of tasks processed so far. progressbarelem is the <progress> element showing the percentage of the tasks processed so far. startbuttonelem is the start button. logelem is the <div> we'll insert logged text messages into. let logfragment = null; let statusrefreshscheduled = false; finally, we set up a couple of variables for other items: logfragment will be used to store a documentfragment that's generated by our logging functions to create content to append to the log when the next animation frame is rendered. ...
...And 10 more matches
Desktop gamepad controls - Game development
via the gamepad api. it brings a console-like experience to your web games. the gamepad api gives you the ability to connect a gamepad to your computer and detect pressed buttons directly from the javascript code thanks to the browsers implementing such feature. an api exposes all the information you need to hook up your game's logic and successfully control the user interface and gameplay. api status, browser and hardware support the gamepad api is still in working draft status, although browser support is already quite good — around 63% global coverage, according to caniuse.com. the list of supported devices is also quite extensive — most popular gamepads (e.g. xbox 360 or ps3) should be suitable for web implementations. pure javascript approach let's think about implementing pure jav...
...work was used. first off, we'll create a small library that will take care of handling the input for us. here's the gamepadapi object, which contains useful variables and functions: var gamepadapi = { active: false, controller: {}, connect: function(event) {}, disconnect: function(event) {}, update: function() {}, buttons: { layout: [], cache: [], status: [], pressed: function(button, state) {} } axes: { status: [] } }; the controller variable stores the information about the connected gamepad, and there's an active boolean variable we can use to know if the controller is connected or not. the connect() and disconnect() functions are bound to the following events: window.addeventlistener("gamepadconnected", gamepadap...
...amepad is connected and disconnected respectively. the next function is update(), which updates the information about the pressed buttons and axes. the buttons variable contains the layout of a given controller (for example which buttons are where, because an xbox 360 layout may be different to a generic one), the cache containing the information about the buttons from the previous frame and the status containing the information from the current frame. the pressed() function gets the input data and sets the information about it in our object, and the axes property stores the array containing the values signifying the amount an axis is pressed in the x and y directions, represented by a float in the (-1, 1) range. after the gamepad is connected, the information about the controller is stored i...
...And 9 more matches
Implementing controls using the Gamepad API - Game development
s or those running in the browser. now in the era of html5, we finally have the gamepad api, which gives us the ability to play browser-based games using gamepad controllers without any plugins. the gamepad api achieves this by providing an interface exposing button presses and axis changes that can be used inside javascript code to handle the input. these are good times for browser gaming. api status and browser support the gamepad api is still at the working draft stage in the w3c process, which means its implementation might still change, but saying that the browser support is already quite good. firefox 29+ and chrome 35+ support it out of the box. opera supports the api in version 22+ (not surprising given that they now use chrome's blink engine.) and microsoft implemented support for th...
...e second one is fired when a gamepad is disconnected (either physically by the user or due to inactivity.) in the demo, the gamepadapi object is used to store everything related to the api: var gamepadapi = { controller: {}, turbo: false, connect: function() {}, disconnect: function() {}, update: function() {}, buttonpressed: function() {}, buttons: [], buttonscache: [], buttonsstatus: [], axesstatus: [] }; the buttons array contains the xbox 360 button layout: buttons: [ 'dpad-up','dpad-down','dpad-left','dpad-right', 'start','back','axis-left','axis-right', 'lb','rb','power','a','b','x','y', ], this can be different for other types of gamepads like the ps3 controller (or a no-name, generic one), so you have to be careful and not just assume the button you're expec...
...we're connecting more than one controller and want to identify them to act accordingly — for example when we have a two-player game requiring two devices to be connected. querying the gamepad object beside connect() and disconnect(), there are two more methods in the gamepadapi object: update() and buttonpressed(). ...
...And 9 more matches
Making asynchronous programming easier with async and await - Learn web development
esolve("hello"); }; hello().then(alert); of course, the above example is not very useful, although it does serve to illustrate the syntax. let's move on and look at a real example. ...
... hello().then(alert); of course, the above example is not very useful, although it does serve to illustrate the syntax. let's move on and look at a real example. ...
...; }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); by now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things: async function myfetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new error(`http error! ...
...And 9 more matches
Mozilla’s UAAG evaluation report
, almost all requirements satisfied g: good implementation, most important requirements satisfied p: poor implementation, some requirements satisfied and/or difficult for user to access feature ni: not implemented nr: not rated na: not applicable document under construction guideline 1. support input and output device-independence. checkpoint title status notes/plans 1.1 full keyboard access. (p1) vg we have some remaining bugs, and some keyboard usability issues, but in general mozilla now has keyboard equivalents for almost everything. most browsers do not allow the user to select text with the keyboard alone. we intend to do this with a caret browsing feature. 1.2 activate event handlers. (p1) p onmouseo...
...r almost everything. most browsers do not allow the user to select text with the keyboard alone. we intend to do this with a caret browsing feature. 1.2 activate event handlers. (p1) p onmouseover, onmousedown, onmouseup, onmousemove, onclick, ondbclick: no keyboard support onfocus and onblur: cannot be activated with pointer 1.3 provide text messages. (p1) c status line and alert boxes used to convey messages and alerts guideline 2. ensure user access to all content. checkpoint title status notes/plans checkpoint title status notes/plans 2.1 render content according to specification. (p1) vg renders html, css, and a number of graphic image formats. does not contradict current specifications for ...
... user style sheets to render this. a ui for this would be good. noscript for script: must use user style sheets to render this. a ui for this would be good. 2.10 toggle placeholders. (p3) ni 2.11 alert unsupported language. (p3) nr ? guideline 3. allow configuration not to render some content that may reduce accessibility. checkpoint title status notes/plans 3.1 toggle background images. (p1) c preferences, appearance, colors - "use my chosen colors, ignoring the colors and background image specified" 3.2 toggle audio, video, animated images. (p1) p animated images can be made still with the escape key animated images can be made still as a preference under preferences, privacy & security, images -...
...And 9 more matches
nsIWebProgressListener
these flags are mutually exclusive. for any given request, onstatechange() is called once with the state_start flag, zero o...
...these flags are mutually exclusive. for any given request, onstatechange() is called once with the state_start flag, zero or more times with the sta...
...these flags are mutually exclusive. for any given request, onstatechange() is called once with the state_start flag, zero or more times with the state_transferring flag or once with the state_redirecting flag, and then finally onc...
...And 9 more matches
Online and offline events - Web APIs
effectively, the requirements break down as such: you need to know when the user comes back online, so that you can re-synchronize with the server. ...
...d fail)... firefox 2 updates this property when switching to/from the browser's offline mode. firefox 41 updates this property when the os reports a change in network connectivity on windows, linux, and os x. this property existed in older versions of firefox and internet explorer (the specification based itself off of these prior implementations), so you can begin using it immediately. network status autodetection was implemented in firefox 2. "online" and "offline" events firefox 3 introduces two new events: "online" and "offline". these two events are fired on the <body> of each page when the browser switches between online and offline mode. additionally, the events bubble up from document.body, to document, ending at window. both events are non-cancellable (you can't prevent the user fro...
...fline will not work for compatibility reasons.) by specifying ononline="..." or onoffline="..." attributes on the <body> tag in the html markup. example there's a simple test case that you can run to verify that the events are working (does not work in chrome due to attaching the event listener to document.body). ...
...And 9 more matches
WebGL best practices - Web APIs
shader/programparameter(), getshader/programinfolog(), other gets on shaders/programs: flush + shader compile + round-trip, if not done after shader compilation is complete. (see also parallel shader compilation below.) get*parameter() in general: possible flush + round-trip. in some cases, these will be cached to avoid the round-trip, but try to avoid relying on this. checkframebufferstatus(): possible flush + round-trip. getbuffersubdata(): usual finish + round-trip. (this is okay for read buffers in conjunction with fences - see async data readback below.) readpixels() to the cpu (i.e. without an unpack buffer bound): finish + round-trip. instead, use gpu-gpu readpixels in conjunction with async data readback. always keep vertex attrib 0 array-enabled if you draw ...
...haders and link programs serially, but many browsers can compile and link in parallel on background threads. ...
...aderinfolog(fs)); } } consider: function compileonce(gl, shader) { if (shader.compiled) return; gl.compileshader(shader); shader.compiled = true; } for (const [vs, fs, prog] of programs) { compileonce(gl, vs); compileonce(gl, fs); } for (const [vs, fs, prog] of programs) { gl.linkprogram(prog); } for (const [vs, fs, prog] of programs) { if (!gl.getprogramparameter(prog, gl.link_status)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info-log: ' + gl.getshaderinfolog(vs)); console.error('fs info-log: ' + gl.getshaderinfolog(fs)); } } khr_parallel_shader_compile for non-blocking compile/link status while we've described a pattern to allow browsers to compile and link in parallel, normally checking compile_status or link_status b...
...And 9 more matches
Mail composition back end
delivery operation "blind" the addlistener/removelistener methods let the caller add and remove listeners to the sending interface. ns_imethod addlistener(nsimsgsendlistener *alistener) = 0; ns_imethod removelistener(nsimsgsendlistener *alistener) = 0; sending listener interfaces the nsimsgsendlistener interface will let a caller keep track of the progress and any status of a send operation. these are critical for message delivery since message sending is asynchronous. it is the only way to determine if the operation was successful or not. an important item to note is the fact that this interface should also implement the nsimsgcopyservicelistener interface if it wants to be notified of the progress and completion of the copy operation. nsimsgsendlis...
...progress notification on the send operation. ns_imethod onprogress(const char *amsgid, - the message id for the message being sent pruint32 aprogress, - the progress so far pruint32 aprogressmax) = 0; - the maximum progress (aprogress should be used as a numerator and aprogressmax as a denominator for a message sent percentage) onstatus the onstatus gives the listener status updates for the current operation. ns_imethod onstatus(const char *amsgid, - the message id for the message being sent const prunichar *amsg) = 0; - a message concerning the status of the send operation onstopsending the onstopsending interface is called when the sending operation has completed. this wil...
... const prunichar *amsg) = 0; - a message concerning the status of the send operation onstopsending the onstopsending interface is called when the sending operation has completed. this will be called in the case of both success and failure. ...
...And 8 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
e or completed. by setting the mozbackgroundrequest property of the request object and modifying the example appropriately, you can create your own alert dialog to handle ssl exceptions in your firefox extension or xulrunner application. // adapted from the patch for moztcpsocket error reporting (bug 861196). ...
...t property of the request object and modifying the example appropriately, you can create your own alert dialog to handle ssl exceptions in your firefox extension or xulrunner application. // adapted from the patch for moztcpsocket error reporting (bug 861196). const {cc,ci} = require("chrome"); function createtcperrorfromfailedxhr(xhr) { let status = xhr.channel.queryinterface(ci.nsirequest).status; let errtype; if ((status & 0xff0000) === 0x5a0000) { // security module const nsinsserrorsservice = ci.nsinsserrorsservice; let nsserrorsservice = cc['@mozilla.org/nss_errors_service;1'].getservice(nsinsserrorsservice); let errorclass; // geterrorclass will throw a generic ns_error_failure if the error code is // somehow not in the set of covered errors. try { ...
...== 0x5a0000) { // security module const nsinsserrorsservice = ci.nsinsserrorsservice; let nsserrorsservice = cc['@mozilla.org/nss_errors_service;1'].getservice(nsinsserrorsservice); let errorclass; // geterrorclass will throw a generic ns_error_failure if the error code is // somehow not in the set of covered errors. ...
...And 8 more matches
XUL user interfaces - Archive of obsolete content
faces, it does not support all the features that you need to make a standalone application. mozilla overcomes this limitation by providing a specialized language for creating user interfaces: xul (xml user-interface language, usually pronounced like "zool"). in xul, many common user interface features are built in. for example, xul provides specialized windows like dialogs and wizards, as well as status bars, menus, tool bars, and even browsers. more specialized features can be built from parts by using xul together with other technologies that you have seen in this tutorial: css style, javascript code, and xbl bindings. like other xml-based languages, xul uses css stylesheets. more details for more information about xul user interfaces, see the xul page in this wiki. action: ...
...copy and paste the content from here, making sure that you scroll to get all of it: /*** xul demonstration ***/ window { -moz-box-align: start; background-color: -moz-dialog; font: -moz-dialog; padding: 2em; } .head-1 { font-weight: bold; font-size: 200%; padding-left: ...
...copy and paste the content from here, making sure that you scroll to get all of it: /*** xul demonstration ***/ window { -moz-box-align: start; background-color: -moz-dialog; font: -moz-dialog; padding: 2em; } .head-1 { font-weight: bold; font-size: 200%; padding-left: 5px; } /* th...
...And 7 more matches
Twitter - Archive of obsolete content
re up to next! jetpack's twitter library, jetpack.lib.twitter, is a very simple, lightweight layer on top of twitter's rest api. in fact it's hardly more than syntactic sugar for doing xmlhttprequests. to use this library, you therefore need to be familiar with twitter's own api. (it's easy!) methods each method in twitter's api maps to a method here. for example, the twitter method for tweeting, statuses/update, maps to jetpack.lib.twitter.statuses.update(). to call trends/current, use jetpack.lib.twitter.trends.current(). for search, jetpack.lib.twitter.search(). replace slashes with dots. most of twitter's methods are supported, but not all. list methods, spam reporting methods, and oauth are not currently supported. if something is not supported but you would like it to be, please file a ...
...o a user's id. (you can read about the parameters of the various methods at twitter's api reference.) there are two special, optional properties: success and error. success is a function that's called when the request successfully completes, and error is a function called when it fails to complete. the library simply passes them to jquery.ajax(), and so they are called like so: success(data, textstatus) data is twitter's decoded json response. textstatus is a simple string describing the status. error(xmlhttprequest, textstatus, errorthrown) xmlhttprequest is the xhr used in the request. textstatus is a simple string describing the type of error. errorthrown is an exception object, if one was thrown. the examples below all use this first, simpler style. the second style will be familiar ...
...e. the second style will be familiar if you have used jquery.ajax() -- in fact the object is passed as-is (almost) to it. in other words, define a data property that is itself an object whose properties correspond to the parameters of the twitter method. with this style you can use any of the various jquery.ajax() options in your request: data, success, complete, etc. example: jetpack.lib.twitter.statuses.update({ data: { status: "o frabjous day!" }, username: "basic_auth_username", password: "basic_auth_password", success: function () console.log("hey!") }); user authentication you can supply a username and password to methods that require authentication using the second, more advanced call style described above. or you can simply rely on firefox. when you call a method that requ...
...And 7 more matches
Graceful asynchronous programming with Promises - Learn web development
camera and microphone. so instead of waiting for the user, getting the chosen devices enabled, and directly returning the mediastream for the stream created from the selected sources, getusermedia() returns a promise which is resolved with the mediastream once it's available. ...
...available. the code that the video chat application would use might look something like this: function handlecallbutton(evt) { setstatusmessage("calling..."); navigator.mediadevices.getusermedia({video: true, audio: true}) .then(chatstream => { selfviewelem.srcobject = chatstream; chatstream.gettracks().foreach(track => mypeerconnection.addtrack(track, chatstream)); setstatusmessage("connected"); }).catch(err => { setstatusmessage("failed to connect"); }); } this function starts by using a function called setstatusmessage() to update a status display with the message "calling...", indicating that a call is being attempted. it then calls getusermedia(), asking for a stream that has both video and audio tracks, then once that's been obtained, sets up a v...
...ing...", indicating that a call is being attempted. it then calls getusermedia(), asking for a stream that has both video and audio tracks, then once that's been obtained, sets up a video element to show the stream coming from the camera as a "self view," then takes each of the stream's tracks and adds them to the webrtc rtcpeerconnection representing a connection to another user. after that, the status display is updated to say "connected". if getusermedia() fails, the catch block runs. this uses setstatusmessage() to update the status box to indicate that an error occurred. the important thing here is that the getusermedia() call returns almost immediately, even if the camera stream hasn't been obtained yet. even if the handlecallbutton() function has already returned to the code that called...
...And 7 more matches
Componentizing our Svelte app - Learn web development
er organize your components. eventually, we will split up our app into the following components: alert.svelte: a general notification box for communicating actions that have occurred. newtodo.svelte: the text input and button that allow you to enter a new todo item. filterbutton.svelte: the all, active, and completed buttons that allow you to apply filters to the displayed todo items. todosstatus.svelte: the "x out of y items completed" heading. todo.svelte: an individual todo item. each visible todo item will be displayed in a separate copy of this component. moreactions.svelte: the check all and remove completed buttons at the bottom of the ui that allow you to perform mass actions on the todo items. in this article we will concentrate on creating the filterbutton and todo compone...
...that's because our todo component is receiving the todo via the prop, but it's not sending any information back to its parent. we'll fix this later on. sharing data between components: props-down, events-up pattern the bind directive is pretty straightforward and allows you to share data between a parent and child component with minimal fuss. however, ...
...es the e parameter (the event object), which as described before holds the todo being deleted in the detail property. at this point, if you try out your app again, you should see that the delete functionality now works again! so our custom event has worked as we hoped. in addition, the remove event listener is sending the daa change back up to the parent, so our "x out of y items completed" status heading will now update appropriately when todos are deleted. now we'll take care of the update event, so that our parent component can get notified of any modified todo. updating todos we still have to implement functionality to allow us to edit existing todos. we'll have to include an editing mode in the todo component. when entering editing mode we'll show an <input> field to allow us to...
...And 7 more matches
How Mozilla's build system works
create the final configure script. you don't have to worry about how you obtain a configure file: the build system does this for you. the primary job of configure is to determine characteristics of the system and compiler, apply options passed into it, and validate everything looks ok to build. the primary output of the configure script is an executable file in the object directory called config.status. ...
...mary job of configure is to determine characteristics of the system and compiler, apply options passed into it, and validate everything looks ok to build. the primary output of the configure script is an executable file in the object directory called config.status. configure also produces some additional files (like autoconf.mk). however, the most important file in terms of architecture is config.status. the existence of a config.status file may be familiar to those who have worked with autoconf before. however, mozilla's config.status is different from many other config.status files, as it's written in python! instead of our configure script producing a shell script, it generates a python script. python 2 is prevalent in a mozilla build system. if we need to write code for the build system, w...
...a build backend is merely a tool used to build the tree — like gnu make or tup. ...
...And 7 more matches
nss tech note5
xtbysymkey(ciphermech, cka_encrypt or cka_decrypt, symkey, secparam); do the operation. if encrypting, outbuf len must be atleast (inbuflen + blocksize). if decrypting, outbuflen must be atleast inbuflen. ...
...pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") <big>create digest context</big>. some of the digest algorithm identifiers are (without the sec_oid_ prefix) : md2, md5, sha1, sha256, sha384, sha512. ...
...ut can be empty. ...
...And 7 more matches
nsISocketTransport
ts. it provides methods to open blocking or non-blocking, buffered or unbuffered streams between two end-point in a ip based network. inherits from: nsitransport last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: connection setup is triggered by opening an input or output stream, it does not start on its own. completion of the connection setup is indicated by a status_connected_to notification to the event sink (if set). to create an instance, call nsisockettransportservice.createtransport() method overview prnetaddr getpeeraddr(); native code only! prnetaddr getselfaddr(); native code only! unsigned long gettimeout(in unsigned long atype); boolean isalive(); void settimeout(in uns...
...y available once the socket is connected. read only. constants timeout type this constants are used by gettransport() and settransport() to specify socket timeouts constant value description timeout_connect 0 connecting timeout. timeout_read_write 1 read and write timeouts. ...
... value description timeout_connect 0 connecting timeout. timeout_read_write 1 read and write timeouts. nsitransporteventsink status codes note: although these constants look like xpcom error codes and are passed in an nsresult variable, they are not error codes. they do overlap with existing error codes in necko, these status codes are confined within a very limited context where no error codes may appear, so there is no ambiguity. the values of these status codes must never change. ...
...And 7 more matches
Window.open() - Web APIs
Web › API › Window › open
won't load immediately. when window.open() returns, the window always contains about:blank. the actual fetching of the url is deferred and starts after the current script block finishes executing. the window creation and the loading of the referenced resource are done asynchronously. ...
...in this case the return value of the method is the existing window and windowfeatures is ignored. providing an empty string for url is a way to get a reference to an open window by its name without changing the window's location. ...
...res in modern browsers (firefox 76 or newer, google chrome, safari, chromium edge), the following features are just a condition for whether to open popup or not. see popup condition section. the following features control the visibility of each ui parts, all features can be set to yes or 1, or just be present to be on. set them to no or 0, or in most cases just omit them, to be off. example: status=yes, status=1, and status have identical results. menubar if this feature is on, then the new secondary window renders the menubar. if windowfeatures is non-empty, menubar detaults to off. toolbar if this feature is on, then the new secondary window renders the toolbar buttons (back, forward, reload, stop buttons). in addition to the toolbar buttons, firefox (before 76) will render th...
...And 7 more matches
Using XMLHttpRequest - Web APIs
w to use xmlhttprequest to issue http requests in order to exchange data between the web site and a server. examples of both common and more obscure use cases for xmlhttprequest are included. to send an http request, create an xmlhttprequest object, open a url, and send the request. after the transaction completes, the object will contain useful information such as the response body and the http status of the result. function reqlistener () { console.log(this.responsetext); } var oreq = new xmlhttprequest(); oreq.addeventlistener("load", reqlistener); oreq.open("get", "http://www.example.org/example.txt"); oreq.send(); types of requests a request made via xmlhttprequest can fetch the data in one of two ways, asynchronously or synchronously. the type of request is dictated by the optional ...
...t isn't limited to only xml documents. it starts with "xml" because when it was created the main format that was originally used for asynchronous data exchange were xml handling responses there are several types of response attributes defined by the living standard specification for the xmlhttprequest() constructor. these tell the client making the xmlhttprequest important information about the status of the response. some cases where dealing with non-text response types may involve some manipulation and analysis are outlined in the following sections. analyzing and manipulating the responsexml property if you use xmlhttprequest to get the content of a remote xml document, the responsexml property will be a dom object containing a parsed xml document. this could prove difficult to manipulate...
...*/ /* dosomething(odata); */ /* console.log("ajaxsubmit - the form is now serialized. submitting..."); */ submitdata (odata); } function pushsegment (ofrevt) { this.owner.segments[this.segmentidx] += ofrevt.target.result + "\r\n"; this...
...And 7 more matches
Index - HTTP
Web › HTTP › Headers › Index
er, needscompattable, needscontent, needsexample, reference the alt-svc header is used to list alternate ways to reach this website. 18 authorization http, http header, reference, request header, header the http authorization request header contains the credentials to authenticate a user agent with a server, usually after the server has responded with a 401 unauthorized status and the www-authenticate header. 19 cache-control general header, http, http header, reference the cache-control general-header field is used to specify directives for caching mechanisms in both requests and responses. caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the response. ...
... has changed, etags are useful to help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). 59 early-data client hints, http, header, request the early-data header is set by an intermediate to indicates that the request has been conveyed in tls early data, and additionally indicates that an 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). 60 expect http, http header, reference, request header the expect http request header indicates expectations that need to be fulfilled by the server in order to properly handle the request. 61 expect-ct http, reference, header the expect-ct header allows sites to o...
...d back the requested resource only if it matches one of the listed etags. for put and other non-safe methods, it will only upload the resource in this case. 78 if-modified-since conditional requests, http, http header, reference, request header 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. unlike if-unmodified-since, if-modified-since can only be used with a get or head. 79 if-none-match conditional requests, http, http heade...
...And 7 more matches
Specifying the appearance - Archive of obsolete content
now that we have defined a panel in which to display an icon, we use css to specify which icon to display. ...
... now that we have defined a panel in which to display an icon, we use css to specify which icon to display. ...
...ve defined a panel in which to display an icon, we use css to specify which icon to display. ...
...And 6 more matches
Monitoring downloads - Archive of obsolete content
although it was possible to do so in previous versions of firefox, it was previously only possible for one observer to do so at a time. ...
... the download manager. as a nice bonus, it also demonstrates how to use the storage api to issue sqlite commands on a database. the result is a window you can open by choosing "download log" in the tools menu, which lists all downloads that have been started since you installed the extension. in the list is the name of the file, the start and end times of the download, the download speed, and the status of the download. a tooltip is included that displays the full source url of the file. download the full sample. setting up when the extension loads, it will do some housekeeping chores. in particular, it needs to get an instance of the download manager's nsidownloadmanager interface and create the database into which its data will be stored. onload: function() { // initialization code ...
...the database file is opened, and an sqlite create table command is executed to create the table. finally, the database is closed. note:...
...And 6 more matches
TypeScript support in Svelte - Learn web development
validate will still give us some warnings from todos.svelte. let's fix them. start by importing the todotype and telling typescript that our todos variable is an array of todotype. replace export let todos = [] with the following two lines: import type { todotype } from '../types/todo.type' export let todos: todotype[] = [] next we'll specify all the missing types. the variable todosstatus, which we used to programmatically access the methods exposed by the todosstatus component, is of type todosstatus. and each todo will be of type todotype. update your <script> section to look like this: <script lang='ts'> import filterbutton from './filterbutton.svelte' import todo from './todo.svelte' import moreactions from './moreactions.svelte' import newtodo from './newtodo.sv...
...rogrammatically access the methods exposed by the todosstatus component, is of type todosstatus. and each todo will be of type todotype. ...
...ss the methods exposed by the todosstatus component, is of type todosstatus. and each todo will be of type todotype. ...
...And 6 more matches
Overview of Mozilla embedding APIs
user activity within the webbrowser (such as a right-click on a hypertext link). saving documents notification interfaces which the embedding application should implement nsfile public interfaces nsisupports base component object model interface. this interface provides runtime interface discovery and a reference counted memory model fashioned after the microsoft com iunknown interface. interface status... none interface definition: nsisupportsutils.h nsiinterfacerequestor this interface provides an interface discovery mechanism which does not imply aggregation. interface status... none interface definition: nsiinterfacerequestor.idl nsiweakreference this interface is used to retern a proxy reference to a component. interface status... being reviewed interface definition: nsiweakreference.idl...
... provides an interface discovery mechanism which does not imply aggregation. interface status... none interface definition: nsiinterfacerequestor.idl nsiweakreference this interface is used to retern a proxy reference to a component. interface status... being reviewed interface definition: nsiweakreference.idl nsisimpleemunerator this interface provides a simple enumeration abstraction. interface status... being reviewed interface definition: nsisimpleenumerator.idl nsiservicemanager this interface allows access to global services within mozilla. interface status... none interface definition: nsiservicemanager.h nsishutdownlistener this interface is used to receive notifications when the service manager is being shutdown. interface status... none interface definition: nsiservicemanager.h n...
...lobal services within mozilla. interface status... none interface definition: nsiservicemanager.h nsishutdownlistener this interface is used to receive notifications when the service manager is being shutdown. interface status... none interface definition: nsiservicemanager.h nsicomponentmanager this interface allows new instances of registered xpcom components to be instantiated. interface status... none interface definition: nsicomponentmanager.idl nsifactory this interface is used by the component manager to create new instances of a particular xpcom component. each component must provide a factory implementation for creating new instances. interface status... none interface definition: nsifactory.idl nsimemory this interface provides access to the global memory management functio...
...And 6 more matches
nsIAutoCompleteListener
xpfe/components/autocomplete/public/nsiautocompletelistener.idlscriptable this interface is deprecated. it only exists for legacy ldap autocomplete session support. new code should use toolkit autocomplete interfaces. inherits from: nsisupports last changed in gecko 1.7 method overview void onautocomplete(in nsiautocompleteresults result, in autocompletestatus status); void onstatus(in wstring statustext); attributes attribute type description param nsisupports private parameter used by the autocomplete widget. methods onautocomplete() called by the autocomplete session when the search is done or over. as of gecko 1.9.1, can also be called with partial results, in a similar manner to the toolkit autocomplete interface. void onautocomplete( in nsiautocompleteresu...
...ibutes attribute type description param nsisupports private parameter used by the autocomplete widget. methods onautocomplete() called by the autocomplete session when the search is done or over. as of gecko 1.9.1, can also be called with partial results, in a similar manner to the toolkit autocomplete interface. ...
... attribute type description param nsisupports private parameter used by the autocomplete widget. methods onautocomplete() called by the autocomplete session when the search is done or over. as of gecko 1.9.1, can also be called with partial results, in a similar manner to the toolkit autocomplete interface. ...
...And 6 more matches
nsIDownloadProgressListener
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) to use simply implement this interface in your code, then call nsidownloadmanager.addlistener() to start listening. when you no longer need to listen to the download manager's state, call nsidownloadmanager.removelistener() to stop listening. ...
... methods ondownloadstatecha...
...long acurtotalprogress, in long long amaxtotalprogress, in nsidownload adownload); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest 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. methods ondownloadstatechange() called when the status of a particular downl...
...And 6 more matches
nsIMsgMessageService
in nsimsgwindow amsgwindow, out nsiuri aurl); parameters asrcuri the string url of the message to copy. acopylistener an nsistreamlistener to be notified of copy events. amovemessage set to true if you want the message to be moved. false leaves it as just a copy. aurllistener a nsiurllistener to be notified of url events. amsgwindow nsimsgwindow for progress and status feedback return values aurl the new nsiuri of the message. copymessages() copy multiple messages at a time. see copymessage [noscript] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, i...
... in nsimsgwindow amsgwindow, out nsiuri aurl); parameters keys an array of message keys to be copied. srcfolder acopylistener an nsistreamlistener to be notified of copy events. amovemessage set to true if you want the message to be moved. false leaves it as just a copy. aurllistener an nsiurllistener amsgwindow nsimsgwindow for progress and status feedback return values aurl the new nsiuri of the message. (?) displaymessage() when you want a message displayed.... void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, o...
...playconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl); parameters amessageuri a uri representing the message to display. adisplayconsumer is (for now) an nsidocshell which the message is loaded into. amsgwindow nsimsgwindow for progress and status feedback aurllistener an nsiurllistener acharsetoverride (optional) character set over ride to force the message to use. return values aurl the new nsiuri of the message. openattachment() downloads and opens an attachment. void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessag...
...And 6 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
found 1218 pages: # page tags and summary 1 xul landing, mozilla, xul xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox. 2 &lt;statusbarpanel&gt; deprecated, xul, xul elements, xul reference an individual element of a statusbar. this is a special type of button which is drawn differently. unlike normal buttons, a statusbarpanel can only have a label or an image but not both. this element is often used with a short label or icon to indicate status, for instance whether the user is online or whether there are new messages. 3 a xul bestiary add-ons, extensions, needstechnicalreview, xul this xulnote presents some of the key concepts and ter...
...! 344 sortresource2 xul attributes, xul reference no summary! 345 spellcheck xul attributes, xul reference the html 346 src xul attributes, xul reference no summary! 347 state xul attributes, xul reference no summary! 348 statedatasource xul attributes, xul reference no summary! 349 statusbar xul attributes, xul reference no summary! 350 statustext deprecated, xul attributes, xul reference no summary! 351 stringbundle.src xul attributes, xul reference no summary! 352 style xul attributes, xul reference no summary! 353 subject xul attributes, xul reference no summary! 354 substat...
...archat xul methods, xul reference no summary! 502 getselecteditem xul methods, xul reference no summary! 503 getsession xul methods, xul reference no summary! 504 getsessionbyname xul methods, xul reference no summary! 505 getsessionresultat xul methods, xul reference no summary! 506 getsessionstatusat xul methods, xul reference no summary! 507 getsessionvalueat xul methods, xul reference no summary! 508 getstring xul methods, xul reference no summary! 509 gettabforbrowser method, mozilla, reference, référence(2), xul, xul methods, xul reference no summary! 510 gettabmodalpromptbox xul, xul methods, xul ...
...And 5 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. read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the im...
...d lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with. read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from. read only. ...
...d requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with. read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from. read only. ...
...And 5 more matches
Building a Thunderbird extension 5: XUL
ipt. xul is an xml grammar that provides user interface widgets like buttons, menus, toolbars, trees etc. we add widgets by inserting new xul dom elements into the application window and modify them using scripts and attaching event handlers. while xul provides the elements of the user interface, actions are written in javascript. for our first extension, we will add some text to the thunderbird status bar. the status bar is implemented in a xul file called messenger.xul, which can be found in the chrome/messenger/content/messenger folder which is packaged inside the omni.ja archive. to view this xul file use the dom inspector extension (no longer supported) or look inside the omni.ja archive, which is located in the thunderbird program folder. omni.ja can be easily browsed by copying the file...
...de the omni.ja archive. to view this xul file use the dom inspector extension (no longer supported) or look inside the omni.ja archive, which is located in the thunderbird program folder. omni.ja can be easily browsed by copying the file to a different location and renaming it to omni.zip. if you have trouble with one zip manager (like 7zip) try another (like winrar). in messenger.xul we find the status bar, which looks something like this.: <statusbar id="status-bar" ...> ... <statusbarpanel>s ... </statusbar> <statusbar id="status-bar"> is a "merge point" for a xul overlay. xul overlays are a way of attaching other ui widgets to a xul document at run time. a xul overlay is a .xul file that specifies xul fragments to insert at specific merge points within a "master" document. these fragment...
...this shows how the thunderbird architecture allows extensions to modify the user experience without modifying the installation files. this also enables version independence between thunderbird and thunderbird extensions. ...
...And 5 more matches
Using IndexedDB - Web APIs
eployed on. ...
.../tr/xmlhttprequest2/#the-response-attribute xhr.responsetype = 'blob'; xhr.onload = function (evt) { if (xhr.status == 200) { console.log("blob retrieved"); var blob = xhr.response; console.log("blob:", blob); addpublication(biblioid, title, year, blob); } else { console.error("addpublicationfromurl error:", xhr.responsetext, xhr.status); } }; xhr.send(); // we can't use jquery here because as of jquery 1.8.3 the new "blob" // responsetype is not handled. ...
... xhr.responsetext, xhr.status); } }; xhr.send(); // we can't use jquery here because as of jquery 1.8.3 the new "blob" // responsetype is not handled. ...
...And 5 more matches
A simple RTCDataChannel sample - Web APIs
k at it a bit at a time, for clarity. note: even though both ends of our connection will be on the same page, we're going to refer to the one that starts the connection as the "local" one, and to the other as the "remote" end. set up the local peer localconnection = new rtcpeerconnection(); sendchannel = localconnection.createdatachannel("sendchannel"); sendchannel.onopen = handlesendchannelstatuschange; sendchannel.onclose = handlesendchannelstatuschange; the first step is to create the "local" end of the connection. this is the peer that will send out the connection request. the next step is to create the rtcdatachannel by calling rtcpeerconnection.createdatachannel() and set up event listeners to monitor the channel so that we know when it's opened and closed (that is, when the chann...
...this is saved, and we set up, on the channel, event listeners for the events we want to handle. once this is done, our handlereceivemessage() method will be called each time data is re...
...l event is sent to the remote to complete the process of opening the data channel; this invokes our receivechannelcallback() method, which looks like this: function receivechannelcallback(event) { receivechannel = event.channel; receivechannel.onmessage = handlereceivemessage; receivechannel.onopen = handlereceivechannelstatuschange; receivechannel.onclose = handlereceivechannelstatuschange; } the datachannel event includes, in its channel property, a reference to a rtcdatachannel representing the remote peer's end of the channel. this is saved, and we set up, on the channel, event listeners for the events we want to handle. once this is done, our handlereceivemessage() method will be called each time data is received by the remote peer, and the handlereceivechannelstatusch...
...And 5 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
</tabpanel> </tabpanels> focusing t...
... </tabpanel> </tabpanels> focusing the tabbox will visua...
... </tabpanel> </tabpanels> focusing the tabbox will visually set focus ...
...And 4 more matches
Collision detection - Game development
t the above code will work as desired and the ball changes its direction. the problem is that the bricks are staying where they are. we have to figure out a way to get rid of the ones we've already hit with the ball. we can do that by adding an extra parameter to indicate whether we want to paint each brick on the screen or not. ...
...ate whether we want to paint each brick on the screen or not. in the part of the code where we initialize the bricks, let's add a status property to each brick object. update the following part of the code as indicated by the highlighted line: var bricks = []; for(var c=0; c<brickcolumncount; c++) { bricks[c] = []; for(var r=0; r<brickrowcount; r++) { bricks[c][r] = { x: 0, y: 0, status: 1 }; } } next we'll check the value of each brick's status property in the drawbricks() function before drawing it — if status is 1, then draw it, but if it's 0, then it was hit by the ball and we don't want it on the screen anymore. update your drawbricks() function as follows: function drawbricks() { for(var c=0; c<brickcolumncount; c++) { for(var r=0; r<brickrowcount; r++)...
...k the value of each brick's status property in the drawbricks() function before drawing it — if status is 1, then draw it, but if it's 0, then it was hit by the ball and we don't want it on the screen anymore. ...
...And 4 more matches
Introduction to automated testing - Learn web development
rapper using the following command: npm install saucelabs create a new file inside your project root called call_sauce.js. ...
... npm install saucelabs create a new file inside your project root called call_sauce.js. ...
...ction (err, res) { console.log(res); myaccount.getservicestatus(function (err, res) { // status of the sauce labs services console.log(res); myaccount.getjobs(function (err, jobs) { // get a list of all your jobs for (let k in jobs) { if ( jobs.hasownproperty( k )) { myaccount.showjob(jobs[k].id, function (err, res) { let str = res.id + ": status: " + res.status; if (res.error) { str += "\033[31m error: " + res.error + " \033[0m"; } console.log(str); }); } } }); }); }); you'll need to fill in your sauce labs username and api key in the indicated places. these can be retrieved from your user settings page. fill these in now. make sure everything is saved, a...
...And 4 more matches
NSS Sample Code Sample_2_Initialization of NSS
checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_fprintf(pr_stderr, "passwords do not match. ...
...stderr, "passwords do not match. ...
... } port_memset(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* * this example illustrates initialization of the nss database. * it creates an nss configuration directory with empty databases * and initializes the databases. it also illustrates techniques for * password handling. ...
...And 4 more matches
Initialize NSS database - sample 2
checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_fprintf(pr_stderr, "passwords do not match. ...
... pr_fprintf(pr_stderr, "passwords do not match. ...
... } port_memset(newpw, 0, pl_strlen(newpw)); port_free(newpw); return secsuccess; } /* * this example illustrates initialization of the nss database. * it creates an nss configuration directory with empty databases * and initializes the databases. it also illustrates techniques for * password handling. ...
...And 4 more matches
NSS tools : modutil
please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens. ...
...ions can be performed, there must be a set of security databases available. modutil can be used to create these files. the only required argument is the database that where the databases will be located. modutil -create -dbdir [sql:]directory adding a cryptographic module adding a pkcs #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms. this can be done by supplying all of the information through modutil directly or by running a jar file and install script. for the most basic case, simply upload the library: modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] for example: modutil -dbdir sql:/home/my/sharednssdb -add "example pkcs #11 modu...
...ins information about the pkcs #11 modules that are available to an application or server to use. the list of all modules, information about specific modules, and database configuration specs for modules can all be viewed. to simply get a list of modules in the database, use the -list command. ...
...And 4 more matches
nsIWebBrowserChrome
embedding/browser/webbrowser/nsiwebbrowserchrome.idlscriptable corresponds to the top-level, outermost window containing an embedded gecko web browser. inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroybrowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy); attributes attribute type description chromeflags unsigned long the chrome flags for this browser chrome. the implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. webbrowser nsiwebbro...
...ser. the browser chrome may be told to set the webbrowser object to a new object by setting this attribute. in this case the implementer is responsible for taking the new webbrowser object and doing any necessary initialization or setup as if it had created the webbrowser itself. this includes positioning setting up listeners etc. constants constant value description status_script 1 flag for setstatus() status_script_default 2 flag for setstatus() status_link 3 flag for setstatus() chrome_default 1 value for the chromeflags attribute. chrome_window_borders 2 value for the chromeflags attribute. chrome_window_close 4 value for the chromeflags attribute. chrome_window_resize 8...
...romeflags attribute. chrome_window_close 4 value for the chromeflags attribute. chrome_window_resize 8 value for the chromeflags attribute. chrome_menubar 16 value for the chromeflags attribute. chrome_toolbar 32 value for the chromeflags attribute. chrome_locationbar 64 value for the chromeflags attribute. chrome_statusbar 128 value for the chromeflags attribute. chrome_personal_toolbar 256 value for the chromeflags attribute. chrome_scrollbars 512 value for the chromeflags attribute. chrome_titlebar 1024 value for the chromeflags attribute. chrome_extra 2048 value for the chromeflags attribute. chrome_with_size 4096 specifically fo...
...And 4 more matches
DataTransfer.clearData() - Web APIs
y string or is not provided, the data for all types is removed. example this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods. html <span class="tweaked" id="source" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element. ...
... provided, the data for all types is removed. example this example shows the use of the datatransfer object's getdata(), setdata() and cleardata() methods. html <span class="tweaked" id="source" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element. ...
...an></div> css span.tweaked { display: inline-block; margin: 1em 0; padding: 1em 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript window.addeventlistener('domcontentloaded', function () { // select html elements var draggable = document.getelementbyid('source'); var dropable = document.getelementbyid('target'); var status = document.getelementbyid('status'); var data = document.getelementbyid('data'); var dropped = false; // register event handlers draggable.addeventlistener('dragstart', dragstarthandler); draggable.addeventlistener('dragend', dragendhandler); dropable.addeventlistener('dragover', dragoverhandler); dropable.addeventlistener('dragleave', dragleavehandler); dropable.addeventlistener...
...And 4 more matches
RTCPeerConnection: connectionstatechange event - Web APIs
e rtcpeerconnectionstate enumerated type. bubbles no cancelable no interface event event handler onconnectionstatechange examples for an rtcpeerconnection, pc, this example sets up a handler for connectionstatechange messages to handle changes to the connectivity of the webrtc session. ...
...ate enumerated type. bubbles no cancelable no interface event event handler onconnectionstatechange examples for an rtcpeerconnection, pc, this example sets up a handler for connectionstatechange messages to handle changes to the connectivity of the webrtc session. it simply calls an app-defined function called setonlinestatus() to update a status display. ...
...statechange examples for an rtcpeerconnection, pc, this example sets up a handler for connectionstatechange messages to handle changes to the connectivity of the webrtc session. it simply calls an app-defined function called setonlinestatus() to update a status display. ...
...And 4 more matches
WebGL constants - Web APIs
unsigned_short_5_6_5 0x8363 shaders constants passed to webglrenderingcontext.createshader() or webglrenderingcontext.getshaderparameter() constant name value description fragment_shader 0x8b30 passed to createshader to define a fragment shader. ...
...nts passed to webglrenderingcontext.createshader() or webglrenderingcontext.getshaderparameter() constant name value description fragment_shader 0x8b30 passed to createshader to define a fragment shader. vertex_shader 0x8b31 passed to createshader to define a vertex shader compile_status 0x8b81 passed to getshaderparamter to get the status of the compilation. ...
... fragment_shader 0x8b30 passed to createshader to define a fragment shader. vertex_shader 0x8b31 passed to createshader to define a vertex shader compile_status 0x8b81 passed to getshaderparamter to get the status of the compilation. returns false if the shader was not compiled. you can then query getshaderinfolog to find the exact error delete_status 0x8b80 passed to getshaderparamter to determine if a shader was deleted via deleteshader. returns true if it was, false otherwise. ...
...And 4 more matches
XMLHttpRequest.onreadystatechange - Web APIs
ith 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. ...
...techange = callback; values callback is the function to be executed when the readystate changes. ...
...llback; values callback is the function to be executed when the readystate changes. ...
...And 4 more matches
Extensions support in SeaMonkey 2 - Archive of obsolete content
ype="menu"> <menupopup> <menuitem label="menuitem"/> <menuitem label="menuitem"/> <menuitem label="menuitem"/> </menupopup> </button> </hbox> technical note: the code that opens the url history popup just looks for any menupopup, so it goes wrong if you add your own. ordinary popups are fine of course. ...
...abel="menuitem"/> <menuitem label="menuitem"/> </menupopup> </button> </hbox> technical note: the code that opens the url history popup just looks for any menupopup, so it goes wrong if you add your own. ordinary popups are fine of course. the statusbar in firefox 3 a new vbox has been added, called "browser-bottombox", which encloses the find bar and status bar at the bottom of the browser window. ...
...our own. ordinary popups are fine of course. the statusbar in firefox 3 a new vbox has been added, called "browser-bottombox", which encloses the find bar and status bar at the bottom of the browser window. although this doesn't affect the appearance of the display, it may affect your extension if it overlays chrome relative to these elements. ...
...And 3 more matches
Adding preferences to an extension - Archive of obsolete content
« previousnext » this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to watch. it also adds a preference dialog that lets you switch to a stock other than one of the ones included in the popup menu. as before, concepts covered in the previous articles in this series won't be rehashed here, so if you haven't already seen them: creating a status bar extension creating a dynamic status bar extension also, for reference, you may want to take a look at preferences system and the preferences api. download the sample you can download a copy of this sample to look over, or to use as the basis for your own extension. get the code here: download the sample update the m...
...step is to register a preference observer by calling the addobserver() method to establish that whenever any events occur on the preferences, our object (this) receives notification. when events occur, such as a preference being altered, our observe() method will be called automatically. now that we're monitoring the preferences, we can set up to watch the stock information and display it in the status bar panel. the first thing we need to do is get the currently configured stock symbol to watch from the preferences. to do so, we call the nsiprefbranch.getcharpref() method, specifying that we want the preference named "symbol", which is where we store the user's selection for the stock to watch. we forcibly convert the symbol to upper-case since that's the way stock symbols are normally displa...
... the "symbol" preference. note that this call results in our stockwatcher.observe() method being invoked and displayed stock information being updated. refreshinformation() this method is slightly revised from previous versions, in that it needs to fetch the preference for the stock to watch and use that to construct the url to monitor, as well as to construct the string to be displayed in the status bar panel. refreshinformation: function() { // because we may be called as 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...
...And 3 more matches
Tamarin Build System Documentation - Archive of obsolete content
when all of the slave machines are free they all start the first build phase simultaneously. if an error or failure occurs on any slave in a phase the build stops. ...
... when all of the slave machines are free they all start the first build phase simultaneously. if an error or failure occurs on any slave in a phase the build stops. ...
...ted, the submitter may cancel a build. how do i build a sandbox build? 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. ...
...And 3 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
tamarin source versions the following instructions are for obtaining and building the tamarin tracing source code. ...
...use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-tracing tamarin-tracing building tamarin building tamarin will create all the libraries for the avmplu...
...use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-tracing tamarin-tracing building tamarin building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and creat...
...And 3 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
previous overview: client-side javascript frameworks next now that we have our markup and styles ready we can start developing the required features for our svelte to-do list app. in this article we'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status. prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line. you'll need a terminal with node + npm installed to compile and build your app. objective: learn and put into practice some basic svelte concepts, like creating components, passing data using props, render javascript expressions into our m...
...d: 1, name: 'create a svelte starter app', completed: true }, { id: 2, name: 'create your first component', completed: true }, { id: 3, name: 'complete the rest of the tutorial', completed: false } ] let totaltodos = todos.length let completedtodos = todos.filter(todo => todo.completed).length </script> now let's do something with that information. let's start by showing a status message. find the <h2> heading with an id of list-heading and replace the hardcoded number of active and completed tasks with dynamic expressions: <h2 id="list-heading">{completedtodos} out of {totaltodos} items completed</h2> go to the app, and you should see the "2 out of 3 items completed" message as before, but this time the information is coming from the todos array. to prove ...
...and the variable have the same name, svelte allows you to just specify the variable as a handy shortcut, so we can rewrite our last line like this. try this now. <todos {todos} /> at this point your todos should render just like they did before, except that now we're passing them in from the app.svelte component. toggling and removing todos let's add some functionality to toggle the task status. svelte has the on:eventname directive for listening to dom events. let's add a handler to the on:click event of the checkbox input to toggle the completed value. update the <input type="checkbox"> element inside src/components/todos.svelte as follows: <input type="checkbox" id="todo-{todo.id}" on:click={() => todo.completed = !todo.completed} checked={todo.completed} /> next w...
...And 3 more matches
Creating a Language Pack
x-testing locale_mergedir=$(pwd)/mergedir at the end of the process, you should see the following success message. ...
...ss, you should see the following success message. ...
...happy testing! ...
...And 3 more matches
Utilities for nss samples
* * printasascii */ extern void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len); /* * printashex */ extern void printashex(prfiledesc* out, const unsigned char *data, unsigned int len); /* * getdigit */ extern int getdigit(char c); /* * hextobuf */ extern int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * checkpassword */ extern prbool checkpassword(char *cp); /* * getpassword */ extern char * getpassword(file *input, file *output, char *prompt, prbool (*ok)(char *)); /* * filepasswd extracts the password from a text file * * storing passwords is often used with server environments * where promptin...
...multi- * password variant they could be of the form * * token_1_name:its_password * token_2_name:its_password * */ extern char * filepasswd(pk11slotinfo * slot, prbool retry, void *arg); /* * getmodulepassword */ extern char * getmodulepassword(pk11slotinfo *slot, int retry, void *pwdata); /* * generaterandom */ extern secstatus generaterandom(unsigned char *rbuf, int rsize); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * seedfromnoisefile */ extern secstatus seedfromnoisefile(const char *noisefilename); /* * filesize */ extern long filesize(const char* filename); /* * readderfromfile */ extern secstatus readderfromfile(secitem *der, ...
...->data[truelen++] = digit1 << 4 | digit2; } } else { while (*instring) { if (*instring == '\n') { instring++; continue; } outbuf->data[truelen++] = *instring++; } outbuf->data[truelen] = '\0'; truelen = truelen-1; } outbuf->len = truelen; return 0; } /* * filetoitem */ secstatus filetoitem(secitem *dst, prfiledesc *src) { prfileinfo info; print32 numbytes; prstatus prstatus; prstatus = pr_getopenfileinfo(src, &info); if (prstatus != pr_success) { return secfailure; } dst->data = 0; if (secitem_allocitem(null, dst, info.size)) { numbytes = pr_read(src, dst->data, info.size); if (numbytes == info.size) { ...
...And 3 more matches
nss tech note3
rtusagesslca ............... an intermediate or root ca cert allowed to issue ssl client or ssl server certs or other intermediate ssl ca certs. certusageemailsigner ......... used to verify s/mime email signatures certusageemailrecipient ...... used to encrypt s/mime emails. certusageobjectsigner ........ used to verify signatures on files of executable code, e.g. jar files. certusagestatusresponder ..... used by an ocsp responder certusageverifyca ............ a ca of any kind. each cert has a "type" and a "key usage", each of which may contain one or more valid values. each of the above seccertusages translates into a required set of cert type and key usage for the certificate itself, and into another set of required cert type and key usage for all the ca certs in the cert chai...
...or that cert usage, and all the ca certs in the cert chain must have the cert type and key usage required for ca certs for that cert usage. ...
...------ sslclient: digital_signature; ssl_client; sslserver: key_agreement or key_encipherment; ssl_server; sslserverwithstepup: govt_approved and ssl_server key_agreement or key_encipherment sslca: cert_sign; ssl_ca; emailsigner: digital_signature; email; emailrecipient: key_agreement or key_encipherment; email; objectsigner: digital_signature; object_signing; statusresponder: digital_signature; status_responder; verifyca cert_sign ssl_ca or email_ca or object_signing_ca or status_responder for ca certs in the cert chain, the requirements are: cert usage requried key usage required cert type -------------------- -------------------- ----------------------- sslserverwithstepup: govt_approved and cert_sign; ssl_ca; sslclient: ...
...And 3 more matches
NSS tools : modutil
Mozilla › Projects › NSS › tools › modutil
formed, there must be a set of security databases available. modutil can be used to create these files. the only required argument is the database that where the databases will be located. modutil -create -dbdir [sql:]directory adding a cryptographic module adding a pkcs #11 module means submitting a supporting library file, enabling its ciphers, and setting default provider status for various security mechanisms. this can be done by supplying all of the information through modutil directly or by running a jar file and install script. for the most basic case, simply upload the library: modutil -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] for example: modutil -dbdir sql:/home/my/sharednssdb -add "example pk...
...on about the pkcs #11 modules that are available to an application or server to use. the list of all modules, information about specific modules, and database configuration specs for modules can all be viewed. to simply get a list of modules in the database, use the -list command. ...
...st [modulename] -dbdir [sql:]directory listing the modules shows the module name, their status, and other associated security databases for certificates and keys. for example: modutil -list -dbdir sql:/home/my/sharednssdb listing of pkcs #11 modules ----------------------------------------------------------- 1. ...
...And 3 more matches
Using the Places history service
inavhistoryservice); it also responds to the old contract id for url bar autocomplete "@mozilla.org/autocomplete/search;1?name=history" and the contract id for the old history system (since it is backwards-compatible) "@mozilla.org/browser/global-history;2". ...
... it also responds to the old contract id for url bar autocomplete "@mozilla.org/autocomplete/search;1?name=history" and the contract id for the old history system (since it is backwards-compatible) "@mozilla.org/browser/global-history;2". ...
...ntract id for url bar autocomplete "@mozilla.org/autocomplete/search;1?name=history" and the contract id for the old history system (since it is backwards-compatible) "@mozilla.org/browser/global-history;2". ...
...And 3 more matches
nsIDBChangeListener
changed, aparentkey, aflags, ainstigator) {}, onhdradded: function(ahdrchanged, aparentkey, aflags, ainstigator) {}, onparentchanged: function(akeychanged, oldparent, newparent, ainstigator) {}, onannouncergoingaway: function(ainstigator) {}, onreadchanged: function(ainstigator) {}, onjunkscorechanged: function(ainstigator) {}, onhdrpropertychanged: function(ahdrtochange, aprechange, astatus, ainstigator) {}, onevent: function(adb, aevent) {}, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsidbchangelistener) && !aiid.equals(components.interfaces.nsisupports)) throw components.results.ns_error_no_interface; return this; } }; and to attach it in thunderbird, we must call addlistener on a nsidbchangeannouncer, typically through a...
... void onhdrflagschanged(in nsimsgdbhdr ahdrchanged, in unsigned long aoldflags, in unsigned long anewflags, in nsidbchangelistener ainstigator); pa...
... onjunkscorechanged(in nsidbchangelistener ainstigator); parameters ainstigator the caller who changed the junk score. this can be used to filter out events that you yourself started. ainstigator may also be null. onhdrpropertychanged() called in the general case where any field may have changed. onhdrpropertychanged is called twice per change. on the first call, aprechange is true, and astatus is undefined. onhdrpropertychanged saves any required status in astatus (such as a filter match). the calling function stores the value of astatus, changes the header ahdrtochange, then calls onhdrpropertychanged again with aprechange false. on this second call, the stored value of astatus is provided, so that any changes may be noted. void onhdrpropertychanged(in nsimsgdbhdr ahdrtochange, ...
...And 3 more matches
nsIDocumentLoader
obsolete since gecko 1.8 nsiloadgroup getloadgroup(); obsolete since gecko 1.8 boolean isbusy(); obsolete since gecko 1.8 ...
...obsolete since gecko 1.8 nsiloadgroup getloadgroup(); obsolete since gecko 1.8 boolean isbusy(); obsolete since gecko 1.8 void stop(); attributes attribute type description ...
...ox 1.5 / thunderbird 1.5 / seamonkey 1.0) void destroy(); parameters none. ...
...And 3 more matches
nsIProgressEventSink
the information is intended to be displayed to the user in some meaningful way. ...
...the information is intended to be displayed to the user in some meaningful way. an implementation of this interface can be passed to a channel via the channel's notificationcallbacks attribute. ...
...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. void onprogress( in nsirequest arequest, in nsisupports acontext, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters arequest the request ...
...And 3 more matches
nsIRequest
is 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. bits 0-15 are reserved. when added to a load group, this request's load flags are merged with the load flags of the load group. loadgroup nsiloadgroup the load grou...
... a load group, this request's load flags are merged with the load flags of the load group. loadgroup nsiloadgroup the load group of this request. while pending, the request is a member of the load group. it is the responsibility of the request to implement this policy. name autf8string the name of the request. often this is the uri of the request. read only. ...
...ad flags are merged with the load flags of the load group. loadgroup nsiloadgroup the load group of this request. while pending, the request is a member of the load group. it is the responsibility of the request to implement this policy. name autf8string the name of the request. often this is the uri of the request. read only. status nsresult the error status associated with the request. read only. constants various load flags which may be or'd together. constant value description load_normal 0 no special load flags. load_background 1 << 0 do not deliver status notifications to the nsiprogresseventsink, or keep this load from completing the nsiloadgroup it may belong to. the following flags ...
...And 3 more matches
Working with windows in chrome code
sing data to window when opening it with opendialog when you open a window using window.opendialog or nsiwindowwatcher.openwindow, you can pass an arbitrary number of arguments to that window. arguments are simple javascript objects, accessible through window.arguments property in the opened window. in this example, we're using window.opendialog to open a progress dialog. ...
...dialog. we pass in the current status text as well as the maximum and current progress values. note that using nsiwindowwatcher.openwindow is a bit less trivial . ...
...hrome://test/content/progress.xul", "myprogress", "chrome,centerscreen", {status: "reading remote data", maxprogress: 50, progress: 10} ); progress.xul: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window onload="onload();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script><![cdata[ var gstatus, gprogressmeter; var maxprogress = 100; function onload() { gstatus = document.getelementbyid("status"); gprogressmeter = document.getelementbyid("progressmeter"); if("arguments" in window && window.arguments.length > 0) { maxprogress = window.arguments[0].maxprogress; setprogress(window.arguments[0].progress); setstatus(window.arguments[0].status); } } function setprogress...
...And 3 more matches
CloseEvent - Web APIs
sockets when the connection is closed. this is delivered to the listener indicated by the websocket object's onclose attribute. constructor closeevent() creates a new closeevent. properties this interface also inherits properties from its parent, event. closeevent.code read only returns an unsigned short containing the close code sent by the server. ...
... 1000 normal closure normal closure; the connection successfully completed whatever purpose for which it was created. ...
... 1002 protocol error the endpoint is terminating the connection due to a protocol error. 1003 unsupported data the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data). 1004 reserved. a meaning might be defined in the future. 1005 no status received reserved. indicates that no status code was provided even though one was expected. 1006 abnormal closure reserved. used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. 1007 invalid frame payload data the endpoint is terminating the connection because a message was re...
...And 3 more matches
MutationObserverInit.attributeFilter - Web APIs
ame of one attribute whose value is to be monitored for changes. there is no default value. if this property exists on the options object when the mutationobserver() constructor is used to create a new mutationobserver, attribute monitoring is enabled regardless of whether or not the attributes property is true. example in this example, a mutation observer is set up to watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": switch(mutation.a...
...elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. ...
... a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. ...
...And 3 more matches
Pointer Lock API - Web APIs
xit the pointer lock. the pointerlockelement property is useful for determining if any element is currently pointer locked (e.g., for doing a boolean check) and also for obtaining a reference to the locked element, if any. 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. document.exitpointerlock = document.exitpointerlock || document.mozex...
...this is a simple event and contains no extra data. document...
...this is a simple event and contains no extra data. document.addeventlistener('pointerlockerror', lockerror, false); document.addeventlistener('mozpointerlockerror', lo...
...And 3 more matches
Synchronous and asynchronous requests - Web APIs
mlhttprequest, you receive a callback when the data has been received. this lets the browser continue to work as normal while your request is being handled. example: send a file to the console log this is the simplest usage of asynchronous xmlhttprequest. var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.readystate === 4) { if (xhr.status === 200) { console.log(xhr.responsetext); } else { console.error(xhr.statustext); } } }; xhr.onerror = function (e) { console.error(xhr.statustext); }; xhr.send(null); line 2 specifies true for its third parameter to indicate that the request should be handled asynchronously. line 3 creates an event handler function object and assigns it to the request's onload attribut...
...if an error occurred, an error message is displayed. line 15 actually initiates the request. the callback routine is called whenever the state of the request changes. example: writing a function to read an external file in some cases, you must read many external files. ...
... the request changes. example: writing a function to read an external file in some cases, you must read many external files. this is a standard function which uses the xmlhttprequest object asynchronously in order to switch the content of the read file to a specified listener. function xhrsuccess() { this.callback.apply(this, this.arguments); } function xhrerror() { console.error(this.statustext); } function loadfile(url, callback /*, opt_arg1, opt_arg2, ... */) { var xhr = new xmlhttprequest(); xhr.callback = callback; xhr.arguments = array.prototype.slice.call(arguments, 2); xhr.onload = xhrsuccess; xhr.onerror = xhrerror; xhr.open("get", url, true); xhr.send(null); } usage: function showmessage(message) { console.log(message + this.responsetext)...
...And 3 more matches
Getting Started - Developer guides
} else { // not ready yet. } the full list of the readystate values is documented at xmlhttprequest.readystate and is as follows: 0 (uninitialized) or (request not initialized) 1 (loading) or (server connection established) 2 (loaded) or (request received) 3 (interactive) or (processing request) 4 (complete) or (request finished and response is ready) next, check the http response status codes of the http response. the possible codes are listed at the w3c. in the following example, we differentiate between a successful and unsuccessful ajax call by checking for a 200 ok response code. if (httprequest.status === 200) { // perfect! } else { // there was a problem with the request. // for example, the response may have a 404 (not found) // or 500 (internal server er...
... following example, we differentiate between a successful and unsuccessful ajax call by checking for a 200 ok response code. if (httprequest.status === 200) { // perfect! } else { // there was a problem with the request. // for example, the response may have a 404 (not found) // or 500 (internal server error) response code. } after checking the state of the request and the http status code of the response, you can do whatever you want with the data the server sent. you have two options to access that data: httprequest.responsetext – returns the server response as a string of text httprequest.responsexml – returns the response as an xmldocument object you can traverse with javascript dom functions note that the steps above are valid only if you used an asynchronous re...
...kerequest() { httprequest = new xmlhttprequest(); if (!httprequest) { alert('giving up :( cannot create an xmlhttp instance'); return false; } httprequest.onreadystatechange = alertcontents; httprequest.open('get', 'test.html'); httprequest.send(); } function alertcontents() { if (httprequest.readystate === xmlhttprequest.done) { if (httprequest.status === 200) { alert(httprequest.responsetext); } else { alert('there was a problem with the request.'); } } } })(); </script> in this example: the user clicks the "make a request" button; the event handler calls the makerequest() function; the request is made and then (onreadystatechange) the execution is passed to alertcontents(); alertcontents() checks if ...
...And 3 more matches
Index of archived content - Archive of obsolete content
build building transformiix standalone chromeless compiling the npruntime sample plugin in visual studio creating a firefox sidebar extension creating a microsummary creating a mozilla extension adding the structure conclusion enabling the behavior - retrieving tinderbox status enabling the behavior - updating the status bar panel enabling the behavior - updating the status periodically finding the code to modify finding the file to modify making a mozilla installation modifiable making it into a dynamic overlay and packaging it up for distribution making it into a static overlay ...
... storage simple storage system clipboard ui selection jspage statusbar statusbar litmus tests mac os x build prerequisites/fink makefile.mozextension.2 message summary database metro browser chrome tests microsummary topics microsummary xml grammar reference m...
... standards-compliant authoring tools stopiteration styling the amazing netscape fish cam page using javascript generators in firefox window.importdialog() writing javascript for xhtml xforms building mozilla xforms community developing mozilla xforms implementation status mozilla xforms specials mozilla xforms user interface xforms alert element xforms group element xforms help element xforms hint element xforms input element xforms label element xforms message element xforms output element ...
...And 2 more matches
menubar - Archive of obsolete content
methods | related ] a container that usually contains menu elements. on the macintosh, the menubar is displayed along the top of the screen, and all non-menu related elements inside the menubar will be ignored. to look native (at least on windows), the menubar element needs to be placed inside a toolbox element. more information is available in the xul tutorial. ...
...usually contains menu elements. on the macintosh, the menubar is displayed along the top of the screen, and all non-menu related elements inside the menubar will be ignored. to look native (at least on windows), the menubar element needs to be placed inside a toolbox element. more information is available in the xul tutorial. ...
... <menuitem label="quit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes grippyhidden seamonkey only type: boolean when set to true, the grippy will be hidden. when set to false, the default, the grippy will be shown. ...
...And 2 more matches
Debug - Archive of obsolete content
n functions of the debug object display strings in the visual studio output window at run time. to debug internet explorer scripts, you must have a script debugger installed and the script must run in debug mode. internet explorer 8 and later versions include the javascript debugger. if the script is not being debugged, the debug methods and properties have no effect. ...
...n time. to debug internet explorer scripts, you must have a script debugger installed and the script must run in debug mode. internet explorer 8 and later versions include the javascript debugger. if the script is not being debugged, the debug methods and properties have no effect. constants async callback status codes contant description value debug.ms_async_callback_status_assign_delegate the synchronous work item assigned a callback or continuation to be run by an asynchronous operation. 0 debug.ms_async_callback_status_join the synchronous work item satisfied part of a join asynchronous operation. 1 debug.ms_async_callback_status_chooseany the synchronous work item satisfied a choice asynchronous operation. 2 debug.ms_...
...e the synchronous work item assigned a callback or continuation to be run by an asynchronous operation. 0 debug.ms_async_callback_status_join the synchronous work item satisfied part of a join asynchronous operation. 1 debug.ms_async_callback_status_chooseany the synchronous work item satisfied a choice asynchronous operation. 2 debug.ms_async_callback_status_cancel the synchronous work item was canceled. 3 debug.ms_async_callback_status_error the synchronous work item caused an error in an asynchronous operation. ...
...And 2 more matches
Implementing QueryInterface
ndinterface = ns_static_cast(nsiy*, this); // ...as many cases as needed... else if ( aiid.equals(nscomtypeinfo<nsisupports>::getiid()) ) foundinterface = ns_static_cast(nsisupports*, ns_static_cast(nsix*, this)); // i (may) have multiple |nsisupports| in me, // so first i cast to a specific base to avoid ambiguity else foundinterface = 0; nsresult status; if ( !foundinterface ) status = ns_nointerface; else { ns_addref(foundinterface); status = ns_ok; } *ainstanceptr = foundinterface; return status; } what's so good about it? it's clear and simple. ok. it has more than one return, but the primary return is at the end of the function as expected; and the additional return is clear and alo...
..._pointer; nsisupports* foundinterface; if ( aiid.equals(nscomtypeinfo<nsix>::getiid()) ) foundinterface = ns_static_cast(nsix*, this); else if ( aiid.equals(nscomtypeinfo<nsiy>::getiid()) ) foundinterface = ns_static_cast(nsiy*, this); // note: don't check for |nsisupports|; |nsbaseimplementation| will do that for me. ...
...terface = ns_static_cast(nsix*, this); else if ( aiid.equals(nscomtypeinfo<nsiy>::getiid()) ) foundinterface = ns_static_cast(nsiy*, this); // note: don't check for |nsisupports|; |nsbaseimplementation| will do that for me. else foundinterface = 0; nsresult status; if ( !foundinterface ) // ok, _i_ didn't find an interface. maybe my base class can. status = nsbaseimplementation::queryinterface(aiid, &foundinterface); else { ns_addref(foundinterface); status = ns_ok; } *ainstanceptr = foundinterface; return status; } note that if the base implementation's queryinterface finds an appropriate interface, your queryinterface must not addref it. this is reflected in the code above. this technique works becau...
...And 2 more matches
nss tech note4
maxusers ) }, { 0 } }; /* oid for my cert extension - replace 0xff with appropriate values*/ static const unsigned char myoid[] = { 0xff, 0xff, 0xff, 0xff, .... ...
...eger if secitem *item->len <=4, then int value = der_getinteger(item); interpreting a secitem value as a string use string copy functions to copy item->len bytes from item->data and null terminate explicitly some higher level extension functions get a specific extension from the list of extensions, given the extension tag secstatus cert_findcertextension (certcertificate *cert, int tag, secitem *value); get a specific extension from the issuer's cert secstatus cert_findissuercertextension (certcertificate *cert, int tag, secitem *value); get the value of an extension with the given oid secstatus cert_findcertextensionbyoid (certcertificate *cert, secitem *oid, secitem *value); ...
... specific extension from the issuer's cert secstatus cert_findissuercertextension (certcertificate *cert, int tag, secitem *value); get the value of an extension with the given oid secstatus cert_findcertextensionbyoid (certcertificate *cert, secitem *oid, secitem *value); get the decoded value of the "basic constraints" extension secstatus cert_findbasicconstraintexten (certcertificate *cert, certbasicconstraints *value); get value of the keyusage extension. this uses pr_alloc to allocate buffer for the decoded value, the caller should free up the storage allocated in value->data. ...
...And 2 more matches
NSS tools : signtool
r certificate db": adding signdir/meta-inf/manifest.mf to testjar.jar adding signdir/meta-inf/signtool.sf to testjar.jar adding signdir/meta-inf/signtool.rsa to testjar.jar tree "signdir" signed successfully 4. test the archive you just created. signtool -v testjar.jar using certificate directory: /u/jsmith/.netscape archive "testjar.jar" has passed crypto verification. status path ------------ ------------------- verified test.f using netscape signing tool with a zip utility to use netscape signing tool with a zip utility, you must have the utility in your path environment variable. you should use the zip.exe utility rather than pkzip.exe, which cannot handle long filenames. you can use a zip utility instead of the -z option to p...
...ds, that are available to signtool: signtool -d "c:\netscape\users\jsmith" -m using certificate directory: c:\netscape\users\username listing of pkcs11 modules ----------------------------------------------- 1. ...
...to sign with a smart card, you supply only the fully qualified name of the certificate. ...
...And 2 more matches
nsIBadCertListener2
security/manager/ssl/public/nsibadcertlistener2.idlscriptable this interface is used to is report a broken ssl status. it can also be used to obtain the ssl handshake status of a connection that will be canceled because of improper certificate status. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) replaces the obsolete nsibadcertlistener interface. method overview boolean notifycertproblem(in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite); methods notifycertproblem() called in case of a broken ssl status. ...
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) replaces the obsolete nsibadcertlistener interface. 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. ...
...targetsite the site name that was used to open the current connection. return value the consumer shall return true if it wants to suppress the error message related to the bad cert (the connection will still get canceled). ...
...And 2 more matches
nsIStringBundleService
this is typically a locale url, e.g. chrome://global/locale/global.properties return value a string bundle corresponding to the properties file. this string bundle has functions available on i...
...this is typically a locale url, e.g. chrome://global/locale/global.properties return value a string bundle corresponding to the properties file. this string bundle has functions available on it. on the return value ob...
...this is typically a locale url, e.g. chrome://global/locale/global.properties return value a string bundle corresponding to the properties file. this string bundle has functions available on it. on the return value object on you can call...
...And 2 more matches
nsITraceableChannel
aceablechannel.idlscriptable this interface is used to allow intercepting of http traffic. it is implemented by nsihttpchannel. 1.0 66 introduced gecko 1.9.0.4 inherits from: nsisupports last changed in gecko 1.9.0.4 the typical way to use this interface 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 nsistrea...
... = cc('@mozilla.org/binaryoutputstream;1', 'nsibinaryoutputstream', 'setoutputstream'); var storagestream = cc('@mozilla.org/storagestream;1', 'nsistoragestream', 'init'); function tracinglistener() { this.receivedchunks = []; // array for incoming data. ...
...d data as they come. ...
...And 2 more matches
nsIWebBrowserChrome2
embedding/browser/webbrowser/nsiwebbrowserchrome2.idlscriptable an extension to nsiwebbrowserchrome. 1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods setstatuswithcontext() called when the status text in the chrome needs to be updated. ...
... introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods setstatuswithcontext() called when the status text in the chrome needs to be updated. this method may be called instead of nsiwebbrowserchrome.setstatus(). an implementor of this method, should still implement nsiwebbrowserchrome.setstatus(). ...
... method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods setstatuswithcontext() called when the status text in the chrome needs to be updated. this method may be called instead of nsiwebbrowserchrome.setstatus(). an implementor of this method, should still implement nsiwebbrowserchrome.setstatus(). void setstatuswithcontext( in unsigned long statustype, in astring statustext, in nsisupports statuscontext ); parameters statustype indicates what is setting the text. statustext status string. null is an acceptable value meaning no status. statuscontext an object that provides context pertaining to the status type. ...
...And 2 more matches
Network request list - Firefox Developer Tools
ick a column divider to resize the column to the left of it to fit its contents. the reset columns command on the context menu also resets the width of the columns to the default values. clicking the column header label sorts the request list by that column. you can reset the sort to the default by selecting "reset sorting" from the context menu. here is a list of all available columns: status: the http status code returned. the numeric code is displayed on a colored background, to help unusual ones stand out. if there was no response, this column is empty. or you might see a red circle with a diagonal slash for responses that were blocked by the browser or the server. method: the http request method used. domain: domain of the path requested. if the request used ssl/tls and t...
...ed by the browser or the server. method: the http request method used. domain: domain of the path requested. if the request used ssl/tls and the connection had security weaknesses such as weak ciphers, you'll see a warning triangle next to the domain. y hover over the domain to see the ip address. there's an icon next to the domain that gives you extra information about the security status of that request. see security icons. file: the basename of the file requested. (starting in firefox 80) on the right edge of the file column, a turtle icon appears if the server waiting time exceeds a threshhold (default: 500 ms). a tooltip explains the problem. you can configure the threshhold in the configuration editor (about:config) by modifying the devtools.netmonitor.audits.slow...
... for example, "csp", "malware", "cors missing allow origin", "blocked by [name of extension]". size: the size of the transferred resource. image thumbnails if the request is for an image, hovering over its filename shows a preview of the image in a tooltip: security icons the network monitor displays an icon in the domain column: this gives you extra information about the security status of the request: icon meaning https weak https (for example, a weak cipher was used) failed https (for example, a certificate was invalid) http localhost indicates that the url belongs to a known tracker that would be blocked with content blocking enabled. timeline the request list also displays ...
...And 2 more matches
Geolocation API - Web APIs
.watchposition(). examples in the following example the geolocation api is used to retrieve the user's latitude and longitude. if sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...user's latitude and longitude. if sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...And 2 more matches
Ajax navigation example - Web APIs
st 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.status; switch (nstatus) { case 200: vmsg = json.parse(this.responsetext); document.title = opageinfo.title = vmsg.page; document.getelementbyid(stargetid).innerhtml = vmsg.content; if (bupdateurl) { history.pushstate(opageinfo, opageinfo.title, opageinfo.url); bupdat...
...his.responsetext); document.title = opageinfo.title = vmsg.page; document.getelementbyid(stargetid).innerhtml = vmsg.content; if (bupdateurl) { history.pushstate(opageinfo, opageinfo.title, opageinfo.url); bupdateurl = false; } break; default: vmsg = nstatus + ": " + (ohttpstatus[nstatus] || "unknown"); switch (math.floor(nstatus / 100)) { /* case 1: // informational 1xx console.log("information code " + vmsg); break; case 2: // successful 2xx console.log("s...
..."&" + sviewkey + "=" + sviewmode : "").slice(1)).replace(rendqstmark, ""); } function getpage (spage) { if (bisloading) { return; } or...
...And 2 more matches
MediaQueryList - Web APIs
sending notifications to listeners when the media query state changes (i.e. when the media query test starts or stops evaluating to true). this is very useful for adaptive design, since this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status. properties the mediaquerylist interface inherits properties from its parent interface, eventtarget. matchesread only a boolean that returns true if the document currently matches the media query list, or false if not. mediaread only a domstring representing a serialized media query. methods the mediaquerylist interface inherits methods from its parent interface, eventtarget. addl...
...eventtarget. matchesread only a boolean that returns true if the document currently matches the media query list, or false if not. mediaread only a domstring representing a serialized media query. methods the mediaquerylist interface inherits methods from its parent interface, eventtarget. ...
...this method has been kept for backward compatibility; if possible, you should generally use removeeventlistener() to remove change notification callbacks (which should have previously been added using addeventlistener()). ...
...And 2 more matches
Using the Notifications API - Web APIs
sts not triggered in response to a user gesture. firefox is already doing this from version 72, for example, and safari has done it for some time. in addition, in chrome and firefox you cannot request notifications at all unless the site is a secure context (i.e. https), and you can no longer allow notification permissions to be requested from cross-origin <iframe>s. checking current permission status you can check to see if you already have permission by checking the value of the notification.permission read only property. it can have one of three possible values: default the user hasn't been asked for permission yet, so notifications won't be displayed. granted the user has granted permission to display notifications, after having been asked previously. denied the user has explicitl...
...played. ...
... html: <button>notify me!</button> it's possible to handle multiple notifications this way: window.addeventlistener('load', function () { // at first, let's check if we have permission for notification // if not, let's ask for it if (window.notification && notification.permission !== "granted") { notification.requestpermission(function (status) { if (notification.permission !== status) { notification.permission = status; } }); } var button = document.getelementsbytagname('button')[0]; button.addeventlistener('click', function () { // if the user agreed to get notified // let's try to send ten notifications if (window.notification && notification.permission === "granted") { var i = 0; // using an interval cause some browsers (in...
...And 2 more matches
RTCPeerConnection.onicegatheringstatechange - Web APIs
closely monitor the state of ice gathering. syntax rtcpeerconnection.onicegatheringstatechange = eventhandler; value a function you provide which is passed a single parameter: an event object containing the icegatheringstatechange event. you can determine the new state of ice gathering by looking at the value of the rtcpeerconnection.icegatheringstate property. ...
...ject containing the icegatheringstatechange event. you can determine the new state of ice gathering by looking at the value of the rtcpeerconnection.icegatheringstate property. example this example updates status information presented to the user to let them know what's happening by examining the current value of the icegatheringstate property each time it changes and changing the contents of a status display based on the new information. ...
... you can determine the new state of ice gathering by looking at the value of the rtcpeerconnection.icegatheringstate property. example this example updates status information presented to the user to let them know what's happening by examining the current value of the icegatheringstate property each time it changes and changing the contents of a status display based on the new information. ...
...And 2 more matches
ARIA Test Cases - Accessibility
ing of events (like event_object_statechange) can be invoked from the examples. finally, a list of currently non-mapped aria roles is given. documenting and filing bugs review the information on how to file a bug on an aria implementation. when documenting an issue, please also list it in the relevant compatibility table below. when possible provide a link to the bug in the database so that its status can be reviewed. widget test cases alert simple alert complex alert real alert example with aria-required and aria-invalid -- type in a email address without an at sign to test the alert expected at behavior: a screen reader or screen magnifier must speak an alert when it becomes visible. a screen magnifier should move the current view to the alert or open a new panel with the alert ...
...l page. jawskey+ctrl+semicolon keystroke displays a list of landmarks in the current page. semicolon and shift+semicolon move to next landmark and move to previous landmark respectively. markup used: role = (one of the following): "application", "article", "banner", "complementary", "contentinfo", "directory", "document", "log", "main", "note", "navigation", "region", "search", "status" notes: screen readers may wish to provide some landmark-specific conveniences such as automatically starting at "main" when reading the page after page load, or providing a special key to get to the search bar, etc. results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 al: tested 2 and 4 with jaws 10.0.512u on nov 21, 2008 ...
... at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - live role: status (no examples yet) expected at behavior: screen readers often provide a special key to announce the current status. this key should present the contents of any "status" region. (al) a screen reader should announce changes inside a status as if they are marked with aria-live="polite", unless the author overrides that with a specific aria-live property on an ancestor of the node that changes. ...
...And 2 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
caret role_alert role_window [inserted by system] role_client [important] role_menupopup [important] role_menuitem [important] role_tooltip role_application role_document role_pane [important] role_chart role_dialog [semi-important, not currently used by all at's] role_border role_grouping role_separator [important] role_toolbar role_statusbar [important] role_table [important] role_columnheader role_rowheader role_column role_row role_cell [important] role_link [important] role_helpballoon role_character role_list [important] role_listitem [important] role_outline [important] role_outlineitem [important] role_pagetab [important] role_propertypage [important] role_indica...
...indow, so at products only look for it only when necessary. in fact, when a control has its own window, it's easy for a 3rd party application to know whether the object is disabled, focused, hidden, checked, etc. some assistive technologies will look for msaa if it doesn't already know that the given window class is used for something common. common examples are button, listbox, combobox, msctls_statusbar32, msctls_trackbar32, #32770 (dialog class), systreeview32, static, edit and richedit. other assistive technologies use a whitelist, and must list your window classes somewhere in their implementation, and then turn on msaa support when a window of that class receives focus. the window class is also used to determine a host of hard-coded behaviors, such as whether or not a screen reader will l...
...unfortunately, the msaa implemen...
...And 2 more matches
font - CSS: Cascading Style Sheets
Web › CSS › font
d for the following css properties: font-family font-size font-stretch font-style font-variant font-weight line-height syntax the font property may be specified as either a single keyword, which will select a system font, or as a shorthand for various font-related properties. if font is specified as a system keyword, it must be one of: caption, icon, menu, message-box, small-caption, status-bar. if font is specified as a shorthand for several font-related properties, then: it must include values for: <font-size> <font-family> it may optionally include values for: <font-style> <font-variant> <font-weight> <font-stretch> <line-height> font-style, font-variant and font-weight must precede font-size font-variant may only specify the values def...
...font-family'> see the font-family css property. system font values caption the system font used for captioned controls (e.g., buttons, drop-downs, etc.). icon the system font used to label icons. menu the system font used in menus (e.g., dropdown menus and menu lists). message-box the system font used in dialog boxes. small-caption the system font used for labeling small controls. status-bar the system font used in window status bars. prefixed system font keywords browsers often implement several more, prefixed, keywords: gecko implements -moz-window, -moz-document, -moz-desktop, -moz-info, -moz-dialog, -moz-button, -moz-pull-down-menu, -moz-list, and -moz-field. formal definition initial valueas each of the properties of the shorthand:font-style: normalfont-variant: normal...
... set the font family to sans-serif */ p { font: 12px/14px sans-serif } /* set the font size to 80% of the parent element or default value (if no parent element present). set the font family to sans-serif */ p { font: 80% sans-serif } /* se...
...And 2 more matches
HTTP Messages - HTTP
Web › HTTP › Messages
sages through config files (for proxies or servers), apis (for browsers), or other interfaces. the http/2 binary framing mechanism has been designed to not require any alteration of the apis or config files applied: it is broadly transparent to the user. 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. this start-line is always a single line. an optional set of http headers specifying the request, or describing the body included in the message. a blank line indicating all meta-information for the request has been sent. an optional body containing data associated with the request (like content of an html form), or the document associated with a response. th...
... the case with post requests (containing html form data). bodies can be broadly divided into two categories: single-resource bodies, consisting of one single file, defined by the two headers: content-type and content-length. multiple-resource bodies, consisting of a multipart body, each containing a different bit of information. this is typically associated with html forms. ...
...odies can be broadly divided into two categories: single-resource bodies, consisting of one single file, defined by the two headers: content-type and content-length. multiple-resource bodies, consisting of a multipart body, each containing a different bit of information. this is typically associated with html forms. http responses status line the start line of an http response, called the status line, contains the following information: the protocol version, usually http/1.1. a status code, indicating success or failure of the request. common status codes are 200, 404, or 302 a status text. a brief, purely informational, textual description of the status code to help a human understand the http message. a typical status line looks like: http/1.1 404 not found. headers http heade...
...And 2 more matches
HTTP range requests - HTTP
source. again, we can test a request by using curl. the "-h" option will append a header line to the request, which in this case is the range header requesting the first 1024 bytes. curl http://i.imgur.com/z4d4kwk.jpg -i -h "range: bytes=0-1023" the issued request looks like this: get /z4d4kwk.jpg http/1.1 host: i.imgur.com range: bytes=0-1023 the server responses with the 206 partial content status: http/1.1 206 partial content content-range: bytes 0-1023/146515 content-length: 1024 ... (binary content) the content-length header now indicates the size of the requested range (and not the full size of the image). the content-range response header indicates where in the full resource this partial message belongs. multipart ranges the range header also allows you to get multiple ranges at ...
... (and not the full size of the image). the content-range response header indicates where in the full resource this partial message belongs. multipart ranges the range header also allows you to get multiple ranges at once in a multipart document. the ranges are separated by a comma. curl http://www.example.com -i -h "range: bytes=0-50, 100-150" the server responses with the 206 partial content status and a content-type: multipart/byteranges; boundary=3d6b6a416f9b5 header, indicating that a multipart byterange follows. each part contains its own content-type and content-range fields and the required boundary parameter specifies the boundary string used to separate each body-part. http/1.1 206 partial content content-type: multipart/byteranges; boundary=3d6b6a416f9b5 content-length: 282 --3d6...
... to guarantee that the stored resource has not been modified since the last fragment has been received. the if-range http request header makes a range request conditional: if the condition is fulfilled, the range request will be issued and the server sends back a 206 partial content answer with the appropriate body. if the condition is not fulfilled, the full resource is sent back, with a 200 ok status. this header can be used either with a last-modified validator, or with an etag, but not with both. if-range: wed, 21 oct 2015 07:28:00 gmt partial request responses there are three relevant statuses, when working with range requests: in case of a successful range request, the 206 partial content status is sent back from a server. in case of a range request that is out of bounds (none of ...
...And 2 more matches
File I/O - Archive of obsolete content
le information and opening the file can still happen on the main thread and therefore block the ui for periods of time. this sample code uses netutil.jsm. so therefore for the first parameter, file, you can pass an nsifile object or a string (such as a jar path) see: netutil.asyncfetch: components.utils.import("resource://gre/modules/netutil.jsm"); netutil.asyncfetch(file, function(inputstream, status) { if (!components.issuccesscode(status)) { // handle error! return; } // the file data is contained within inputstream. // you can read it into a string with var data = netutil.readinputstreamtostring(inputstream, inputstream.available()); }); read with content type hint it's useful to provide a content type hint to prevent the file system from doing a potentially expensive...
...n this case an nsichannel object has to be explicitly created from the file: components.utils.import("resource://gre/modules/netutil.jsm"); // content type hint is useful on mobile platforms where the filesystem // would otherwise try to determine the content type. var channel = netutil.newchannel(file); channel.contenttype = "application/json"; netutil.asyncfetch(channel, function(inputstream, status) { ... }); writing to a file write a string this sample uses netutil.jsm and fileutils.jsm. components.utils.import("resource://gre/modules/netutil.jsm"); components.utils.import("resource://gre/modules/fileutils.jsm"); // file is nsifile, data is a string // you can also optionally pass a flags parameter here. it defaults to // fileutils.mode_wronly | fileutils.mode_create | fileutils.m...
...r ostream = fileutils.opensafefileoutputstream(file); var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"]. createinstance(components.interfaces.nsiscriptableunicodeconverter); converter.charset = "utf-8"; var istream = converter.converttoinputstream(data); // the last argument (the callback) is optional. netutil.asynccopy(istream, ostream, function(status) { if (!components.issuccesscode(status)) { // handle error! return; } // data has been written to the file. }); copy a stream to a file this function copies all of the data from an input stream to a file asyncronously. it overwrites the file if it is there, and if it is not there it creates a file then writes into it. it takes an nsiinputstream and an nsifile as arguments, and ...
...l never ever be any non-ascii text in data you can // also call fostream.write(data, data.length) directly var converter = components.classes["@mozilla.org/intl/converter-output-stream;1"]. createinstance(components.interfaces.nsiconverteroutputstream); converter.init(fostream, "utf-8", 0, 0); converter.writestring(data); converter.close(); // this closes fostream note: the file status flags used in the nsifileoutputstream.init() function are documented in pr_open. for more information refer directly to nsprpub/pr/include/prio.h writing a binary file for example, here we can write png data to a file. // pngbinary already exists var afile = components.classes["@mozilla.org/file/local;1"]. createinstance(components.interfaces.nsilocalfile); afile.initwithpath( "/t...
Progress Listeners - Archive of obsolete content
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 } }, onlocationchange: function(ap...
...; that is load event is confirmed // or when the user switches tabs. if you use mylistener for more than one tab/window, // use aprogress.domwindow to obtain the tab/window which triggered the change. ...
...when the user switches tabs. if you use mylistener for more than one tab/window, // use aprogress.domwindow to obtain the tab/window which triggered the change. ...
...spec); this.oldurl = auri.spec; }, // nsiwebprogresslistener queryinterface: xpcomutils.generateqi(["nsiwebprogresslistener", "nsisupportsweakreference"]), onlocationchange: function(aprogress, arequest, auri) { this.processnewurl(auri); }, onstatechange: function() {}, onprogresschange: function() {}, onstatuschange: function() {}, onsecuritychange: function() {} }; window.addeventlistener("load", function() { myextension.init() }, false); window.addeventlistener("unload", function() { myextension.uninit() }, false); note: if you use the same listener for more than one tab/window, use awebprogress.domwindow in the callback methods to obtain the tab/window which triggers the state change or event...
Updating addons broken by private browsing changes - Archive of obsolete content
require updating to work correctly in releases of firefox since the ones listed). idls nsitransferable: see using the clipboard for information about the new init method. imgicache: this must no longer be obtained as a service. see the imgicache article for more information. moziasyncfavicons/nsifaviconservice: setandfetchfaviconforpage/setandloadfaviconforpage now take a required privacy status argument, either nsifaviconservice.favicon_load_private or nsifaviconservice.favicon_load_non_private. nsiwebbrowserpersist: saveuri gained a new argument; see the nsiwebbrowserpersist docs for more information. nsicontentprefservice: getpref, setpref, haspref, hascachedpref, removepref, removegroupedprefs, removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext a...
...ice.favicon_load_private or nsifaviconservice.favicon_load_non_private. nsiwebbrowserpersist: saveuri gained a new argument; see the nsiwebbrowserpersist docs for more information. nsicontentprefservice: getpref, setpref, haspref, hascachedpref, removepref, removegroupedprefs, removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext argument to indicate the privacy status of the pref in question. use privatebrowsingutils.getprivacycontextfromwindow(win) to obtain it from the relevant window. nsidownloadmanager/nsidownload: integer download ids (and specifically the id property of nsidownload) are deprecated, and don't allow access to private downloads. all downloads now use guids, and contain a new guid property. nsidownload now has retry, cancel, remove, p...
...he global private browsing notifications in older versions). chrome apis openbrowserwindow: takes an optional parameter to indicate desired properties of the window. passing {private: true} will cause a private window to open, otherwise the window will always be non-private. use {private: privatebrowsingutils.iswindowprivate(window)} to open a window that matches the current window's privacy status. openlinkin: can receive an extra private boolean property in the parameter object. internalsave: takes a new required document argument (prior to the optional boolean and string arguments) indicating the document that originated the save action. gprivatebrowsingui: can no longer be used to control private browsing of any kind. any new private browsing session should be opened using open...
...n property in the parameter object. internalsave: takes a new required document argument (prior to the optional boolean and string arguments) indicating the document that originated the save action. gprivatebrowsingui: can no longer be used to control private browsing of any kind. any new private browsing session should be opened using openbrowserwindow, and any queries for private browsing status should use privatebrowsingutils.iswindowprivate(win) on a relevant window object. saveurl: takes a new required document argument indicating the source of the url being saved. ...
Conclusion - Archive of obsolete content
zilla will automatically detect that the file is an installer and ask you if you want to install the software. try installing the extension, restarting mozilla, and see if it works. if the version you created in this tutorial doesn't work, compare it to this working version to help figure out the problem. future directions for development of the tutorial and/or coursework: in addition to build status, tinderbox also tells you if the cvs tree is open or closed for check-ins. how would you use javascript to determine whether the tree is open or closed and css to style the icon accordingly? mozilla applications often store their css and image files in a separate skin subdirectory within the installation directory. how would you modify the xpi structure and installer script to install these fil...
...ermine whether the tree is open or closed and css to style the icon accordingly? mozilla applications often store their css and image files in a separate skin subdirectory within the installation directory. ...
...firefox has slightly different chrome registry requirements, so you may need to modify the contents.rdf files. for example, you need to change chrome://navigator/content/navigator.xul to chrome://browser/content/browser.xul. ...
...firefox has slightly different chrome registry requirements, so you may need to modify the contents.rdf files. for example, you need to change chrome://navigator/content/navigator.xul to chrome://browser/content/browser.xul. ...
Creating a Mozilla Extension - Archive of obsolete content
on firefox, but is also applicable to other new applications). a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection). this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). the extension will access tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. completing this tutorial will give you a basic understanding of how mozilla's user interface (ui) is constructed, how t...
...w to use mozilla's network library to load and parse web pages in javascript, and how to use dynamic overlays to package a mozilla extension for installation by others. ...
...d parse web pages in javascript, and how to use dynamic overlays to package a mozilla extension for installation by others. ...
... overlays to package a mozilla extension for installation by others. ...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
e a comment on that bug or send a message to the mailing list. parameters selector one or more css selectors. a string. examples: "a[href]", "a[href] > img", "a[href], img". return value a new contextmenuset object. jetpack.menu.context the feature's context menu. all of the feature's context menus are exposed through jetpack.menu.context, including slidebar, panel, toolbar, and status bar item context menus. a contextmenuset object. jetpack.menu.context.browser the chrome context menu. this is the context menu that appears when right-clicking on an element in firefox's interface, such as a bookmark on the bookmarks toolbar. a contextmenuset object. note: sometimes jetpack.menu.context.browser.on() does not work as expected. for example, jetpack.menu.context.browser.on("*").ad...
... icon: "http://example.com/ice-cream.png", menu: new jetpack.menu(["vanilla", "chocolate", "pistachio", null, "none"]), command: function (menuitem) jetpack.notifications.show(menuitem.label) }); add an item to the hyperlink context menu that tweets the link: jetpack.menu.context.page.on("a").add(function (context) { return { label: "tweet", command: function () jetpack.lib.twitter.statuses.update({ status: context.node.href }) }; )); add an item to the page's context menu depending on some complex criteria that can't be completely expressed via a css selector: jetpack.menu.context.page.beforeshow = function (menu, context) { menu.reset(); if (matchesmycriteria(context)) menu.add("match!"); }; add an item to both the hyperlink context menu and the image conte...
...contextmenu becomes the button's context menu. left-click the button to show ...
...contextmenu becomes the button's context menu. ...
Table Reflow Internals - Archive of obsolete content
quested) - the size it would like to be given no size constraints. desired size - the size it would like to be given the avail size. this is equivalent to preferred size if the avail size is not constrained. review of reflow the reflowee sets various sizes in the reflow metrics after (possibly) reflowing some or all of its children which reflows it children, etc. the reflowee returns a reflow status which indicates if it is complete, and thus not have to continue (split) breaking status (in the case of some inline frames) if there is truncation (it can't fit in the space and can't split). this is just a convience mechanism. kinds of reflows initial - reflowee's first reflow must be of this type (reflower's responsibility). resize - reflowee gets a change in available space only. similar...
...could also be inside a cell which is an observer special height reflow optimizations only frames needing 3rd pass actually get it frames gettting a 3rd pass only get it once intro to paginated reflow when a reflowee's available height is constrained, it may not fit and need to either split/continue on the next page, or start on the next page. if it can continue, it returns an incomplete status. if it can't continue it returns a complete status. a continuation may also need to be continued continuations are linked together by previnflow and nextinflow pointers pagination illustration nssimplepagesequence nspageframe nspagecontentframe areaframe (html) blockframe (body) nstableouterframe nstableouterframe ...
...right time. typically, a reflower accomplishes this by putting the continuation (c) on an overflow list which the reflower owns. when the reflower's continuation gets reflowed, it takes c and its siblings as children and reflows them. if the reflowee is complete, truncated (it didn't fit), not at the top of page, the reflower should put the reflowee on its overflow list and return an incomplete status. intro to paginated reflow special assumptions there are only initial and (possibly) resize reflows. incremental and style change reflows are not allowed. multiple resize reflows may be necessary (e.g. a child is truncated and gets reflowed on a subsequent page) but they should not change the available width from the last time. multiple resize reflows may require special handling if a frame sp...
...y need to "pull up" children from a continuation. table paginated reflow the block containing the outer table reflows it. if it is incomplete, the block will create a continuation for the outer table (which also creates a continuation for the table). put the continuation on a new line and place that line on its overflow lines property. the outer table reflows the table and just returns the status of the table. the table does a pass 1 reflow and balances. if it is incomplete, it will become the first-in-flow it will be the only frame among its continuations to ever balance or calc the cell map, and it only does this once table paginated reflow the table does a pass 2 reflow constraining both avail heights and widths. if a row group is incomplete, the table creates a continuation for ...
Using workers in extensions - Archive of obsolete content
« previous this article shows you how to use worker threads in extensions to perform tasks in the background without blocking the user interface. if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension updating an extension to support multiple mozilla applications download the sample you may download the complete example: download the example. 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 ...
...iple mozilla applications download the sample you may download the complete example: download the example. 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. that's all it does. every 10 minutes, it calls xmlhttprequest, and, when the res...
...r the main thread to specifically request that the worker update the stock information at once. the refreshinformation() method is fairly similar to the previous versions, with two notable exceptions: if the ticker symbol has not been set yet, an exception is thrown (lines 4-6). when the result is received from xmlhttprequest, instead of immediately updating the displayed information in the status bar, a message is sent to the main thread using the worker's postmessage() method. this is because only the main thread is allowed to access the user interface. the main thread the changes here are also relatively minor, but crucial. the startup() method this method is called when the extension is first loaded, and needs to be updated to start up and configure the worker. let's take a look: ...
...refs.setcharpref("symbol", newsymbol); this.worker.postmessage(this.tickersymbol); }, refreshinformation: function() { // empty message just means 'refresh'. this.worker.postmessage(""); }, the onworkermessage() method this method is called when the worker posts a message back to the main thread. its job is to update the ticker information that's currently displayed in the status bar, as well as to update the tooltip that appears while the mouse cursor is hovering over the ticker. this code is essentially identical to what's done in the previous version, except that it's done in response to an event instead of within the refreshinformation() method. a note about chromeworkers requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) gecko 2.0 added the n...
Track the score and win - Game development
nvas. to award a score each time a brick is hit, add a line to the collisiondetection() function to increment the value of the score variable each time a collision is detected. ...
...a collision is detected. ...
...e been destroyed? it's the main purpose of the game after all, so you should display a winning message if all available points have been collected. ...
...he following highlighted section into your collisiondetection() function: function collisiondetection() { for(var c=0; c<brickcolumncount; c++) { for(var r=0; r<brickrowcount; r++) { var b = bricks[c][r]; if(b.status == 1) { if(x > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; if(score == brickrowcount*brickcolumncount) { alert("you win, congratulations!"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } } } } } } thanks to this, your users can a...
Client-Server Overview - Learn web development
"insecure" as they can be changed by users and then resubmitted. as a result url parameters/get requests are not used for requests that update data on the server. post data. post requests add new resources, the data for which is encoded within the request body. client-side cookies. cookies contain session data about the client, including keys that the server can use to determine their login status and permissions/accesses to resources. web servers wait for client request messages, process them when they arrive, and reply to the web browser with an http response message. the response contains an http response status code indicating whether or not the request succeeded (e.g. "200 ok" for success, "404 not found" if the resource cannot be found, "403 forbidden" if the user isn't author...
...e=&user-twitter_url=&user-stackoverflow_url=&user-linkedin_url=&user-mozillians_url=&user-facebook_url= the main difference is that the url doesn't have any parameters. as you can see, the information from the form is encoded in the body of the request (for example, the new user fullname is set using: &user-fullname=hamish+willee). the response the response from the request is shown below. the status code of "302 found" tells the browser that the post succeeded, and that it must issue a second http request to load the page specified in the location field. the information is otherwise similar to that for the response to a get request. http/1.1 302 found server: apache x-backend-server: developer3.webapp.scl3.mozilla.com vary: cookie vary: accept-encoding content-type: text/html; charset=utf-8...
...s becomes larger. let's recap on how this works, by looking again at the static site architecture diagram we looked at in the last article. when a user wants to navigate to a page, the browser sends an http get request specifying the url of its html page. the server retrieves the requested document from its file system and returns an http response containing the document and an http response status code of "200 ok" (indicating success). the server might return a different status code, for example "404 not found" if the file is not present on the server, or "301 moved permanently" if the file exists but has been redirected to a different location. the server for a static site will only ever need to process get requests, because the server doesn't store any modifiable data. it also doesn't c...
...tional "internal" parameters to define which players are "best", and possibly also getting the identity of the logged in coach from a client-side cookie). the web application dynamically creates an html page by putting the data (from the database) into placeholders inside an html template. the web application returns the generated html to the web browser (via the web server), along with an http status code of 200 ("success"). if anything prevents the html from being returned then the web application will return another code — for example "404" to indicate that the team does not exist. the web browser will then start to process the returned html, sending separate requests to get any other css or javascript files that it references (see step 7). the web server loads static files from the fil...
Setting up your own test automation environment - Learn web development
started with lambdatest automation. you can also follow our documentation about running first selenium script in node js. note: if you don't want to write out the capabilities objects for your tests by hand, you can generate them using the selenium desired capabilities generator. ...
...selenium script in node js. note: if you don't want to write out the capabilities objects for your tests by hand, you can generate them using the selenium desired capabilities generator. filling in test details on lambdatest programmatically when executing numerous automation tests, marking their status as passed or failed makes the task a lot easier. use the below command for marking a status as passed on lambdatest. browser.executescript("lambda-status=passed");​​​​​​ use the below command for marking a status as failed on lambdatest. browser.executescript("lambda-status=failed");​​​​​​ browserstack getting selenium tests to run remotely on browserstack is easy. the code you need should follow the pattern seen below. let's write an example: ...
...our-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":"failed","reason":"google results showed wrong title"}}); } }); }); these are fairly intuitive — once the test completes, we s...
... console.log('test failed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":"failed","reason":"google results showed wrong title"}}); } }); }); these are fairly intuitive — once the test completes, we send an api call to browserstack to update the test with a passed or failed status, and a reason for the result. if you now go back to your browserstack automation dashboard page, you should see your test session available, as before, but with the updated data attached to it: sauce labs getting selenium tests to run remotely on sauce labs is also very simple, and very similar to browserstack albeit with a few syntactic differences. the code you need should follow the patte...
Listening to events on all tabs
a value composed of the security state flags and the security strength flags described in the documentation for nsiwebprogresslistener. onstatechange notification indicating the state has changed for one of the requests associated with awebprogress. void onstatechange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, unsigned long astateflags, nsresult astatus ); parameters abrowser the browser that fired the notification. awebprogress the nsiwebprogress instance that fired the notification. arequest the nsirequest that has changed state. this parameter may be null. need more information on what null means. astateflags flags indicating the new state. this value is a combination of one of the state transition flag...
...ification. arequest the nsirequest that has changed state. this parameter may be null. need more information on what null means. astateflags flags indicating the new state. this value is a combination of one of the state transition flags and one or more of the state type flags defined in the nsiwebprogresslistener documentation. any undefined bits are reserved for future use. astatus error status code associated with the state change; this indicates whether or not the request was successful. this parameter should be ignored unless astateflags includes the state_stop bit. note: astatus may be a success code even for server generated errors, such as the http 404 file not found error. in such cases, the request itself should be queried for extended error information (e.g.
...state change; this indicates whether or not the request was successful. this parameter should be ignored unless astateflags includes the state_stop bit. note: astatus may be a success code even for server generated errors, such as the http 404 file not found error. in such cases, the request itself should be queried for extended error information (e.g., for http requests see nsihttpchannel). onstatuschange notification that the status of a request has changed. the status message is intended to be displayed to the user (e.g., in the status bar of the browser). void onstatuschange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsresult astatus, prunichar *amessage ); parameters abrowser the browser that fired the notification. awebprogress ...
...yed to the user (e.g., in the status bar of the browser). void onstatuschange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsresult astatus, prunichar *amessage ); parameters abrowser the browser that fired the notification. awebprogress the nsiwebprogress instance that fired the notification. arequest the nsirequest that has new status. astatus this value is not an error code. instead, it is a numeric value that indicates the current status of the request. this interface does not define the set of possible status codes. note: some status values are defined by nsitransport and nsisockettransport. amessage localized text corresponding to astatus. onrefreshattempted notification that a refresh or redirect ...
AddonManager
hen a new version of the application has been detected. update_when_new_app_installed an update check performed after a new version of the application has been installed. update_when_periodic_update an update check performed automatically in the background. update_when_addon_installed an update check performed when a new add-on has been installed. ...
... update_when_new_app_installed an update check performed after a new version of the application has been installed. update_when_periodic_update an update check performed automatically in the background. update_when_addon_installed an update check performed when a new add-on has been installed. update status values constant description update_status_no_error no error was encountered. ...
...fter a new version of the application has been installed. update_when_periodic_update an update check performed automatically in the background. update_when_addon_installed an update check performed when a new add-on has been installed. update status values constant description update_status_no_error no error was encountered. update_status_timeout the update check timed out. ...
... update_when_periodic_update an update check performed automatically in the background. update_when_addon_installed an update check performed when a new add-on has been installed. update status values constant description update_status_no_error no error was encountered. update_status_timeout the update check timed out. update_status_download_error there was an error while downloading the update information. update_status_parse_error the update information was malformed in some way. update_status_unknown_format the update was not in any known format. update_status_security_error the update information was not correctly signed or there was an ssl error. auto update values ...
TimerFirings logging
f logging output per timer fired. it's best to redirect this output to a file. the following sample shows the basics of this output. -991946880[7f46c365ba00]: [6775] fn timer (slack 100 ms): layeractivitytracker -991946880[7f46c365ba00]: [6775] fn timer (one_shot 250 ms): presshell::spaintsuppressioncallback -991946880[7f46c365ba00]: [6775] fn timer (one_shot 160 ms): nsbrowserstatusfilter::timeouthandler -991946880[7f46c365ba00]: [6775] iface timer (one_shot 200 ms): 7f46964d7f80 -1340643584[7f46c365ec00]: [6775] obs timer (slack 1000 ms): 7f46a95a0200 each line has the following information. the first two values identify the thread. this is not especially useful. the next value is the process id (pid). this is useful in a multi-process scenario. next is the t...
... it is sometimes useful to pre-process the output by stripping out certain parts of each line before doing this aggregation step, for example, by inserting one or more of the following commands in...
...mt_exid=9&mt_inapp=0&mt_uuid=353d5460-19f6-4400-9bbd-d0fcc3bcf595&mt_3pck=http%3a//beacon-apac-hkg1.rubiconproject.com/beacon/t/d1f9921d-4e47-448f-b6ba-36cae1c31b65/&redirect=;ord=2744535504761193354?:83:0 94 801266240[7f7c1f248000]: [7163] fn timer (one_shot 160 ms): nsbrowserstatusfilter::timeouthandler 92 -495057024[7f74e105ba00]: [7108] fn timer (one_shot 160 ms): nsbrowserstatusfilter::timeouthandler the first column shows how many times the particular line appeared. it is sometimes useful to pre-process the output by stripping out certain parts of each line before doing this aggregation step, for example, by inserting one or more of the following commands into the command pipeline. sed 's/^[^:]\+: //' # strip thread ids sed 's/\[[0-9]\+\] //' # strip...
...nd pipeline. sed 's/^[^:]\+: //' # strip thread ids sed 's/\[[0-9]\+\] //' # strip process ids sed 's/ \+[0-9]\+ ms//' # strip timer periods the following is the previous sample output with all three of these commands added into the pipeline. ...
NSS 3.15 release notes
, which is a minor release. distribution information the hg tag is nss_3_15_rtm. nss 3.15 requires nspr 4.10 or newer. 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. tls client applications may enable this via a call to ssl_optionsetdefault(ssl_enable_ocsp_stapling, pr_true); added function secitem_reallocitemv2. it replaces function secitem_reallocitem, which is now declared as obsolete. support for single-operation (eg: not multi-part) symmetric key encryption and decryption, via pk11_encrypt a...
...s now declared as obsolete. support for single-operation (eg: not multi-part) symmetric key encryption and decryption, via pk11_encrypt and pk11_decrypt. certutil has been updated to support creating name constraints extensions. new functions in ssl.h ssl_peerstapledocspresponse - returns the server's stapled ocsp response, when used with a tls client socket that negotiated the status_request extension. ssl_setstapledocspresponses - set's a stapled ocsp response for a tls server socket to return when clients send the status_request extension. in ocsp.h cert_postocsprequest - primarily intended for testing, permits the sending and receiving of raw ocsp request/responses. in secpkcs7.h sec_pkcs7verifydetachedsignatureattime - verif...
... for aes-gcm. pk11_encrypt - performs encryption as a single pkcs#11 operation (eg: not multi-part). this is necessary for aes-gcm. new types in secitem.h secitemarray - represents a variable-length array of secitems. new macros in ssl.h ssl_enable_ocsp_stapling - used with ssl_optionset to configure tls client sockets to request the certificate_status extension (eg: ocsp stapling) when set to pr_true notable changes in nss 3.15 secitem_reallocitem is now deprecated. please consider using secitem_reallocitemv2 in all future code. nss has migrated from cvs to the mercurial source control management system. updated build instructions are available at migration to hg as part of this migration, the source code directory l...
... migrated from cvs to the mercurial source control management system. updated build instructions are available at migration to hg as part of this migration, the source code directory layout has been re-organized. the list of root ca certificates in the nssckbi module has been updated. the default implementation of ssl_authcertificate has been updated to add certificate status responses stapled by the tls server to the ocsp cache. applications that use ssl_authcertificatehook to override the default handler should add appropriate calls to ssl_peerstapledocspresponse and cert_cacheocspresponsefromsidechannel. bug 554369: fixed correctness of cert_cacheocspresponsefromsidechannel and other ocsp caching behaviour. bug 853285: fixed bugs in aes gcm. bug 341127...
NSS Sample Code Sample1
// if there is one, no further action is required. rv = getprivatekey(&prvkey); if (rv == 0 && prvkey) goto done; rv = 0; // these could be parameters to the init function rsaparams.keysizeinbits = 1024; rsaparams.pe = 65537; slot = pk11_getinternalkeyslot(); if (!slot) { rv = 1; goto done; } prvkey = pk11_gene...
...ey(seckeypublickey **pubkey) { int rv; seckeyprivatekey *prvkey = 0; rv = getprivatekey(&prvkey); if (rv) goto done; *pubkey = seckey_converttopublickey(prvkey); if (!*pubkey) { rv = 1; goto done; } done: if (prvkey) seckey_destroyprivatekey(prvkey); return rv; } int server::wrapkey(pk11symkey *key, seckeypublickey *pubkey, secitem **ret) { int rv = 0; secitem *data; secstatus s; data = (secitem *)port_zalloc(sizeof(secitem)); if (!data) { rv = 1; goto done; } // allocate space for output of wrap data->len = seckey_publickeystrength(pubkey); data->data = new unsigned char[data->len]; if (!data->data) { rv = 1; goto done; } s = pk11_pubwrapsymkey(ckm_rsa_pkcs, pubkey, key, data); if (s != secsuccess) { rv = 1; goto done; } *ret = data; data = 0; ...
..._pkcs, pubkey, key, data); if (s != secsuccess) { rv = 1; goto done; } *ret = data; data = 0; done: if (data) secitem_freeitem(data, pr_true); return rv; } // example of how to do a raw export (no wrapping of a key) // this should not be used. use the rsa-based wrapping // methods instead. int server::rawexportkey(pk11symkey *key, secitem **res) { int rv = 0; secitem *data; secstatus s; s = pk11_extractkeyvalue(key); if (s != secsuccess) { rv = 1; goto done; } data = pk11_getkeydata(key); *res = secitem_dupitem(data); if (!*res) { rv = 1; goto done; } done: return rv; } // initialize the nss library. normally this // would be done as part of each server's startup. // however, this example uses the same databases // to store keys for server in the "cluster" so...
...ess) { rv = 1; goto done; } data = pk11_getkeydata(key); *res = secitem_dupitem(data); if (!*res) { rv = 1; goto done; } done: return rv; } // initialize the nss library. normally this // would be done as part of each server's startup. // however, this example uses the same databases // to store keys for server in the "cluster" so // it is done once. ...
NSS Sample Code Sample_1_Hashing
printashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
...ntashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
..., digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
...null; char *progname = strrchr(argv[0], '/'); progname = progname ? ...
NSS Sample Code Utilities_1
->data[truelen++] = digit1 << 4 | digit2; } } else { while (*instring) { if (*instring == '\n') { instring++; continue; } outbuf->data[truelen++] = *instring++; } outbuf->data[truelen] = '\0'; truelen = truelen-1; } outbuf->len = truelen; return 0; } /* * filetoitem */ secstatus filetoitem(secitem *dst, prfiledesc *src) { prfileinfo info; print32 numbytes; prstatus prstatus; prstatus = pr_getopenfileinfo(src, &info); if (prstatus != pr_success) { return secfailure; } dst->data = 0; if (secitem_allocitem(null, dst, info.size)) { numbytes = pr_read(src, dst->data, info.size); if (numbytes == info.size) { ...
...password); case pw_fromfile: pw = filepasswd(slot, retry, pwdata->data); pwdata->source = pw_plaintext; pwdata->data = pl_strdup(pw); return pw; case pw_plaintext: return pl_strdup(pwdata->data); default: break; } pr_fprintf(pr_stderr, "password check failed: no password found.\n"); return null; } /* * generaterandom */ secstatus generaterandom(unsigned char *rbuf, int rsize) { char meter[] = { "\r| |" }; int fd, count; int c; secstatus rv = secsuccess; cc_t orig_cc_min; cc_t orig_cc_time; tcflag_t orig_lflag; struct termios tio; fprintf(stderr, "to generate random n...
...n\nfinished. ...
... return secfailure; } do { count = pr_read(fd,buf,sizeof(buf)); if (count > 0) { pk11_randomupdate(buf,count); } } while (count > 0); pr_close(fd); return secsuccess; } /* * filesize */ long filesize(const char* filename) { struct stat stbuf; stat(filename, &stbuf); return stbuf.st_size; } /* * readderfromfile */ secstatus readderfromfile(secitem *der, const char *infilename, prbool ascii) { secstatus rv = secsuccess; prfiledesc *infile = null; infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "failed to open file \"%s\" (%ld, %ld).\n", infilename, pr_geterror(), pr_getoserror()); rv = secfailure; goto cleanup; } ...
NSS Sample Code sample3
* this code uses the simplest of the init functions, which does no...
... int i; cout << "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here. * this code uses the simplest of the init functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl...
... /* initialize nss * if your application code has already initialized nss, you can skip it * here. ...
... s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; done: if (context) pk11_destroycontext(context, pr_true); /* freeit ?? */ if (key) pk11_freesymkey(key); if (slot) pk11_freeslot(slot); return status; } ...
Hashing - sample 1
printashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
...ntashex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
..., digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it * to another file. it illustrates the use of nss message * apis. ...
...null; char *progname = strrchr(argv[0], '/'); progname = progname ? ...
sample1
shex(outfile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it to another file. it illustrates the use of nss message apis. ...
...ile, digest, len); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it to another file. it illustrates the use of nss message apis. ...
...); } while (0); /* cleanup */ if (hashcontext != null) hash_destroy(hashcontext); return secsuccess; } /* * this sample computes the hash of a file and saves it to another file. it illustrates the use of nss message apis. ...
...ashname = null; char *progname = strrchr(argv[0], '/'); progname = progname ? ...
Python binding for NSS
nss.certverifylognode nss.certverifylog error.certverifyerror (exception) nss.authorityinfoaccess nss.authorityinfoaccesses the following class methods were added: nss.certificate.is_ca_cert nss.certificate.verify nss.certificate.verify_with_log nss.certificate.get_cert_chain nss.certificate.check_ocsp_status nss.pk11slot.list_certs nss.certverifylognode.format_lines nss.certverifylog.format_lines nss.crldistributionpts.format_lines the following class properties were added: nss.certverifylognode.certificate nss.certverifylognode.error nss.certverifylognode.depth nss.certverifylog.count the following mod...
...it was never correct to derive from en...
...twork byte order requirements when accessing the port inside a prnetaddr and simplify accessing the ipv4 vs. ipv6 port variants. replace the use of pr_initializenetaddr() with pr_setnetaddr(), the later properly handles ipv6, the former did not. rename networkaddress.addr to networkaddress.pr_netaddr for naming consistency. update hostentry documentation to indicate it's deprecated status. remove redundant implementation of networkaddress_new_from_prnetaddr from py_ssl.c and properly import the implementation from py_nspr_io.c. the following other non-ipv6 fixes were also made because they were discovered while doing the ipv6 work: move definition of type_ready to py_nspr_common.h so it can be shared. update all modules to utilize it. replace incorrect use of f...
...port to mozilla cvs, tweak directory layout release 0.2.0 release date 2009-05-21 scm tag source download change log general modifications: apply patch from red hat bug #472805, (miloslav trmač) don't allow closing a socket twice, that causes crashes. ...
sslerr.html
eters." ssl_error_unsupported_extension_alert -12184 "ssl peer does not support requested tls hello extension." ssl_error_certificate_unobtainable_alert -12183 "ssl peer could not obtain your certificate from the supplied url." ssl_error_unrecognized_name_alert -12182 "ssl peer has no certificate for the requested dns name." ssl_error_bad_cert_status_response_alert -12181 "ssl peer was unable to get an ocsp response for its certificate." ssl_error_bad_cert_hash_value_alert -12180 "ssl peer reported bad certificate hash value." unspecified errors that occurred while attempting some operation: all the error codes in the following block describe the operation that was being attempted at the time of the uns...
...." sec_error_crl_not_yet_valid -8078 "the certificate revocation list for this certificate is not yet valid." sec_error_unknown_cert -8077 "the requested certificate could not be found." sec_error_unknown_signer -8076 "the signer's certificate could not be found." sec_error_cert_bad_access_location -8075 "the location for the certificate status server has invalid format." sec_error_ocsp_unknown_response_type -8074 "the ocsp response cannot be fully decoded; it is of an unknown type." sec_error_ocsp_bad_http_response -8073 "the ocsp server returned unexpected/invalid http data." sec_error_ocsp_malformed_request -8072 "the ocsp server found the request to be corrupted or improperly formed." ...
...experienced an internal error." sec_error_ocsp_try_server_later -8070 "the ocsp server suggests trying again later." sec_error_ocsp_request_needs_sig -8069 "the ocsp server requires a signature on this request." sec_error_ocsp_unauthorized_request -8068 "the ocsp server has refused this request as unauthorized." sec_error_ocsp_unknown_response_status -8067 "the ocsp server returned an unrecognizable status." sec_error_ocsp_unknown_cert -8066 "the ocsp server has no status for the certificate." sec_error_ocsp_not_enabled -8065 "you must enable ocsp before performing this operation." sec_error_ocsp_no_default_responder -8064 "you must set the ocsp default responder before performing this operat...
...rming this operation." sec_error_ocsp_no_default_responder -8064 "you must set the ocsp default responder before performing this operation." sec_error_ocsp_malformed_response -8063 "the response from the ocsp server was corrupted or improperly formed." sec_error_ocsp_unauthorized_response -8062 "the signer of the ocsp response is not authorized to give status for this certificate." sec_error_ocsp_future_response -8061 "the ocsp response is not yet valid (contains a date in the future)." sec_error_ocsp_old_response -8060 "the ocsp response contains out-of-date information." sec_error_digest_not_found -8059 "the cms or pkcs #7 digest was not found in signed message." sec_error_unsupported_message_typ...
ssltyp.html
ed with the functions described in the rest of this document, and how to manage the memory used for them. additional types are described with the functions that use them or in the header files. types and structures managing secitem memory types and structures these types and structures are described here: certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus additional types used by a single function only are described with the function's entry in each chapter. some of these functions also use types defined by nspr and described in the nspr reference. <a name="> many of the structures presented here (certcertdbhandle, certcertificate, pk11slotinfo, and seckeyprivatekey) are opaque--that is, they are types defined as structures (for example, certcert...
... key structures are not shared objects. when an application makes a copy of a particular key structure that already exists in memory, ssl makes a deep copy--that is, it makes a whole new copy of that object. when you call seckey_destroyprivatekey, the function both frees the memory and sets all the bits to zero. never alter the contents of a key structure. treat the structure as read only. secstatus the return value for many ssl functions. syntax #include <seccomon.h> typedef enum { secwouldblock = -2, secfailure = -1, secsuccess = 0 } secstatus; enumerators the enum includes the following enumerators: secwouldblock reserved for internal use. secfailure the operation ...
...ion succeeded. in this case the value returned by pr_geterror is meaningless. managing secitem memory these functions are available for managing the memory associated with secitem structures and the structures to which they point. secitem_freeitem secitem_zfreeitem secitem_freeitem frees the memory associated with a secitem structure. syntax #include <prtypes.h> secstatus secitem_freeitem ( secitem *item, prbool freeitem) parameter this function has the following parameter: item a pointer to a secitem structure. freeitem when pr_false, free only the structure pointed to. otherwise, free both the structure pointed to and the secitem structure itself. ...
...ecfailure. use pr_geterror to retrieve the error code. description this function frees the memory associated with the structure to which the specified item points, when that structure is no longer used. when freeitem is not pr_false, also frees the item structure itself. secitem_zfreeitem zeroes and frees the memory associated with a secitem structure. syntax #include <prtypes.h> secstatus secitem_zfreeitem ( secitem *item, prbool freeitem) parameter this function has the following parameter: item a pointer to a secitem structure. freeitem when pr_false, free only the structure pointed to. otherwise, free both the structure pointed to and the secitem structure itself. ...
NSS Tools modutil
ional, those without square brackets are required. ...
...] adding a pkcs #11 module from an existing jar file: -jar jar-file -installdir root-installation-directory [-tempdir temporary-directory] deleting a specific pkcs #11 module from a security module database: -delete modulename initializing or changing a token's password: -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] setting the default provider status of various security mechanisms in an existing pkcs #11 module: -default modulename -mechanisms mechanism-list clearing the default provider status of various security mechanisms in an existing pkcs #11 module: -undefault modulename -mechanisms mechanism-list enabling a specific slot or all slots within a module: -enable modulename [-slot slotname] disabling a specific slot or all s...
... file: **internal only module**manufacturer: netscape communications corp description: communicator internal crypto svcpkcs #11 version 2.0library version: 4.0cipher enable flags: nonedefault mechanism flags: rsa:dsa:rc2:rc4:des:sha1:md5:md2slot: communicator internal cryptographic services version 4.0manufacturer: netscape communications corp type: softwareversion number: 4.1firmware version: 0.0status: enabledtoken name: communicator generic crypto svcstoken manufacturer: netscape communications corp token model: libsec 4.0 token serial number: 0000000000000000token version: 4.0token firmware version: 0.0access: write protectedlogin type: public (no login required)user pin: not initializedslot: communicator user private key and certificate servicesmanufacturer: netscape communications corp typ...
...cstoken manufacturer: netscape communications corp token model: libsec 4.0 token serial number: 0000000000000000token version: 4.0token firmware version: 0.0access: write protectedlogin type: public (no login required)user pin: not initializedslot: communicator user private key and certificate servicesmanufacturer: netscape communications corp type: softwareversion number: 3.0firmware version: 0.0status: enabledtoken name: communicator certificate db token manufacturer: netscape communications corp token model: libsec 4.0 token serial number: 0000000000000000token version: 7.0token firmware version: 0.0access: not write protectedlogin type: login requireduser pin: not initialized setting a default provider this example makes the specified module a default provider for the rsa, dsa, and rc2...
JS_AddFinalizeCallback
k(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback. cb jsfinalizecallback pointer to the new callback function to use. data void * passed to data parameter for jsfinalizecallback. ...
...n rt jsruntime * the jsruntime for which to set the finalization callback. cb jsfinalizecallback pointer to the new callback function to use. data void * passed to data parameter for jsfinalizecallback. callback syntax typedef enum jsfinalizestatus { jsfinalize_group_start, jsfinalize_group_end, jsfinalize_collection_end } jsfinalizestatus; typedef void (* jsfinalizecallback)(jsfreeop *fop, jsfinalizestatus status, bool iscompartment, void *data); name type description fop jsfreeop * a pointer to an instance of jsfreeop. status jsfinalizestatus one of the jsfinalizestatus constants, described below, indicating the stage of finalize. iscompartment bool false if all compa...
...e if a compartment is being collected. data void * data parameter specified in js_addfinalizecallback. added in spidermonkey 38 name description jsfinalize_group_start called when preparing to sweep a group of compartments, before anything has been swept. the collector will not yield to the mutator before calling the callback with jsfinalize_group_end status. jsfinalize_group_end called when preparing to sweep a group of compartments. weak references to unmarked things have been removed and things that are not swept incrementally have been finalized at this point. the collector may yield to the mutator after this point. jsfinalize_collection_end called at the end of collection when everything has been swept. description...
...callback function to add. js_removefinalizecallback removes the previously added callback function. obsolete since jsapi 32 js_setfinalizecallback sets a new callback function. it was replaced with js_addfinalizecallback, to allow adding multiple callback functions. ...
imgIDecoderObserver
called when there is more to paint. void ondataavailable( in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect ); param...
...called when there is more to paint. void ondataavailable( in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect ); parameters arequest...
...in imgirequest arequest ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. onstartcontainer() this load notification is called once enough data has been loaded from the network that we were able to parse the width and height from the image. by the time this callback is been called, the size has been set on the container and status_size_available has been set on the associated imgrequest. void onstartcontainer( in imgirequest arequest, in imgicontainer acontainer ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. acontainer missing description onstartdecode() this decode notification is called as soon as the image begins getting decoded. t...
...hear about) are failures to instantiate the decoder (<img src="foo.html"> for example). thus, currently this is just a companion to onstoprequest to signal success or failure. you probably want onstopcontainer instead. this will be revisited in bug 505385. if you're thinking of doing something new with this, please talk to bholley first. void onstopdecode( in imgirequest arequest, in nsresult status, in wstring statusarg ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. status missing description statusarg missing description onstopframe() a decode notification that is called when a frame is finished decoding. void onstopframe( in imgirequest arequest, in unsigned long aframe ); parameters ...
nsICookie
ied) of the cookie. read only. isdomain boolean true if the cookie is a domain cookie, false otherwise. read only. issecure boolean true if the cookie was transmitted over ssl, false otherwise. read only. name acstring the name of the cookie. read only. path autf8string the path pertaining to the cookie. read only. policy nscookiepolicy holds the sites compact policy value. read only. ...
...kie. read only. isdomain boolean true if the cookie is a domain cookie, false otherwise. read only. issecure boolean true if the cookie was transmitted over ssl, false otherwise. read only. name acstring the name of the cookie. read only. path autf8string the path pertaining to the cookie. read only. policy nscookiepolicy holds the sites compact policy value. read only. ...
...omain boolean true if the cookie is a domain cookie, false otherwise. read only. issecure boolean true if the cookie was transmitted over ssl, false otherwise. read only. name acstring the name of the cookie. read only. path autf8string the path pertaining to the cookie. read only. policy nscookiepolicy holds the sites compact policy value. read only. status nscookiestatus holds the p3p status of cookie. read only. value acstring the cookie value. read only. constants constant value description status_unknown 0 the cookie collected in a previous session, and its information no longer exists. available status_accepted 1 the cookie was accepted. status_downgraded 2 the cookie was accepted but downgraded to a session cookie. status_flagged 3 the cookie was not accepted. ...
... policy_unknown 0 the cookie collected in a previous session, and its information no longer available. policy_none 1 the site did not send a compact policy along with the cookie. ...
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. inherits from: nsichannel last changed in gecko 1.3 to create an 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); boole...
... this attribute may only be set before the channel is opened. exceptions thrown ns_error_failure if set after the channel has been opened. redirectionlimit unsigned long this attribute specifies the number of redirects this channel is allowed to make. if zero, the channel will fail to redirect and will generate a ns_error_redirect_loop failure status. note: an http redirect results in a new channel being created. if the new channel supports nsihttpchannel, then it will be assigned a value to its redirectionlimit attribute one less than the value of the redirected channel's redirectionlimit attribute. the initial value for this attribute may be a configurable preference (depending on the implementation). referrer ...
...owever, after setting the upload data, it may be necessary to set the request method explicitly. the documentation for nsiuploadchannel has further details. exceptions thrown ns_error_in_progress if set after the channel has been opened. requestsucceeded boolean returns true if the http response code indicates success. the value of nsirequest.status() will be ns_ok even when processing a 404 file not found response because such a response may include a message body that (in some cases) should be shown to the user. use this attribute to distinguish server error pages from normal pages, instead of comparing the response status manually against the set of valid response codes, if that is required by your application. read only. exceptions ...
...be shown to the user. use this attribute to distinguish server error pages from normal pages, instead of comparing the response status manually against the set of valid response codes, if that is required by your application. read only. exceptions thrown ns_error_not_available if called before the response has been received (before onstartrequest()). responsestatus unsigned long get the http response code (for example 200). read only. exceptions thrown ns_error_not_available if called before the response has been received (before onstartrequest()). responsestatustext acstring get the http response status text (for example "ok"). note: this returns the raw (possibly 8-bit) text from the server.
nsIMsgDBView
init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void sort(in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder); void docommand(in nsmsgviewcommandtypevalue command); void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); void getcommandstatus(in nsmsgviewcommandtypevalue command, out boolean selectable_p, out nsmsgviewcommandcheckstatevalue selected_p); void viewnavigate(in nsmsgnavigationtypevalue motion, out nsmsgkey resultid, out nsmsgviewindex resultindex, out nsmsgviewindex threadindex, in boolean wrap); boolean navigatestatus(in nsmsgnavigationtypevalue motion); nsmsgkey getkeyat(in nsmsgviewindex inde...
...dler getcolumnhandler(in astring acolumn); attributes attribute type description viewtype nsmsgviewtypevalue readonly: type of view. constants are defined in nsmsgviewtype. viewflags nsmsgviewflagstypevalue constants are defined in nsmsgviewflagstype. sorttype nsmsgviewsorttypevalue the type of sort being used (i.e. author, date, status, etc). sort types are defined in nsmsgviewsorttype. sortorder nsmsgviewsortordervalue readonly: constants are defined in nsmsgviewsortorder. keyforfirstselectedmessage nsmsgkey readonly: the key of the first message in the current selection. nsmsgkey is defined as an unsigned long in mailnewstypes2.idl. viewindexforfirstselectedmsg nsmsgviewindex reado...
...withfolder() perform a command that requires a folder. typical examples are move or copy commands. void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); parameters command the nsmsgviewcommandtypevalue to perform. defined in the interface: nsmsgviewcommandtype. destfolder the folder to perform the command with. getcommandstatus() gets the status of a particular command. used by the thunderbird ui to determine if the command is available. void getcommandstatus(in nsmsgviewcommandtypevalue command, out boolean selectable_p, out nsmsgviewcommandcheckstatevalue selected_p); parameters command the nsmsgviewcommandtypevalue to perform. defined in the interface: nsmsgviewc...
... from the last to first (or vice versa). return values resultid the key of the result message. nsmsgkey is defined as an unsigned long in mailnewstypes2.idl. resultindex the index of the result message. nsmsgviewindex is defined as a unsigned long in mailnewstypes2.idl. threadindex the index of the new thread. nsmsgviewindex is defined as a unsigned long in mailnewstypes2.idl. navigatestatus() indicates if the passed motion type is currently valid. boolean navigatestatus(in nsmsgnavigationtypevalue motion); parameters motion the nsmsgnavigationtypevalue. defined in ther interface: nsmsgnavigationtype. return values true if the motion is available. false otherwise. getkeyat() gets the key for the message at a particular index. nsmsgkey getkeyat(in nsmsgviewindex ind...
nsIProtocolProxyCallback
tocolproxycallback.idlscriptable this interface serves as a closure for nsiprotocolproxyservice.asyncresolve(). 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. auri the uri passed to asyncresolve. apro...
...the value returned from asyncresolve. ...
...the value returned from asyncresolve. ...
...uri passed to asyncresolve. aproxyinfo the resulting proxy info or null if there is no associated proxy info for auri. as with the result of nsiprotocolproxyservice's resolve method, a null result implies that a direct connection should be used. astatus the status of the callback. 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. the value returned from asyncresolve. see also nsicancelable nsiuri nsiproxyinfo nsiprotocolproxyservice ...
Add to iPhoto
out by using ctypes.voidptr_t instead of a typed pointer. that's not really the ideal way to do things but saved some time for this simple example. some of this may change as i refine the example in the future; i'll update the article if and when that happens. some global types there are a few global data types used by all of our frameworks. these are declared near the top of the code: const osstatus = ctypes.int32_t; const cfindex = ctypes.long; const optionbits = ctypes.uint32_t; osstatus used to represent the status code resulting from an operation. cfindex a core foundation long integer type used to represent indexes into lists. i debated including this in the corefoundation object, and probably would have if i were being more formal, but opted against it for clarity's sake. optio...
...s the launch services api, which is used to launch applications and open files in default (or specific, in our case) applications. ...
...nch applications and open files in default (or specific, in our case) applications. ...
... an optionbits value providing a bit field of special options. a pointer to an apple event parameter; we aren't using this, so i'm just using a voidptr_t here. a pointer to an lsapplicationparameters structure that describes what ...
Gecko Plugin API Reference - Plugins
propriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initiali...
...the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by th...
...the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. for an overview of how t...
... the result. npn_pushpopupsenabledstate pushes the popups-enabled state. npn_reloadplugins reloads all plug-ins in the plugins directory. npn_requestread requests a range of bytes for a seekable stream. npn_setvalue sets windowless plug-in as transparent or opaque. npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies. npn_status displays a message on the status line of the browser window. npn_useragent returns the browser's user agent field. npn_version returns version information for the plug-in api. npn_write pushes data into a stream produced by the plug-in and consumed by the browser. scripting plugins how the dom handles scripting threading model security model what's in the plugin code? accessing ...
Rich output - Firefox Developer Tools
put to the clipboard. then you can paste it into a document. the output will look something like this: console.log(todolist) array(4) [ {…}, {…}, {…}, {…} ] debugger eval code:1:9 undefined if you expand objects, such as arrays, you get slightly different content. ...
... like this: console.log(todolist) array(4) [ {…}, {…}, {…}, {…} ] debugger eval code:1:9 undefined if you expand objects, such as arrays, you get slightly different content. ...
...defined if you expand objects, such as arrays, you get slightly different content. ...
... expanding the array in the above list, i get the following: console.log(todolist) (4) […] ​ 0: object { status: "done", description: "morning pages", datecreated: 1552404478137 } ​ 1: object { status: "in progress", description: "refactor styles", datecreated: 1552404493169 } ​ 2: object { status: "to do", description: "create feedback form", datecreated: 1552404512630 } ​ 3: object { status: "to do", description: "normalize table", datecreated: 1552404533790 } ​ length: 4 ​ <prototype>: array [] debugger eval code:1:9 undefined highlighting and inspecting dom nodes if you hover the mouse over any dom element in the console output, it's highlighted on the page: in the screenshot above you'll also see a blue "target" icon next to the node in the console output: click it to swit...
Using the Geolocation API - Web APIs
or.message}`); }; examples in the following example the geolocation api is used to retrieve the user's latitude and longitude. if sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...user's latitude and longitude. if sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...sucessful, the available hyperlink is populated with an openstreetmap.org url that will show their location. ...
...on><br/> <p id = "status"></p> <a id = "map-link" target="_blank"></a> javascript function geofindme() { const status = document.queryselector('#status'); const maplink = document.queryselector('#map-link'); maplink.href = ''; maplink.textcontent = ''; function success(position) { const latitude = position.coords.latitude; const longitude = position.coords.longitude; status.textcontent = ''; maplink.href = `https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`; maplink.textcontent = `latitude: ${latitude} °, longitude: ${longitude} °`; } function error() { status.textcontent = 'unable to retrieve your location'; } if(!navigator.geolocation) { status.textcontent = 'geolocation is not supported by your browser'; } else { sta...
MSGraphicsTrust - Web APIs
he web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the msgraphicstrust() constructor returns an object that provides properties for info on protected video playback. this proprietary method is specific to internet explorer and microsoft edge. ...
.... the msgraphicstrust() constructor returns an object that provides properties for info on protected video playback. this proprietary method is specific to internet explorer and microsoft edge. syntax var trustobject = media.msgraphicstruststatus; parameters constrictionactive a read-only property which returns true when protected media is forced to play in a lower resolution. ...
...provides properties for info on protected video playback. this proprietary method is specific to internet explorer and microsoft edge. syntax var trustobject = media.msgraphicstruststatus; parameters constrictionactive a read-only property which returns true when protected media is forced to play in a lower resolution. ...
...truststatus; parameters constrictionactive a read-only property which returns true when protected media is forced to play in a lower resolution. status a read-only property which returns an enum with the driver status when playing protected content. inheritance hierarchy the msgraphicstrust does not inherit from any class or interface. ...
MediaStreamTrack: ended event - Web APIs
eeded for the data to be sent. the hardware generating the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. examples this example sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active. ...
...rdware generating the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. examples this example sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active. ...
... the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. examples this example sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active. ...
...ple sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active. track.addeventlistener('ended', () => { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; }) you can also set up the event handler using the mediastreamtrack.onended property: track.onended = function() { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'ended' in that specification. candidate recommendation initial specification. ...
PaymentResponse.complete() - Web APIs
ment operation upon completion. it must be one of the following: success the payment was successfully processed. the user agent may or may not present some form of "payment successful" indication to the user. fail the payment was not successfully processed. the failure may or may not be announced to the user by the user agent, depending on its design. unknown the success or failure status of the transaction is unknown or irrelevant, and the user agent should not present any notification, even if it normally would. this is the default value. note: in older versions of the specification, an empty string, "", was used instead of unknown to indicate a completion without a known result state. see the browser compatibility section below for details. return value a promise w...
...he user interface was shown. invalidstateerror the payment has already completed, or complete() was called while a request to retry the payment is pending. you can't treat a payment as complete after requesting that the payment be tried again. examples the following example sends payment information to a secure server using the fetch api. it calls complete() with an answer appropriate to the status in the response. // initialization of paymentrequest arguments are excerpted for the // sake of brevity. var payment = new paymentrequest(supportedinstruments, details, options); payment.show().then(function(paymentresponse) { var fetchoptions = { method: 'post', credentials: include, body: json.stringify(paymentresponse) }; var serverpaymentrequest = new request('secure/pay...
...f brevity. ...
... candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
Using the Permissions API - Web APIs
this article provides a basic guide to using the w3c permissions api, which provides a programmatic way to query the status of api permissions attributed to the current context. the trouble with asking for permission... let's face it, permissions on the web are a necessary evil, and they are not much fun to deal with as developers. 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). the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned. for example,...
...ample, it can query whether permission to use a particular api is granted or denied, and specifically request permission to use an api. at the moment, implementation of the api is at an early stage, so support in browsers is pretty spotty: it can only be found in chrome 44 and later and firefox 43 and later. the only supported method right now is permissions.query(), which queries permission status. the only two apis currently recognized by the permissions api in chrome are geolocation and notification, with firefox also recognizing push and webmidi. more features will be added as time progresses. a simple example for this article, we have put together a simple demo called location finder. it uses geolocation to query the user's current location and plot it out on a google map: you ...
...ed to the browser to allow access to the global permissions object. this object will eventually include methods for querying, requesting, and revoking permissions, although currently it only contains permissions.query(); see below. querying permission state in our example, the permissions functionality is handled by one function — handlepermission(). this starts off by querying the permission status using permissions.query(). depending on the value of the state property of the permissionstatus object returned when the promise resolves, it reacts differently: "granted" the "enable geolocation" button is hidden, as it isn't needed if geolocation is already active. "prompt" the "enable geolocation" button is hidden, as it isn't needed if the user will be prompted to grant permission for ...
... the revoke() function has been disabled by default starting in firefox 51, since its design has been brought into question in the web applications security working group. it can be re-enabled by setting the preference dom.permissions.revoke.enable to true. responding to permission state changes you'll notice that there is an onchange event handler in the code above, attached to the permissionstatus object — this allows us to respond to any changes in the permission status for the api we are interested in. at the moment we are just reporting the change in state. conclusion and future work at the moment this doesn't offer much more than what we had already. if we choose to never share our location from the permission prompt (deny permission), then we can't get back to the permission promp...
Permissions API - Web APIs
the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned. ...
...the permissions api provides the tools to allow developers to implement a better user experience as far as permissions are concerned. ...
...wsing context and the worker context (workernavigator — so permission checks are available inside workers), and returns a permissions object that provides access to the permissions api functionality. once you have this object you can then perform permission-related tasks, for example querying a permission using the permissions.query() method to return a promise that resolves with the permissionstatus for a specific api. not all apis' permission statuses can be queried using the permissions api. notable apis that are permissions-aware include: clipboard api notifications api push api web midi api more apis will gain permissions api support over time. examples we have made a simple example available called location finder. you can run the example live, or view the source code on gith...
...ource code on github. read more about how it works in our article using the permissions api. interfaces navigator.permissions and workernavigator.permissions read only provides access to the permissions object from the main context and worker context respectively. permissions provides the core permission api functionality, such as methods for querying and revoking permissions. permissionstatus provides access to the current status of a permission, and an event handler to respond to changes in permission status. specification specification status comment permissions working draft initial definition. ...
RTCPeerConnection: signalingstatechange event - Web APIs
an signalingstatechange event is sent to an rtcpeerconnection to notify it that its signaling state, as indicated by the signalingstate property, has changed. ...
...alingstatechange event is sent to an rtcpeerconnection to notify it that its signaling state, as indicated by the signalingstate property, has changed. ...
...dler property rtcpeerconnection.onsignalingstatechange examples given an rtcpeerconnection, pc, and an updatestatus() function that presents status information to the user, this code sets up an event handler to let the user know when the ice negotiation process finishes up. ...
...dler to let the user know when the ice negotiation process finishes up. pc.addeventlistener("signalingstatechange", ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }, false); using onsignalingstatechange, it looks like this: pc.onsignalingstatechange = ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'signalingstatechange' in that specification. candidate recommendation ...
Request.cache - Web APIs
Web › API › Request › cache
, it will be returned from the cache. if there is no match, the browser will make a normal request, and will update the cache with the downloaded resource. only-if-cached — the browser looks for a matching request in its http cache. if there is a match, fresh or stale, it will be returned from the cache. if there is no match, the browser will respond with a 504 gateway timeout status. the "only-if-cached" mode can only be used if the request's mode is "same-origin". cached redirects will be followed if the request's redirect property is "follow" and the redirects do not violate the "same-origin" mode. example // download a resource with cache busting, to bypass the cache // completely. fetch("some.json", {cache: "no-store"}) .then(function(response) { /* consume the...
...roller and signal to allow better memory cleaning. ...
... the controller since it would need to change the value let controller = new abortcontroller(); fetch("some.json", {cache: "only-if-cached", mode: "same-origin", signal: controller.signal}) .catch(e => e instanceof typeerror && e.message === "failed to fetch" ? ({status: 504}) : // workaround for chrome; which simply fails with a typeerror promise.reject(e)) .then(res => { if (res.status === 504) { controller.abort() controller = new abortcontroller(); return fetch("some.json", {cache: "force-cache", mode: "same-origin", signal: controller.signal}) } const date = res.headers.get("date"), dt = date ? new date(date).gettime() : 0 if (dt < (date.now() - 86400000)) { // if older than 24 hours controller.abort() controller = new abortcon...
... living standard initial definition ...
Screen Wake Lock API - Web APIs
form wake lock and if referenced can be manually released and reacquired. get an instance of the object by calling wakelock.request. navigator.wakelock returns a wakelock object instance, from which all other functionality can be accessed. examples feature detection this code checks for wake lock support and updates the ui accordingly. if ('wakelock' in navigator) { issupported = true; statuselem.textcontent = 'screen wake lock api supported!'; } else { wakebutton.disabled = true; statuselem.textcontent = 'wake lock is not supported by this browser.'; } requesting a wake lock the following example demonstrates how to request a wakelocksentinel object. the wakelock.request method is promise based and so we can create an asynchronous function, which in turn updates the ui to refl...
...ased and so we can create an asynchronous function, which in turn updates the ui to reflect the wake lock is active. // 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'); // change up our interface to reflect wake lock active statuselem.textcontent = 'wake lock is active!'; } catch (err) { // if wake lock request fails - usually system related, such as battery statuselem.textcontent = `${err.name}, ${err.message}`; } } releasing wake lock the following example shows how to release the previously acquired wake lock. wakelock.release() .then(() => { wakelock = null; }); listening for wake lock releas...
... lock the following example shows how to release the previously acquired wake lock. wakelock.release() .then(() => { wakelock = null; }); listening for wake lock release this example updates the ui if the wake lock has been released for any reason (such as navigating away from the active window/tab). wakelock.addeventlistener('release', () => { // the wake lock has been released statuselem.textcontent = 'wake lock has been released'; }); reacquiring a wake lock the following code reacquires the wake lock should the visibility of the document change and the wake lock is released. document.addeventlistener('visibilitychange', () => { if (wakelock !== null && document.visibilitystate === 'visible') { wakelock = await navigator.wakelock.request('screen'); } }); putting...
...cally released when document becomes inactive. therefore make sure to re-acquire screen wake lock if necessary when document becomes active (listen for visibilitychange event). feature policy integration access to screen wake lock api is controlled by feature policy directive screen-wake-lock. refer to using feature policy for reference how to use it. specifications specification status comment screen wake lock api unknown initial definition. ...
WindowOrWorkerGlobalScope.fetch() - Web APIs
erglobalscope, which means that the fetch() method is available in pretty much any context in which you might want to fetch resources. a fetch() promise only rejects when a network error is encountered (which is usually when there’s a permissions issue or similar). a fetch() promise does not reject on http errors (404, etc.). instead, a then() handler must check the response.ok and/or response.status properties. the fetch() method is controlled by the connect-src directive of content security policy rather than the directive of the resources it's retrieving. note: the fetch() method's parameters are identical to those of the request() constructor. syntax const fetchresponsepromise = fetch(resource [, init]) parameters resource this defines the resource that you wish to fetch. this...
...) call. since we are fetching an image, we run body.blob() on the response to give it the proper mime type so it will be handled properly, then create an object url of it and display it in an <img> element. ...
...e fetching an image, we run body.blob() on the response to give it the proper mime type so it will be handled properly, then create an object url of it and display it in an <img> element. ...
...e init object in with the request constructor to get the same effect: let myrequest = new request('flowers.jpg', myinit); you can also use an object literal as headers in init. const myinit = { method: 'get', headers: { 'content-type': 'image/jpeg' }, mode: 'cors', cache: 'default' }; let myrequest = new request('flowers.jpg', myinit); specifications specification status comment fetchthe definition of 'fetch()' in that specification. living standard defined in a windoworworkerglobalscope partial in the newest spec. fetchthe definition of 'fetch()' in that specification. living standard initial definition credential management level 1 working draft adds federatedcredential or passwordcredential instance as a poss...
HTTP authentication - HTTP
ow to restrict access to your server using the http "basic" schema. 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. the challenge and response flow works like this: the server responds to a client with a 401 (unauthorized) response status and provides information on how to authorize with a www-authenticate response header containing at least one challenge. 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. ...
...the request including the correct authorization header. in the case of a "basic" authentication like shown in the figure, the exchange must happen over an https (tls) connection to be secure. proxy authentication the same challenge and response mechanism can be used for proxy authentication. as both resource authentication and proxy authentication can coexist, a different set of headers and status codes is needed. in the case of proxies, the challenging status code is 407 (proxy authentication required), the proxy-authenticate response header contains at least one challenge applicable to the proxy, and the proxy-authorization request header is used for providing the credentials to the proxy server. access forbidden if a (proxy) server receives valid credentials that are inadequate to acc...
...s 407 (proxy authentication required), the proxy-authenticate response header contains at least one challenge applicable to the proxy, and the proxy-authorization request header is used for providing the credentials to the proxy server. access forbidden if a (proxy) server receives valid credentials that are inadequate to access a given resource, the server should respond with the 403 forbidden status code. unlike 401 unauthorized or 407 proxy authentication required, authentication is impossible for this user. authentication of cross-origin images a potential security hole recently been fixed by browsers is authentication of cross-site images. from firefox 59 onwards, image resources loaded from different origins to the current document are no longer able to trigger http authentication dial...
...ekesphvinbbyjukxita/ restricting access with nginx and basic authentication for nginx, you will need to specify a location that you are going to protect and the auth_basic directive that provides the name to the password-protected area. the auth_basic_user_file directive then points to a .htpasswd file containing the encrypted user credentials, just like in the apache example above. location /status { auth_basic "access to the staging site"; auth_basic_user_file /etc/apache2/.htpasswd; } access using credentials in the url many clients also let you avoid the login prompt by using an encoded url containing the username and the password like this: https://username:password@www.example.com/ the use of these urls is deprecated. in chrome, the username:password@ part in urls...
431 Request Header Fields Too Large - HTTP
Web › HTTP › Status › 431
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. to help those running into this error, indicate which of the two is the problem in the response body — ideally, also include which headers are too large. this lets users attempt to fix the problem, such as by clearing their cookies. ...
... 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. to help those running into this error, indicate which of the two is the problem in the response body — ideally, also include which headers are too large. ...
...hen a single header field is too large. to help those running into this error, indicate which of the two is the problem in the response body — ideally, also include which headers are too large. this lets users attempt to fix the problem, such as by clearing their cookies. ...
...re too large. this lets users attempt to fix the problem, such as by clearing their cookies. ...
request - Archive of obsolete content
ignment. however, keep in mind that the same validation rules that apply to options in the constructor will apply during assignment. thus, each can throw if given an invalid value. ...
... head() make a head request. post() make a post request. put() make a put request. delete() make a delete request. ...
... using a request object. it is returned by the get(), head(), post(), put() or delete() method of a request object. all members of a response object are read-only. properties url the url of the response content. text the content of the response as plain text. json the content of the response as a javascript object. the value will be null if the document cannot be processed by json.parse. status the http response status code (e.g. 200). statustext the http response status line (e.g. ok). headers the http response headers represented as key/value pairs. to print all the headers you can do something like this: for (var headername in response.headers) { console.log(headername + " : " + response.headers[headername]); } anonymous boolean indicating if the request was anonymous. ...
Supporting per-window private browsing - Archive of obsolete content
you can use the nsiprivatebrowsingchannel interface for this purpose. the example below creates a channel to load a url, and forces it to be in private mode. var c...
... (!asubject.data) { /* you should display some user interface here */ asubject.data = true; // cancel the operation } }, "last-pb-context-exiting", false); forcing a channel into private mode usually, network channels inherit the privacy status of the document that created them, which means that they work correctly most of the time. however, sometimes you need to adjust the privacy status on a channel manually, for example, if you have created the channel directly yourself. you can use the nsiprivatebrowsingchannel interface for this purpose. the example below creates a channel to load a url, and forces it to be in private mode. var channel = services.io.newchannel("http://example.org", null, null); channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel...
...var xhr = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(components.interfaces.nsixmlhttpreqeust); var channel = xhr.channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel.setprivate(true); ...
Tamarin build documentation - Archive of obsolete content
the necessary 'libcrypto.a' and 'libssl.a' static libraries. alternatively, run make, in which case the process will complete with errors when it tries to create the shared lib crt0.o: $ /android-public/android-ndk/toolchains/arm-eabi-4.4.0/prebuilt/darwin-x86/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: crt0.o: no such file: no such file or directory collect2: ld returned 1 exit status make[2]: *** [link_app.] error 1 make[1]: *** [openssl] error 2 make: *** [build_apps] error 1 you can ignore these errors. the necessary static files 'libcrypto.a' and 'libssl.a' are made correctly and are present in the /openssl folder. more information on why this happens on mac os is here: http://developer.apple.com/library/mac/#qa/qa2001/qa1118.html - create a /frameworks/base/opengl/inclu...
... a user repository with the source and patches that will be compiled. documentation on how to setup a user repository http://developer.mozilla.org/en/publishing_mercurial_clones. push any changes that you want to test into this repository. request a build via the form at http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm user email: your email address. an email with the build status will be sent to this address when a builder completes whether it is passes or fails. mercurial repository: give the location of the repository that will be used for the build. note: only repositories hosted on http://hg.mozilla.org/ are accepted. revision: specify the revision number that will be built. currently this only accepts the change number and not the hash. branch: which branch ...
...tion of the repository that will be used for the build. note: only repositories hosted on http://hg.mozilla.org/ are accepted. revision: specify the revision number that will be built. currently this only accepts the change number and not the hash. branch: which branch of tamarin the repository is based on, tamarin-central or tamarin-tracing. 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. tryserver etiquette the sandbox is not a good substitute for running t...
broadcaster - Archive of obsolete content
ments that are observing the broadcaster will share the attributes placed on the broadcaster. for instance, if the broadcaster has a label attribute, the observers will use that label. if the label changes, the labels of the observers will update automatically. an onbroadcast event will be sent to the observers when a change is made. for menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead. more information is available in the broadcasters and observers xul tutorial. examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsiz...
... coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
Format - Archive of obsolete content
firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey. the survey questions and feedback are included in the thread. deadline for feedback has passed. ...
...requested feedback on a proposed user survey. the survey questions and feedback are included in the thread. deadline for feedback has passed. ...
...luded in the thread. deadline for feedback has passed. dropping bugs from blocking1.8.1+ david baron suggested a list of bugs that could be dropped from the blocking list. view bugzilla list. ...
2006-07-17 - Archive of obsolete content
firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey. the survey questions and feedback are included in the thread. deadline for feedback has passed. ...
...requested feedback on a proposed user survey. the survey questions and feedback are included in the thread. deadline for feedback has passed. ...
...luded in the thread. deadline for feedback has passed. dropping bugs from blocking1.8.1+ david baron suggested a list of bugs that could be dropped from the blocking list. view bugzilla list. ...
2006-10-06 - Archive of obsolete content
follows up that bug 354835 is solved so there is no need to close the tree waiting for it. thunderbird 2 - beta/rc? johannes koch asks where is the thunderbird roadmap? ziga sancin replies with a link and regrets about it being a bit out of date. firefox 1.5.0.8 andrew schultz asks about the gecko 1.8.0.8 schedule. dbaron and chris ilias respond with relative dates but still no schedule. rc2 status schrep asks for any final things standing in the way of rc2. rc2 starts spinning and en-us builds are annoucned. beltzner says that (as per bon echo status meeting) that rc2 is going to be re-spun to fix some final bugs that were regressed and patches that were just landed. reminder - ff2 rc2 code freeze 9/29/2006 at 9am pdt schrep started a discussion of bugs that need to be fixed for the ff2...
...the way of rc2. rc2 starts spinning and en-us builds are annoucned. beltzner says that (as per bon echo status meeting) that rc2 is going to be re-spun to fix some final bugs that were regressed and patches that were just landed. reminder - ff2 rc2 code freeze 9/29/2006 at 9am pdt schrep started a discussion of bugs that need to be fixed for the ff2 rc2 code freeze to go ahead. ...
...oucned. beltzner says that (as per bon echo status meeting) that rc2 is going to be re-spun to fix some final bugs that were regressed and patches that were just landed. reminder - ff2 rc2 code freeze 9/29/2006 at 9am pdt schrep started a discussion of bugs that need to be fixed for the ff2 rc2 code freeze to go ahead. ...
2006-11-03 - Archive of obsolete content
ints out how much easier it is to install an extension in firefox than it in any other product. a discussion of how to get firefox to be able to install extensions for other products (e.g. thunderbird, sunbird). ...
...n extension in firefox than it in any other product. a discussion of how to get firefox to be able to install extensions for other products (e.g. thunderbird, sunbird). ...
...e able to install extensions for other products (e.g. thunderbird, sunbird). button in the upper right hand corner the removal of the firefox home page button was purposeful, you can add that function by installing this. ...
2006-11-10 - Archive of obsolete content
06 blocker nomination and code freeze for 1.5.0.9/2.0.0.1 blocker nomination is due on november 10. ...
...5.0.9/2.0.0.1 blocker nomination is due on november 10. ...
...de freeze for these versions is on november 26 version numbering changes paul reed announced changes to the way version numbers are done for pre-releases. ...
2006-12-01 - Archive of obsolete content
e approved. automatic configure updated back preed announces that the machine that does the automatic autoconf/configure generation (egg.build.mozilla.org) is back up. gecko 1.9a1 triage meetings vlad announced that the gecko devs will be taking over the ff2 triage meetings until gecko 1.9a1 ships (nov 28th). watch #grandparadiso for updates. discussion november 29th gecko 1.9/gran paradiso status meeting other than annoucing the meeting, this thread discusses where else can info about what happens at the meetings be found (since the agenda often seems bare). m.d.planning and dev news blog are suggested. bon echo project status: remaining "to-do" items beltzner starts a discussion on when to offer 1.5.0.8+ users the chance to upgrade to ff2.x (now or when ff2.0.0.1 is released). also di...
...hell baker asks where should topics about organization and governance, moz.dev.planning or moz.governance? ...
... and governance, moz.dev.planning or moz.governance? ...
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
the debug.mstraceasynccallbackcompleted function indicates that an asynchronous operation has completed. syntax debug.mstraceasynccallbackcompleted() parameters asyncoperationid the id associated with the asynchronous operation. status optional the status of the asynchronous operation. if not specified, debug.ms_async_op_status_success is used. remarks call this function when the asynchronous operation completes. asyncoperationid must correspond to the operation id previously returned from debug.mstraceasyncoperationstarting. the possible values for status include: debug.ms_async_op_status_success debug.ms_async_op_status_canceled debug.ms_async_op_status_error note: some debugging tools do not display the information sent to the debugger. example ...
... debugging tools do not display the information sent to the debugger. example the following code provides an example of tracing an asynchronous call for a windows 8.x store app. ...
...ion() { var opid = debug.mstraceasyncoperationstarting('async trace'); dosomethingasync().then(function (result) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_success); debug.mstraceasynccallbackstarting(opid); // process result of async operation. }, function (error) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_error); debug.mstraceasynccallbackstarting(opid); }); debug.mstraceasynccallbackcompleted(); } function dosomethingasync() { return winjs.promise.as(true); } asyncwrapperfunction(); requirements supported in the internet explorer 11 standards document mode. also supported in store apps (windows 8.1 and windows phone 8.1). not supported in the following document modes: q...
Archive of obsolete content
ess ) file accessing : htaccess files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other. syntax highliting support for .htaccess files less. 2015 mdn fellowship program add-ons archived add-ons documentation. adding preferences to an extension this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to watch. it also adds a preference dialog that lets you switch to a stock other than one of the ones included in the popup menu. an interview with douglas bowman of wired news one of the web's oldest news sites, wired news draws between 20 a...
...about mozilla, gecko, and the process of building mozilla projects. archived open web documentation the documentation listed below is archived, obsolete material about open web topics. beginner tutorials this page includes archived beginners tutorials, from various places around mdn. ...
... beginner tutorials this page includes archived beginners tutorials, from various places around mdn. case sensitivity in class and id names creating a dynamic status bar extension concepts covered in the previous sample won't be reiterated here; instead, refer to the downloadable sample code or to the previous sample for further details. creating a status bar extension many of the concepts introduced here apply to any xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox. css3 css3 is the latest evolution of the cascading style sheets language and aims at extending css2.1. it brings a lot of long-awaited novelties, like rounded corners, shadows, ...
Plug-in Development Overview - Gecko Plugin API Reference
identify the browser in which your plug-in is displayed: use the npn_useragent method to read this information. to determine whether plug-in and the browser versions are compatible and possibly provide alternative processing for different versions: use the npn_version method to check for changes in major and minor version numbers. ...
...splayed: use the npn_useragent method to read this information. to determine whether plug-in and the browser versions are compatible and possibly provide alternative processing for different versions: use the npn_version method to check for changes in major and minor version numbers. for information about using these methods, see version, ui, and status information. displaying messages on the status line functionally, your plug-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities. to make the user feel that the plug-in is part of the the browser user interface, your plug-in can emulate the browser behavior by providing status line messages. use the npn_status method to display a message on the status line. for information about using this...
...-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities. to make the user feel that the plug-in is part of the the browser user interface, your plug-in can emulate the browser behavior by providing status line messages. use the npn_status method to display a message on the status line. for information about using this method, see version, ui, and status information. making plug-ins scriptable scriptable plug-ins are plug-ins that have been extended to provide methods that can be called from javascript and the dom when accessed through the object or embed element. consider the following example, where a media player plug-in can be controlled with an advancetonextsong() method called inside the script element: <object id="myplugin" type="aud...
How do you make sure your website works properly? - Learn web development
to the page you want to test. uh-oh, where's the image? let's look at our personal website, http://demozilla.examplehostingprovider.net/. it's not showing the image we expected! open firefox's network tool (tools ➤ web developer ➤ network) and reload the page: there's the problem, that "404" at the bottom. "404" means "resource not found", and that's why we didn't see the image. http statuses servers respond with a status message whenever they receive a request. here are the most common statuses: 200: ok the resource you asked for was delivered. 301: moved permanently the resource has moved to a new location. you won't see this much in your browser, but it's good to know about "301" since search engines use this information a lot to update their indexes. 304: not modified ...
...? at first glance, the image we asked for seems to be in the right place... but the network tool reported a "404". it turns out that we made a typo in our html code: unicorn_pics.png rather than unicorn_pic.png. ...
...indeed. ...
What is a Domain Name? - Learn web development
use a system with a built-in shell, type a whois command into it, as shown here for mozilla.org: $ whois mozilla.org domain name:mozilla.org domain id: d1409563-lror creation date: 1998-01-24t05:00:00z updated date: 2013-12-08t01:16:57z registry expiry date: 2015-01-23t05:00:00z sponsoring registrar:markmonitor inc. ...
...pe a whois command into it, as shown here for mozilla.org: $ whois mozilla.org domain name:mozilla.org domain id: d1409563-lror creation date: 1998-01-24t05:00:00z updated date: 2013-12-08t01:16:57z registry expiry date: 2015-01-23t05:00:00z sponsoring registrar:markmonitor inc. ...
...e for mozilla.org: $ whois mozilla.org domain name:mozilla.org domain id: d1409563-lror creation date: 1998-01-24t05:00:00z updated date: 2013-12-08t01:16:57z registry expiry date: 2015-01-23t05:00:00z sponsoring registrar:markmonitor inc. ...
Starting our Svelte Todo list app - Learn web development
evelopment mode. repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features this is how our todo list app wil look like once it's ready: using this ui our user will be able to: browse their tasks. mark tasks as completed/pending without deleting them. remove tasks. add new tasks. filter tasks by status: all tasks, active tasks, or completed tasks. edit tasks. mark all tasks as active/completed. remove all completed tasks. building our first component let's create a todos.svelte component — this will contain our list of todos. create a new folder — src/components. note: you can put your components anywhere inside the src folder, but the components folder is a recognized con...
...lass="btn toggle-btn" aria-pressed="false"> <span class="visually-hidden">show</span> <span>active</span> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" aria-pressed="false"> <span class="visually-hidden">show</span> <span>completed</span> <span class="visually-hidden">tasks</span> </button> </div> <!-- todosstatus --> <h2 id="list-heading">2 out of 3 items completed</h2> <!-- todos --> <ul role="list" class="todo-list stack-large" aria-labelledby="list-heading"> <!-- todo-1 (editing mode) --> <li class="todo"> <div class="stack-small"> <form class="stack-small"> <div class="form-group"> <label for="todo-1" class="todo-label"> new name for 'c...
... <button type="button" class="btn btn__primary">remove completed</button> </div> </div> check the rendered out again, and you'll see something like this: it's current not very nicely styled, and also functionally useless. but let's have a look at the markup and see how it relates to our desired features: a label and a text box for entering new tasks. three buttons to filter by task status. a label showing the total number of tasks and the completed tasks. an unordered list, which holds a list item for each task. when the task is being edited, the list item has an input and two button to cancel or save modifications. if the task is not being edited, there's a checkbox to set the completed status, and two buttons to edit or delete the task. finally there are two buttons to chec...
Using Vue computed properties - Learn web development
an attach a @change event handler to each checkbox instead of using v-model. update the <input> element in todoitem.vue to look like this. <input type="checkbox" class="checkbox" :id="id" :checked="isdone" @change="$emit('checkbox-changed')" /> since all we need to do is emit that the checkbox was checked, we can include the $emit() inline. ...
..." class="checkbox" :id="id" :checked="isdone" @change="$emit('checkbox-changed')" /> since all we need to do is emit that the checkbox was checked, we can include the $emit() inline. in app.vue, add a new method called updatedonestatus(), below your addtodo() method. this method should take one parameter: the todo item id. we want to find the item with the matching id and update its done status to be the opposite of its current status: updatedonestatus(todoid) { const todotoupdate = this.todoitems.find(item => item.id === todoid) todotoupdate.done = !todotoupdate.done } we want to run this method whenever a todoitem emits a checkbox-changed event, and pass in its item.id as the parameter. update your <to-do-item></to-do-item> call as follows: <to-do-item :label="item.label" :done...
... { const todotoupdate = this.todoitems.find(item => item.id === todoid) todotoupdate.done = !todotoupdate.done } we want to run this method whenever a todoitem emits a checkbox-changed event, and pass in its item.id as the parameter. update your <to-do-item></to-do-item> call as follows: <to-do-item :label="item.label" :done="item.done" :id="item.id" @checkbox-changed="updatedonestatus(item.id)"> </to-do-item> now if you check a todoitem, you should see the summary update appropriately! summary in this article we've used a computed property to add a nice little feature to our app. we do however have bigger fish to fry — in the next article we will look at conditional rendering, and how we can use it to show an edit form when we want to edit existing todo items. prev...
Vue conditional rendering: editing existing todos - Learn web development
.id and the special $event variable. this is a special vue variable used to pass event data to methods. when using native html events (like click), this will pass the native event object to your method. update the <to-do-item></to-do-item> call inside the app.vue template to look like this: <to-do-item :label="item.label" :done="item.done" :id="item.id" @checkbox-changed="updatedonestatus(item.id)" @item-deleted="deletetodo(item.id)" @item-edited="edittodo(item.id, $event)"> </to-do-item> and there you have it — you should now be able to edit and delete items from the list! fixing a small bug with isdone status this is great so far, but we've actually introduced a bug by adding in the edit functionality. try doing this: check (or uncheck) one of the...
...if you try checking (or unchecking) it again, the completed count will change in the opposite way to what you'd expect. this is because the isdone inside data is only given the value this.done on component load. ...
...le: app.vue <to-do-form> listens for: todo-added event emitted by the onsubmit() method inside the todoform component when the form is submitted. result: addtodo() method invoked to add new todo item to the todoitems array. <to-do-item> listens for: checkbox-changed event emitted by the checkbox <input> inside the todoitem component when it is checked or unchecked. result: updatedonestatus() method invoked to update done status of associated todo item. item-deleted event emitted by the deletetodo() method inside the todoitem component when the "delete" button is pressed. result: deletetodo() method invoked to delete associated todo item. item-edited event emitted by the itemedited() method inside the todoitem component when the item-edited event emitted by the onsubmit() method...
Experimental features in Firefox
no preference name dom.forms.inputmode <link rel="preload"> the <link> element's rel attribute is intended to help provide performance gains by letting you download resources earlier in the page lifecycle, ensuring that they're available earlier and are less likely to block page rendering. read preloading content with rel="preload" for more details. for more details on the status of this feature, see bug 1639607. release channel version added enabled by default? nightly 78 yes developer edition 78 yes beta 78 yes release 78 no preference name network.preload css display stray control characters in css as hex boxes this feature renders control characters (unicode category c...
...e content on a canvas to accessibility tools. release channel version added enabled by default? nightly 30 no developer edition 30 no beta 30 no release 30 no preference name canvas.hitregions.enabled webgl: draft extensions when this preference is enabled, any webgl extensions currently in "draft" status which are being tested are enabled for use. currently, there are no webgl extensions being tested by firefox. webgpu api this new api provides low-level support for performing computation and graphics rendering using the graphics processing unit (gpu) of the user's device or computer. the specification is still a work-in-progress. see bug 1602129 for our progress on this api. release ...
... developer edition 76[1] yes beta 76[1] yes release 76[1] no preference name n/a [1] support for zooming using the double-tap gesture was added in firefox 76. the other gestures were added for firefox 79. compatibility panel a side panel for the page inspector that shows you information detailing your app's cross-browser compatibility status. see bug 1584464 for more details. release channel version added enabled by default? nightly 71 yes developer edition 71 yes beta 71 no release 71 no preference name devtools.inspector.compatibility.enabled server-sent events in network monitor the network monitor displays information for server-se...
WebRequest.jsm
e xul browser into which the resource will be loaded, or null if the resource will not be loaded into a xul browser. method string the http method to be used (get, post, etc). responseheaders array of http headers. the http response headers that were received. this is only included if you set "responseheaders" in the opt_extrainfospec argument. statuscode number http response code. onresponsestarted triggered once the browser has started to receive the response body. note that you can't pass "blocking" for this event, so you can't modify or cancel the request from this event: it's informational only. opt_extrainfospec values name description "responseheaders" include response headers in the argument ...
... the xul browser into which the resource will be loaded, or null if the resource will not be loaded into a xul browser. method string the http method used (get, post, etc). responseheaders array of http headers. the http response headers that were received. this is only included if you set "responseheaders" in the opt_extrainfospec argument. statuscode number http response code. oncompleted triggered when the response has been received. note that you can't pass "blocking" for this event, so you can't modify or cancel the request from this event: it's informational only. opt_extrainfospec values name description "responseheaders" include response headers in the argument passed to the listener. ...
... the xul browser into which the resource will be loaded, or null if the resource will not be loaded into a xul browser. method string the http method used (get, post, etc). responseheaders array of http headers. the http response headers that were received. this is only included if you set "responseheaders" in the opt_extrainfospec argument. statuscode number http response code. types resource types the resource type string identifies the kind of resource being fetched. it's used in two places: filtering requests by type, and as the type property of the argument passed to the listener. the following types are supported: "main_frame" "sub_frame" "stylesheet" "script" "image" ...
Localizing with Koala
and then to see what koala does behind the scenes. normally though, you don't have to use the command line to commit your work. assuming that your locale files are in c:\mozilla\l10n\locale\x-testing\3.6 which is where the local mercurial repository was created (see creating a new project section), you should be able to successfully issue "hg cmd" commands in that directory (where "cmd" might be "status", "log", "commit" etc.). for example, try issuing "hg status" inside c:\mozilla\l10n\locale\x-testing\3.6: c:\mozilla\l10n\locale\x-testing\3.6> hg status ? browser\chrome\browser\search.properties ? browser\chrome\browser\searchbar.dtd the question marks ("?") in front of the file names indicate that the files are not tracked by mercurial in this repository (yet). to start tracking them, you wi...
...und. koala will show you a message if the "hg add" was successful. instead of adding single files, you can also add an entire folder. since we still need to add searchbar.dtd, let's simply add the entire browser/chrome/browser folder now. right-click on the folder and choose "add folder to repository". the files have been added to the repository. if you switch to the command line and issue "hg status" again, you should now see that the files are scheduled for addition on the next commit (which is indicated by the letter "a" standing in front of each new file): c:\mozilla\l10n\locale\x-testing\3.6> hg status a browser\chrome\browser\search.properties a browser\chrome\browser\searchbar.dtd you now have to commit the new files to the repository. right-click on the browser/chrome/browser folder ...
...self a question: "if i was a new person to this project and new nothing about the work already done in this repository, would this message help me understand what changes were made in this revision?". type a good commit message and click "ok". koala will execute "hg commit" in the background and will let you know that the files were successfully committed. if you now go to the command line, "hg status" will not display anything (because there are no uncommitted changes in the repository). if you run "hg log" however, you will see you first commit in the repository's revision history: c:\mozilla\l10n\locale\x-testing\3.6> hg log changeset: 0:7c543e8f3a6a tag: tip user: stas malolepszy <stas@mozilla.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar s...
Updates
based on mozilla code support more web standards, more deeply, more consistently across more platforms than any others. ...
...more platforms than any others. ...
...ding style sheets level 1 (css1), and the w3c document object model level 1 (dom1) [...] as well as support for display of mathematical equations using mathml." december 7, 2001 status report october 2000 the first international mathml conference april 14, 2000 status report february 12, 2000 mathml-enabled m13 builds for win32 september 21, 1999 mathml has landed. ...
NSPR Types
lways 64 bits. prfloat64 native os integer types these types are most appropriate for automatic variables. they are guaranteed to be at least 16 bits, though various architectures may define them to be wider (for example, 32 or even 64 bits). these types are never valid for fields of a structure. ...
...e pointer difference types boolean types status type for return values size type prsize pointer difference types types for pointer difference. variables of these types are suitable for storing a pointer or pointer subtraction. these are the same as the corresponding types in libc. prptrdiff pruptrdiff boolean types type and constants for boolean values. ...
...n types status type for return values size type prsize pointer difference types types for pointer difference. variables of these types are suitable for storing a pointer or pointer subtraction. these are the same as the corresponding types in libc. prptrdiff pruptrdiff boolean types type and constants for boolean values. ...
PR_Open
it is a bitwise or of the following bit flags. in most cases, only one of the first three flags may be used. ...
... does not exist, the file is created. if the file exists, this flag has no effect. pr_append 0x10 the file pointer is set to the end of the file prior to each write. pr_truncate 0x20 if the file exists, its length is truncated to 0. pr_sync 0x40 if set, each write will wait for both the file data and file status to be physically updated. pr_excl 0x80 with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. mode when pr_create_file flag is set and the file is created, these flags define the access permission bits of the newly created file. this feature is currently only applicable...
... returns the function returns one of the following values: if the file is successfully opened, a pointer to a dynamically allocated prfiledesc for the newly opened file. the prfiledesc should be freed by calling pr_close. if the file was not opened successfully, a null pointer. description pr_open creates a file descriptor (prfiledesc) for the file with the pathname name and sets the file status flags of the file descriptor according to the value of flags. if a new file is created as a result of the pr_open call, its file mode bits are set according to the mode parameter. ...
NSS functions
andshakewithtimeout mxr 3.11.4 and later ssl_resethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_revealcert mxr 3.2 and later ssl_revealpinarg mxr 3.2 and later ssl_revealurl mxr 3.2 and later ssl_securitystatus mxr 3.2 and later ssl_setmaxservercachelocks mxr 3.4 and later ssl_setpkcs11pinarg mxr 3.2 and later ssl_setsockpeerid mxr 3.2 and later ssl_seturl mxr 3.2 and later ssl_shutdownserversessionidcache mxr 3.7.4 and later deprecated ssl functions the following ssl functions have been replaced with newer versi...
...xr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailaddress mxr 3.7 and later cert_getnextgeneralname mxr 3.10 and later cert_getnextnameconstraint mxr 3.10 and later cert_getocspresponsestatus mxr 3.6 and later cert_getocspstatusforcertid mxr 3.6 and later cert_getoidstring mxr 3.9 and later cert_getorgname mxr 3.2 and later cert_getorgunitname mxr 3.2 and later cert_getocspauthorityinfoaccesslocation mxr 3.4 and later cert_getpkixverifynistrevocationpolicy mxr 3.12 and later cert_g...
... 3.2 and later nss_cmssignerinfo_getsignercommonname mxr 3.2 and later nss_cmssignerinfo_getsigneremailaddress mxr 3.2 and later nss_cmssignerinfo_getsigningcertificate mxr 3.2 and later nss_cmssignerinfo_getsigningtime mxr 3.2 and later nss_cmssignerinfo_getverificationstatus mxr 3.2 and later nss_cmssignerinfo_getversion mxr 3.2 and later nss_cmssignerinfo_includecerts mxr 3.2 and later nss_cmsutil_verificationstatustostring mxr 3.2 and later nss_smimesignerinfo_savesmimeprofile mxr 3.4 and later nss_smimeutil_findbulkalgforrecip...
sslcrt.html
es manipulating certificates getting certificate information comparing secitem objects validating certificates cert_verifycertnow cert_verifycertname cert_checkcertvalidtimes nss_cmpcertchainwcanames cert_verifycertnow checks that the current date is within the certificate's validity period and that the ca signature on the certificate is valid. syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle. cert a pointer to the certificate to be chec...
...e services of a pkcs #11 module. some of the pk11 functions require a pin argument (see ssl_setpkcs11pinarg for details), which must be specified in the wincx parameter. to obtain the value to pass in the wincx parameter, call ssl_revealpinarg. cert_verifycertname compares the common name specified in the subject dn for a certificate with a specified hostname. syntax #include <cert.h> secstatus cert_verifycertname( certcertificate *cert, char *hostname); parameters this function has the following parameters: cert a pointer to the certificate against which to check the hostname referenced by hostname. hostname the hostname to be checked. returns the functi...
...r pr_time.h. returns the function returns an enumerator of type seccerttimevalidity: typedef enum { seccerttimevalid, seccerttimeexpired, seccerttimenotvalidyet } seccerttimevalidity; nss_cmpcertchainwcanames determines whether any of the signers in the certificate chain for a specified certificate are on a specified list of ca names. syntax #include <nss.h> secstatus nss_cmpcertchainwcanames( certcertificate *cert, certdistnames *canames); parameters this function has the following parameters: cert a pointer to the certificate structure for the certificate whose certificate chain is to be checked. canames a pointer to a structure that contains a ...
mozIAsyncHistory
void getplacesinfo( in jsval aplaceidentifiers, in mozivisitinfocallback acallback ); paramet...
...al] 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. void getplacesinfo( in jsval aplaceidentifiers, in mozivisitinfocallback acallback ); parameters aplaceidentifiers the uri for which to determine the visited status. acallback an object implementing the mozivisitedstatuscallback.isvisited() method. if there's no information available for a given place, acallback is called with a stub place info object, containing just the provided data (guid or uri). isurivisited() starts an asynchronous request to determine whether or not a given uri has been visited; you must implement a callback to receive the re...
...svisited() method. if there's no information available for a given place, acallback is called with a stub place info object, containing just the provided data (guid or uri). 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. void isurivisited( in nsiuri auri, in mozivisitedstatuscallback acallback ); parameters auri the places for which to retrieve information, identified by either a single place guid, a single uri, or a js array of uris and/or guids. acallback an object implementing the mozivisitedstatuscallback.isvisited() method; this method will be called with the results once the request has been completed. updateplaces() adds a set of visits for o...
nsIAsyncInputStream
t exclusively used with non-blocking streams, it is not necessary that nsiinputstream.isnonblocking() return true. nor is it necessary that a non-blocking nsiinputstream implementation also implement nsiasyncinputstream. 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 underlying stream). methods asyn...
...count wait until at least this many bytes can be read. this is only a suggestion to the underlying stream; it may be ignored. the caller may pass zero to indicate no preference. aeventtarget specify null to receive notification on any thread (possibly even recursively on the calling thread, that is synchronously), or specify that the notification be delivered to a specific event target. closewithstatus() this method closes the stream and sets its internal status. if the stream is already closed, then this method is ignored. once the stream is closed, the stream's status cannot be changed. any successful status code passed to this method is treated as ns_base_stream_closed, which has an effect equivalent to nsiinputstream.close(). note: this method exists in part to support pipes, which have bot...
...ssed to this method is treated as ns_base_stream_closed, which has an effect equivalent to nsiinputstream.close(). note: this method exists in part to support pipes, which have both an input end and an output end. if the input end of a pipe is closed, then writes to the output end of the pipe will fail. the error code returned when an attempt is made to write to a "broken" pipe corresponds to the status code passed in when the input end of the pipe was closed, which greatly simplifies working with pipes in some cases. void closewithstatus( in nsresult astatus ); parameters astatus the error that will be reported if this stream is accessed after it has been closed. ...
nsIAsyncOutputStream
clusively used with non-blocking streams, it is not necessary that nsioutputstream.isnonblocking() return true. nor is it necessary that a non-blocking nsioutputstream implementation also implement nsiasyncoutputstream. 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 underlying stream). methods asyn...
...nt wait until at least this many bytes can be written. this is only a suggestion to the underlying stream; it may be ignored. the caller may pass zero to indicate no preference. aeventtarget specify null to receive notification on any thread (possibly even recursively on the calling thread, that is synchronously), or specify that the notification be delivered to a specific event target. closewithstatus() this method closes the stream and sets its internal status. if the stream is already closed, then this method is ignored. once the stream is closed, the stream's status cannot be changed. any successful status code passed to this method is treated as ns_base_stream_closed, which has an effect equivalent to nsiinputstream.close(). note: this method exists in part to support pipes, which have bot...
...ssed to this method is treated as ns_base_stream_closed, which has an effect equivalent to nsiinputstream.close(). note: this method exists in part to support pipes, which have both an input end and an output end. if the output end of a pipe is closed, then reads from the input end of the pipe will fail. the error code returned when an attempt is made to read to a "closed" pipe corresponds to the status code passed in when the output end of the pipe was closed, which greatly simplifies working with pipes in some cases. void closewithstatus( in nsresult reason ); parameters reason the error that will be reported if this stream is accessed after it has been closed. ...
nsIContentViewer
try); void destroy(); [noscript,notxpcom,nostdcall] nsiviewptr findcontainerview(); void getbounds(in nsintrectref abounds); native code only! [noscript,notxpcom] nsidocumentptr getdocument(); void hide(); void init(in nsiwidgetptr aparentwidget, [const] in nsintrectref abounds); native code only! ...
...cumentptr getdocument(); parameters none. return value the dom document object. hide() void hide(); parameters none. native code only!init initializes the content viewer. ...
...rameters none. return value the dom document object. hide() void hide(); parameters none. native code only!init initializes the content viewer. ...
nsIDOMWindowUtils
string the type of the currently-focused html <input> element, if one is focused. imageanimationmode unsigned short returns the image animation mode of the window. the attribute's value must be one of the animationmode values from imgicontainer. imeisopen boolean returns the ime open state. true if it's open, otherwise false. this attribute only works when imestatus is ime_status_enabled. read only. imestatus unsigned long returns the current ime status. values correspond to the ime_status_* constants defined below. read only. ismozafterpaintpending boolean returns true if a mozafterpaint event has been queued but not yet fired. read only. layermanagertype astring what type of layer manager the widget associate...
...on gtk2, users can use "simple ime" which only supports dead key inputting. this state is the same as ime-mode: pas...
...usescroll_prefer_widget_at_point 1 mousescroll_scroll_lines 2 mousescroll_win_scroll_lparam_not_null 65536 touch_hover 1 touch_contact 2 touch_remove 4 touch_cancel 8 ime_status_disabled 0 users cannot use ime at all. this state is not the same as ime-mode: disabled. ime_status_enabled 1 users can use all functions of ime. this state is same as ime-mode: normal. ime_status_password 2 users cannot use most ime functions. on gtk2, users can use "simple ime" which only supports dead key inputting. this state is the same as ime-mode: password. ime_status_plugin 3 plug-in has focus. at this time we should not attempt to set the ime state...
nsIDownloadObserver
netwerk/base/public/nsidownloader.idlscriptable please add a summary to this article. ...
...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. ...
...ndownloadcomplete(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. ...
nsIMsgSearchValue
* (range...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkpercent; astring tostring(); }; ...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkpercent; astring tostring(); }; ...
nsIRequestObserver
lic/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. void onstartrequest( in nsirequest arequest, in nsisupports acontext ); parameters arequest request being observed. acontext user defined context. onstopreques...
...ntext ); parameters arequest request being observed. acontext user defined context. onstoprequest() called to signify the end of an asynchronous request. this call is always preceded by a call to onstartrequest(). ...
...t() called to signify the end of an asynchronous request. this call is always preceded by a call to onstartrequest(). note: an exception thrown from onstoprequest is generally ignored. ...
nsIWebSocketChannel
to a file: uri) so that the original pre-redirect uri can still be obtained. this is never null. read only. protocol acstring sec-websocket-protocol value. securityinfo nsisupports transport-level security information (if any). read only. uri nsiuri the uri corresponding to the protocol connection after any redirections are completed. read only. status codes the following values are permitted status codes. status code name description 0-999 reserved and not used. 1000 close_normal normal closure; the connection successfully completed whatever purpose for which it was created. 1001 close_going_away the endpoint is going away, either because of a server failure or because the browser i...
...minating the connection due to a protocol error. 1003 close_unsupported the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data). 1004 close_too_large the endpoint is terminating the connection because a data frame was received that is too large. 1005 close_no_status reserved. indicates that no status code was provided even though one was expected. 1006 close_abnormal reserved. used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. 1007-1999 reserved for future use by the websocket standard. 2000-2999 reserved for use by websocket e...
... nsisupports acontext ); parameters auri the uri of the websocket protocol; this may be redirected. aorigin the uri of the originating resource. alistener the nsiwebsocketlistener implementation. acontext an opaque parameter forwarded to alistener's methods. close() void close( in unsigned short acode, in autf8string areason ); parameters acode the status of the connection when closed; see status codes for possible values. areason a human-readable string describing the reason the connection closed. sendbinarymsg() sends a binary message to the websocket peer. void sendbinarymsg( in acstring amsg ); parameters amsg the data to send. sendmsg() sends a text message to the websocket peer. void sendmsg( in autf8string amsg ); p...
nsIWebSocketListener
void onacknowledge( in nsisupports acontext, in pruint32 asize ); parameters acontext user defined context. asize number of bytes placed in os send buffer. onbinarymessageavailable() called when a binary message has been received...
...binarymessageavailable()() or onacknowledge()() will be delievered to the listener after onserverclose() is called, but outgoing messages can still be sent through the nsiwebsocketchannel connection. void onserverclose( in nsisupports acontext, in unsigned short acode, in autf8string areason ); parameters acontext user defined context. acode the websocket closing handshake status code; see status codes for possible values. areason a text string explaining the reason for the closure of the connection. onstart() called to signify the establishment of the message stream. any listener that receives onstart() will also receive onstop(). void onstart( in nsisupports acontext ); parameters acontext user defined context. onstop() called to signify the comple...
...ext ); parameters acontext user defined context. onstop() called to signify the completion of the message stream. this is the final notification the listener will receive; once it's been received, the websocket connection is complete. this event can be received in error cases even if nsiwebsocketchannel.close() has not been called. void onstop( in nsisupports acontext, in nsresult astatuscode ); parameters acontext user defined context. astatuscode reason for stopping (ns_ok if completed successfully). see also websockets nsiwebsocketchannel ...
nsMsgSearchAttrib
/* a custom term, see nsimsgsearchcustomterm */ const nsmsgsearchattribvalue default = -1; const nsmsgsearchattribvalue subject = 0; /* mail and news */ const nsmsgsearchattribvalue sender = 1; const nsmsgsearchattribvalue body = 2; const nsmsgsearchattribvalue date = 3; const nsmsgsearchattribvalue priority = 4; /* mail only */ const nsmsgsearchattribvalue msgstatus = 5; const nsmsgsearchattribvalue to = 6; const nsmsgsearchattribvalue cc = 7; const nsmsgsearchattribvalue toorcc = 8; const nsmsgsearchattribvalue alladdresses = 9; const nsmsgsearchattribvalue location = 10; /* result list only */ const nsmsgsearchattribvalue messagekey = 11; /* message result elems */ const nsmsgsearchattribvalue ageindays = 12; ...
...ribvalue pager = 27; const nsmsgsearchattribvalue mobile = 28; const nsmsgsearchattribvalue city = 29; const nsmsgsearchattribvalue street = 30; const nsmsgsearchattribvalue title = 31; const nsmsgsearchattribvalue organization = 32; const nsmsgsearchattribvalue department = 33; // 34 - 43, reserved for ab / ldap; const nsmsgsearchattribvalue hasattachmentstatus = 44; const nsmsgsearchattribvalue junkstatus = 45; const nsmsgsearchattribvalue junkpercent = 46; const nsmsgsearchattribvalue junkscoreorigin = 47; const nsmsgsearchattribvalue label = 48; /* mail only...can search by label */ const nsmsgsearchattribvalue hdrproperty = 49; // uses nsimsgsearchterm::hdrproperty const nsmsgsearchattribvalue folderflag = 50; // uses n...
... /** otherheader must always be last attribute since * we can have an arbitrary # of these. ...
nsIMsgSearchValue
* (range...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkpercent; astring tostring(); }; ...
... * (range 0-100, 100 is junk) */ attribute unsigned long junkpercent; astring tostring(); }; ...
Address book sync client design
* notify the observer that the ab sync authorization operation has begun. * */ void onstartauthoperation(); /** * notify the observer that the ab sync operation has been completed. * * this method is called regardless of whether the the operation was * successful. * * atransactionid - the id for this particular request * astatus - status code for the sync request * amsg - a text string describing the error (if any). * acookie - hmmm...cooookies! */ void onstopauthoperation(in nsresult astatus, in wstring amsg, in string acookie); /** * notify the observer that the ab sync operation has begun. this method is * called only once, at the beginning of ...
... * called only once, at the beginning of a sync transaction * */ void onstartoperation(in print32 atransactionid, in pruint32 amsgsize); /** * notify the observer that progress as occurred for the ab sync operation */ void onprogress(in print32 atransactionid, in pruint32 aprogress, in pruint32 aprogressmax); /** * notify the observer with a status message for sync operation */ void onstatus(in print32 atransactionid, in wstring amsg); /** * notify the observer that the ab sync operation has been completed. * * this method is called regardless of whether the the operation was * successful. * * atransactionid - the id for this particular request * astatus - status code ...
...een completed. * * this method is called regardless of whether the the operation was * successful. ...
Index
that you'll will most likely use when writing extensions that work with email or other accounts. see account examples for examples and code snippets. 5 activity manager thunderbird 3, thunderbird the activity manager is a simple component that understands how to display a combination of user activity and history. 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. 6 activity manager interfaces thunderbird this page describes the programmatic interfaces behind the activity manager component. the functionality of the component is described on the activity manager page, and the activity manager examples page has code snip...
...he user can configure junk mail can be automatically purged from the "junk" folder to analyze a message for spam, we need the entire message, not just the headers. spam detection happens after filters are run white listing happens after filters, but before spam detection the purge code is implemented as a search of the "junk" folder, looking for "old" message that have the proper junk status. when does purging happens? elaborate on the mime changes that were made for spam currently, spam filtering is does not work for news, but it would be possible to add support for this. (there is a bug on it.) 51 the libmime module by richard h. pizzarro <rhp@netscape.com> 52 thunderbird api documentation these pages have been moved from mozill...
... widgets by inserting new xul dom elements into the application window and modify them using scripts and attaching event handlers. while xul provides the elements of the user interface, actions are written in javascript. 79 building a thunderbird extension 6: adding javascript in this step we will create a small piece of javascript code that inserts the current date into our statusbar widget. the statusbar is usually displayed at the bottom of the thunderbird window. depending on the installed theme the result will look something like this: 80 building a thunderbird extension 7: installation extensions, thunderbird while you are developing the extension, there are two ways you can make thunderbird load it so you can test it as you go. you can either put...
Plug-in Development Overview - Plugins
identify the browser in which your plug-in is displayed: use the npn_useragent method to read this information. to determine whether plug-in and the browser versions are compatible and possibly provide alternative processing for different versions: use the npn_version method to check for changes in major and minor version numbers. ...
...splayed: use the npn_useragent method to read this information. to determine whether plug-in and the browser versions are compatible and possibly provide alternative processing for different versions: use the npn_version method to check for changes in major and minor version numbers. for information about using these methods, see version, ui, and status information. displaying messages on the status line functionally, your plug-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities. to make the user feel that the plug-in is part of the the browser user interface, your plug-in can emulate the browser behavior by providing status line messages. use the npn_status method to display a message on the status line. for information about using this...
...-in is seamlessly integrated into the browser and operates as an addition to current browser capabilities. to make the user feel that the plug-in is part of the the browser user interface, your plug-in can emulate the browser behavior by providing status line messages. use the npn_status method to display a message on the status line. for information about using this method, see version, ui, and status information. making plug-ins scriptable scriptable plug-ins are plug-ins that have been extended to provide methods that can be called from javascript and the dom when accessed through the object or embed element. consider the following example, where a media player plug-in can be controlled with an advancetonextsong() method called inside the script element: <object id="myplugin" type="aud...
DOM Inspector internals - Firefox Developer Tools
some overlays can be described as host-integration overlays, and others as shared structure overlays. host-integration overlay...
... chrome://inspector/content/viewers/d...pupoverlay.xul chrome://inspector/content/viewers/s...pupoverlay.xul chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/d...andoverlay.xul chrome://inspector/content/keysetoverlay.xul chrome://inspector/content/viewers/d...setoverlay.xul chrome://inspector/content/statusbaroverlay.xul chrome://global/content/globaloverlay.xul (note that the overlays from the viewer subdirectories—viewers/dom and viewers/stylerules—are loaded as a result of overlay directives in dom inspector's chrome manifest, rather than being explicitly imported using a xul-overlay processing instruction in the overlaid file.) inspectoroverlay.xul this imports the scripts th...
... its uri for a given menuitem—is also defined here. commandoverlay.xul the popupoverlay.xul-provided menuitems that delegate to external command elements have their commands defined here. keysetoverlay.xul some popupoverlay.xul-provided menuitems have their keys defined here. as of this writing, all of the keys that correspond to edit menu items live in editingoverlay for no good reason. statusbaroverlay.xul this defines the contents of the dom inspector's status bar. dom inspector doesn't have a status bar, so this is entirely useless. ...
Network request details - Firefox Developer Tools
ponse cache timings security (only for secure pages) stack trace (only when the request has a stack trace, e.g. a script called by another script). clicking the icon at the right-hand end of the toolbar closes the details pane and returns you to the list view. headers tab the headers tab has a toolbar, followed by three main sections. this includes: information about the request status: the response status code for the request; click the "?" icon to go to the reference page for the status code. version: the version of http used. transferred: the amount of data transferred for the request. referrer policy: the value of the referrer-policy header. http response headers http request headers each section has a disclosure triangle to expand the section to show more...
...the modified request, or cancel to cancel editing. request information the following information is shown only when the section is expanded: scheme: the scheme used in the url host: the server involved in the request filename: the full path to the file requested address: the ip address of the host the following information is shown in both the collapsed and the expanded states: status: the http response code for the request. version: the http version used transferred: the amount of data transferred with the request the referrer policy, which governs which referrer information, sent in the referer header, should be included with requests. (see referrer-policy for a description of possible values) blocking: if the request is to a site that is associated with a known tracker,...
... }, { "name": "via", "value": "1.1 varnish (varnish/5.1), 1.1 varnish (varnish/5.1)" }, { "name": "x-analytics", "value": "ns=-1;special=badtitle;wmf-last-access=11-jun-2019;wmf-last-access-global=11-jun-2019;https=1" }, { "name": "x-cache", "value": "cp1075 pass, cp1075 pass" }, { "name": "x-cache-status", "value": "pass" }, { "name": "x-client-ip", "value": "204.210.158.136" }, { "name": "x-content-type-options", "value": "nosniff" }, { "name": "x-firefox-spdy", "value": "h2" }, { "name": "x-frame-options", "value": "sameorigin" }, { "name": "x-powered-by", ...
BatteryManager - Web APIs
properties batterymanager.charging read only a boolean value indicating whether or not the battery is currently being charged. ...
...patchevent() dispatches an event to this eventtarget. ...
...is eventtarget. ...
Using the Beacon API - Web APIs
following example specifies a handler for the load and beforeunload events. the handler calls sendbeacon() with the current url. window.onload = window.onunload = function analytics(event) { if (!navigator.sendbeacon) return; var url = "https://example.com/analytics"; // create the data to send var data = "state=" + event.type + "&location=" + location.href; // send the beacon var status = navigator.sendbeacon(url, data); // log the data and result console.log("sendbeacon: url = ", url, "; data = ", data, "; status = ", status); }; the following example creates a submit handler and when that event is fired, the handler calls sendbeacon(). window.onsubmit = function send_analytics() { var data = json.stringify({ location: location.href, time: date() }); navi...
...s for the global context: function worker_send(url, data) { // create the worker object var myworker = new worker("worker-using.js"); // send the worker the url and data to beacon myworker.postmessage([url, data]); // set up a message handler to receive the success/fail message from the worker myworker.onmessage = function(event) { var msg = event.data; // log worker's send status console.log("worker reply: sendbeacon() status = " + msg); }; } this code snippet is for the worker (worker-using.js): onmessage = function(event) { var msg = event.data; // split the url and data from the message var url = msg[0]; var data = msg[1]; // if the browser supports worker sendbeacon(), then send the beacon; otherwise // return failure message to the global contex...
...status = " + msg); }; } this code snippet is for the worker (worker-using.js): onmessage = function(event) { var msg = event.data; // split the url and data from the message var url = msg[0]; var data = msg[1]; // if the browser supports worker sendbeacon(), then send the beacon; otherwise // return failure message to the global context if (self.navigator.sendbeacon) { var status = self.navigator.sendbeacon(url, data); postmessage(status ? "success" : "fail"); } else { postmessage("worker: self.navigator.sendbeacon is unsupported"); } } see also beacon api (overview) beacon standard beacon caniuse data ...
Cache.add() - Web APIs
Web › API › Cache › add
note: add() will overwrite any key/value pair previously stored in the cache that matches the request. ...
...e 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. return value a promise that resolves with undefined. exceptions exception happens when typeerror the url scheme is not http or https. 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. this consists of calling cachestorage.
... then calls waituntil() to handle the install process for the app. this consists of calling cachestorage.open to create a new cache, then using cache.add to add an asset to it. this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); specifications specification status comment service workersthe definition of 'cache: add' in that specification. working draft initial definition. ...
Encrypted Media Extensions API - Web APIs
nt scheme. interfaces mediakeymessageevent contains the content and related data when the content decryption module (cdm) generates a message for the session. mediakeys represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback. mediakeysession represents a context for message exchange with a content decryption module (cdm). ...
...ent contains the content and related data when the content decryption module (cdm) generates a message for the session. mediakeys represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback. mediakeysession represents a context for message exchange with a content decryption module (cdm). ...
...epresents a context for message exchange with a content decryption module (cdm). mediakeystatusmap is a read-only map of media key statuses by key ids. mediakeysystemaccess provides access to a key system for decryption and/or a content protection provider. mediakeysystemconfiguration provides configuration information about the media key system. ...
Using Fetch - Web APIs
ously achieved using xmlhttprequest. fetch provides a better alternative that can be easily used by other technologies such as service workers. fetch also provides a single logical place to define other http-related concepts such as cors and extensions to http. the fetch specification differs from jquery.ajax() in three main ways: the promise returned from fetch() won’t reject on http error status even if the response is an http 404 or 500. instead, it will resolve normally (with ok status set to false), and it will only reject on network failure or if anything prevented the request from completing. fetch() won't can receive cross-site cookies; you can’t can establish a cross site session using fetch. set-cookie headers from other sites are silently ignored. fetch won’t send cookies,...
... you may not append or set a request guarded headers’ content-length header. similarly, inserting set-cookie into a response header is not allowed: serviceworkers are not allowed to set cookies via synthesized responses. response objects as you have seen above, response instances are returned when fetch() promises are resolved. the most common response properties you'll use are: response.status — an integer (default value 200) containing the response status code. response.statustext — a string (default value "ok"), which corresponds to the http status code message. response.ok — seen in use above, this is a shorthand for checking that status is in the range 200-299 inclusive. this returns a boolean. they can also be created programmatically via javascript, but this is only rea...
...ing for the existence of headers, request, response or fetch() on the window or worker scope. for example: if (window.fetch) { // run my fetch request here } else { // do something with xmlhttprequest? } polyfill to use fetch in unsupported browsers, there is a fetch polyfill available that recreates the functionality for non-supporting browsers. specifications specification status comment fetch living standard initial definition ...
Using files from web applications - Web APIs
rate rule for compatibility, :focus-within is required on modern firefox and chrome */ input.visually-hidden:focus + label { outline: thin dotted; } input.visually-hidden:focus-within + label { outline: thin dotted; } there is no need to add javascript code to call fileelem.click(). also in this case you can style the label element as you wish. you need to provide a visual cue for the focus status of the hidden input field on its label, be it an outline as shown above, or background-color or box-shadow. (as of time of writing, firefox doesn’t show this visual cue for <input type="file"> elements.) selecting files using drag and drop you can also let the user drag and drop files into your web application. the first step is to establish a drop zone. exactly what part of your content wil...
... } }; fd.append('myfile', file); // initiate a multipart/form-data upload xhr.send(fd); } window.onload = function() { const dropzone = document.getelementbyid("dropzone"); dropzone.ondragover = dropzone.ondragenter = fu...
...ribute('src', obj_url); url.revokeobjecturl(obj_url); example: using object urls with other file types you can manipulate files of other formats the same way. here is how to preview uploaded video: const video = document.getelementbyid('video'); const obj_url = url.createobjecturl(blob); video.src = obj_url; video.play(); url.revokeobjecturl(obj_url); specifications specification status comment html living standardthe definition of 'file upload state' in that specification. living standard file api working draft initial definition ...
FontFace - Web APIs
Web › API › FontFace
constructor fontface() constructs and returns a new fontface object, built from an external resource described by an url or from an arraybuffer. properties this interface doesn't inherit any property. ...
...uresettings a cssomstring that retrieves or sets infrequently used font features that are not available from a font's variant properties. it is equivalent to the font-feature-settings descriptor. fontface.loaded read only returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror. fontface.status read only returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error". fontface.stretch a cssomstring that retrieves or sets how the font stretches. it is equivalent to the font-stretch descriptor. fontface.style a cssomstring that retrieves or sets the style of the font. it is equivalent to the font-style descriptor. fontface.unicoder...
... a cssomstring that contains the weight of the font. it is equivalent to the font-weight descriptor. methods this interface doesn't inherit any method. fontface.load() loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object. specifications specification status comment css font loading module level 3the definition of 'fontface' in that specification. working draft initial definition ...
Using the Gamepad API - Web APIs
= "axis"; //p.id = "a" + i; p.setattribute("max", "2"); p.setattribute("value", "1"); p.innerhtml = i; a.appendchild(p); } d.appendchild(a); // see https://github.com/luser/gamepadtest/blob/master/index.html var start = document.getelementbyid("start"); if (start) { start.style.display = "none"; } document.body.appendchild(d); requestanimationframe(updatestatus); } function disconnecthandler(e) { removegamepad(e.gamepad); } function removegamepad(gamepad) { var d = document.getelementbyid("controller" + gamepad.index); document.body.removechild(d); delete controllers[gamepad.index]; } function updatestatus() { if (!haveevents) { scangamepads(); } var i = 0; var j; for (j in controllers) { var controller = controllers[j]; ...
...navigator.getgamepads() : (navigator.webkitgetgamepads ? navigator.webkitgetgamepads() : []); for (var i = 0; i < gamepads.length; i++) { if (gamepads[i]) { if (gamepads[i].index in controllers) { controllers[gamepads[i].index] = gamepads[i]; } else { addgamepad(gamepads[i]); } } ...
... working draft initial defintion ...
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
the webglcontextcreationerror event of the webgl api is fired if the user agent is unable to create a webglrenderingcontext context. this event has a webglcontextevent.statusmessage property, which can contain a platform dependent string with more information about the failure. ...
... recommendation initial definition. ...
...rmation about the failure. bubbles yes cancelable yes interface webglcontextevent event handler property none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log(e.statusmessage || 'unknown error'); }, false); var gl = canvas.getcontext('webgl'); // logs statusmessage or "unknown error" if unable to create webgl context specifications specification status comment webgl 1.0the definition of 'webglcontextcreationerror' in that specification. recommendation initial definition. ...
install - Web APIs
nvoked when the installation is complete (see example below). firefox 3 note in firefox 3 the callback is no longer invoked unless the website performing the installation is whitelisted. returns install returns true if the function succeeded and false if it did not, but these values are not always reliable as a determinant of the success of the operation. to surface detail about the status of the installation, use the optional callback function and its status parameter, as in the example below. description in the example below, a special javascript object constructor is used to create an object that can be passed to the install() method. the { } constructor takes a comma-delimited set of label/value pairs. for installations, these pairs are the xpinstall confirm dialog display n...
...to pass to a single install. as with the older startsoftwareupdate method, xpis installed with this method must have their own install.js files in which the full installation is defined. ...
...ingle install. as with the older startsoftwareupdate method, xpis installed with this method must have their own install.js files in which the full installation is defined. ...
MediaKeySession - Web APIs
media data. mediakeysession.expiration read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists. this value is determined by the cdm and measured in milliseconds since january 1, 1970, utc. this value may change during a session lifetime, such as when an action triggers the start of a window. ...
...ter which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists. this value is determined by the cdm and measured in milliseconds since january 1, 1970, utc. this value may change during a session lifetime, such as when an action triggers the start of a window. mediakeysession.keystatuses read only contains a reference to a read-only mediakeystatusmap of the current session's keys and their statuses. mediakeysession.sessionid read only contains a unique string generated by the cdm for the current media object and its associated keys or licenses. event handlers mediakeysession.onkeystatuseschange sets the eventhandler called when there has been a change in the keys in a session or their statuses. mediakeysession.onmessage sets the...
...ta. mediakeysession.load() returns a promise that resolves to a boolean value after loading data for a specified session object. mediakeysession.remove() returns a promise after removing any session data associated with the current object. mediakeysession.update() returns a promise after loading messages and licenses to the cdm. examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeysession' in that specification. recommendation initial definition. ...
Navigator.getBattery() - Web APIs
note: in some browsers access to this feature is controlled by feature-policy directive battery. ...
... note: in some browsers access to this feature is controlled by feature-policy directive battery. ...
...battery and establishes a handler for the chargingchange event, so that the charging state is recorded whenever it changes. let batteryischarging = false; navigator.getbattery().then(function(battery) { batteryischarging = battery.charging; battery.addeventlistener('chargingchange', function() { batteryischarging = battery.charging; }); }); for more examples and details, see battery status api. specifications specification status comment battery status apithe definition of 'navigator.getbattery()' in that specification. candidate recommendation initial definition ...
Navigator - Web APIs
Web › API › Navigator
me read only returns a domstring with the official name of the browser. do not rely on this property to return the correct value. navigatorid.appversion read only returns the version of the browser as a domstring. do not rely on this property to return the correct value. navigator.battery read only returns a batterymanager object you can use to get information about the battery charging status. navigator.connection read only provides a networkinformation object containing information about the network connection of a device. navigator.cookieenabled read only returns false if setting a cookie will be ignored and true otherwise. navigator.geolocation read only returns a geolocation object allowing accessing the location of the device. navigatorconcurrenthardware.hardwareconcur...
...of simultaneous touch contact points are supported by the current device. navigatorplugins.mimetypes read only returns an mimetypearray listing the mime types supported by the browser. navigator.online read only returns a boolean indicating whether the browser is working online. navigator.permissions read only returns a permissions object that can be used to query and update permission status of apis covered by the permissions api. navigatorid.platform read only returns a string representing the platform of the browser. do not rely on this function to return a significant value. navigatorplugins.plugins read only returns a pluginarray listing the plugins installed in the browser. navigatorid.product read only always returns 'gecko', on any browser. this property is kept o...
...9.0 returns false. javascript taint/untaint functions removed in javascript 1.2. navigator.vibrate() causes vibration on devices with support for it. does nothing if vibration support isn't available. non-standard navigator.mozislocallyavailable() lets code check to see if the document at a given uri is available without using the network. specifications specification status comment html living standardthe definition of 'the navigator object' in that specification. living standard ...
Navigator.onLine - Web APIs
the property returns a boolean value, with true meaning online and false meaning offline. the property sends updates whenever the browser's ability to connect to the network changes. the update occurs when the user follows links or when a script requests a remote page. for example, the property should return false when users click links soon after they lose internet connection. browsers implement this property differently. in chrome and safari, if the browser is not able to connect to a local area network (lan) or a router, it is offline; all other conditions return true. ...
... you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet. you could be getting false positives, such as in cases where the computer is running a virtualization software that has virtual ethernet adapters that are always "connected." therefore, if you really want to determine the online status of the browser, you should develop additional means for checking. to learn more, see the html5 rocks article, working off the grid. in firefox and internet explorer, switching the browser to offline mode sends a false value. until firefox 41, all other conditions return a true value; testing actual behavior on nightly 68 on windows shows that it only looks for lan connection like chrome and saf...
...ve example will always come out as false/undefined. to see changes in the network state, use addeventlistener to listen for the events on window.online and window.offline, as in the following example: window.addeventlistener('offline', function(e) { console.log('offline'); }); window.addeventlistener('online', function(e) { console.log('online'); }); specifications specification status comment html living standardthe definition of 'navigator.online' in that specification. living standard initial definition ...
Permissions.query() - Web APIs
Web › API › Permissions › query
}) parameters permissiondescriptor an object that sets options for the query operation consisting of a comma-separated list of name-value pairs. the available options are: name: the name of the api whose permissions you want to query. ...
...tifications and push have been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notifications and push. note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api. returns a promise that resolves to a permissionstatus object. exceptions exception explanation typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g. midi, or push with uservisibleonly). example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state == 'granted') { showlocalnewswithgeo...
... currently unsupported (e.g. midi, or push with uservisibleonly). example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state == 'granted') { showlocalnewswithgeolocation(); } else if (result.state == 'prompt') { showbuttontoenablelocalnews(); } // don't do anything if the permission was denied. }); specification specification status comment permissionsthe definition of 'query()' in that specification. working draft initial definition. ...
PushManager.hasPermission() - Web APIs
browser compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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 compatibility the compatibility table on this page is generated from structured data. if 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
ibes from // push messages. ...
...it is currently firefox-only experim...
...it is currently firefox-only experimental. browser compatibility the compatibility table on this page is generated from structured data. ...
RTCPeerConnection - Web APIs
ction.createdtmfsender() creates a new rtcdtmfsender, associated to a specific mediastreamtrack, that will be able to send dtmf phone signaling over the connection. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. connectionstatechange sent to the rtcpeerconnection object when the overall connectivity status of the rtcpeerconnection changes. also available through the onconnectionstatechange event handler property. datachannel sent to the rtcpeerconnection object when the remote peer adds an rtcdatachannel to the connection. also available through the ondatachannel event handler property. icecandidate sent to the peer connection to request that the specified candidate be transmitted to the remo...
... resolve just as spontaneously on less reliable networks, or during temporary disconnections. when the problem resolves, the connection may return to the "connected" state. "closed" the ice agent for this rtcpeerconnection has shut down and is no longer handling requests. rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property. you can detect when this value changes by watching for an event of type icegatheringstatechange. constant description "new" the peer connection was just created and hasn't done any networking yet. "gathering" the ice agent is in the process of gathering candidates for the...
... "closed" the connection is closed. note: this value moved into the rtcpeerconnectionstate enum in the may 13, 2016 draft of the specification, as it reflects the state of the rtcpeerconnection, not the signaling connection. you now detect a closed connection by checking for connectionstate to be "closed" instead. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection' in that specification. candidate recommendation initial definition. ...
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
originalpolicy: the originalpolicy of the securitypolicyviolationevent (required). referrer: the referrer of the securitypolicyviolationevent. if not included, the default value is "". sample: the sample of the securitypolicyviolationevent. if not included, the default value is "". sourcefile: the sourcefile of the securitypolicyviolationevent. if not included, the default value is "". ...
...y: the originalpolicy of the securitypolicyviolationevent (required). referrer: the referrer of the securitypolicyviolationevent. if not included, the default value is "". sample: the sample of the securitypolicyviolationevent. if not included, the default value is "". sourcefile: the sourcefile of the securitypolicyviolationevent. if not included, the default value is "". ...
...nt. if not included, the default value is "". statuscode: the statuscode of the securitypolicyviolationevent (required). violateddirective: the violateddirective of the securitypolicyviolationevent (required). return value a securitypolicyviolationevent object instance. example let spvevt = new securitypolicyviolationevent('foo', { ... }); specifications specification status comment content security policy level 3the definition of 'securitypolicyviolationevent' in that specification. working draft initial definition ...
Using Service Workers - Web APIs
vice worker implementation would use caching and onfetch rather than the xmlhttprequest api. those features are not used here so that you can focus on understanding promises. ...
...us on understanding promises. 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. somewhere in the function, we need to define what happens for the promise to resolve successfully or be rejected — i...
...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. somewhere in the function, we need to define what happens for the promise to resolve successfully or be rejected — in this case return a 200 ok status or not — and then call resolve on success, or reject on failure. the rest of the contents of this function is fairly standard xhr stuff, so we won’t worry about that for now. when we come to call the imgload() function, we call it with the url to the image we want to load, as we might expect, but the rest of the code is a little different: let body = document.queryselector('body'); let myim...
USBIsochronousInTransferPacket - Web APIs
the usbisochronousintransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferin() method of the usbdevice interface. 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. constructor usbisochronousintransferpacket.usbisochronousintransferpacket() creates a new usbisochronousintransferpacket object with the provided status and data fields. ...
...sochronous endpoint. constructor usbisochronousintransferpacket.usbisochronousintransferpacket() creates a new usbisochronousintransferpacket object with the provided status and data fields. properties usbisochronousintransferpacket.dataread only read only returns a dataview object containing the data received from the usb device in this packet, if any. usbisochronousintransferpacket.statusread only read only returns the status of the transfer request, one of: "ok" - the transfer was successful. "stall" - the device indicated an error by generating a stall condition on the endpoint. ...
... draft initial definition. ...
WebGLContextEvent - Web APIs
inheritance this interface inherits properties and methods from its parent interface, event. ...
..." 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">webglcontextevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface inherits properties from its parent interface, event. webglcontextevent.statusmessage a read-only property containing additional information about the event. methods this interface doesn't define any own methods, but inherits methods from its parent interface, event. examples with the help of the webgl_lose_context extension, you can simulate the webglcontextlost and webglcontextrestored events: var canvas = document.getelementbyid('canvas'); var gl = canvas.getconte...
... recommendation initial definition. ...
Adding 2D content to a WebGL context - Web APIs
// function loadshader(gl, type, source) { const shader = gl.createshader(type); // send the source to the shader object gl.shadersource(shader, source); // com...
...ram; } // // creates a shader of the given type, uploads the source and // compiles it. // function loadshader(gl, type, source) { const shader = gl.createshader(type); // send the source to the shader object gl.shadersource(shader, source); // compile the shader program gl.compileshader(shader); // see if it compiled successfully if (!gl.getshaderparameter(shader, gl.compile_status)) { alert('an error occurred compiling the shaders: ' + gl.getshaderinfolog(shader)); gl.deleteshader(shader); return null; } return shader; } the loadshader() function takes as input the webgl context, the shader type, and the source code, then creates and compiles the shader as follows: a new shader is created by calling gl.createshader(). the shader's source code is sent...
...bgl context, the shader type, and the source code, then creates and compiles the shader as follows: a new shader is created by calling gl.createshader(). the shader's source code is sent to the shader by calling gl.shadersource(). once the shader has the source code, it's compiled using gl.compileshader(). to check to be sure the shader successfully compiled, the shader parameter gl.compile_status is checked. to get its value, we call gl.getshaderparameter(), specifying the shader and the name of the parameter we want to check (gl.compile_status). if that's false, we know the shader failed to compile, so show an alert with log information obtained from the compiler using gl.getshaderinfolog(), then delete the shader and return null to indicate a failure to load the shader. if the shader w...
WebSocket.close() - Web APIs
Web › API › WebSocket › close
reason optional a human-readable string explaining why the connection is closing. ...
... reason optional a human-readable string explaining why the connection is closing. ...
...this string must be no longer than 123 bytes of utf-8 text (not characters). exceptions thrown invalid_access_err an invalid code was specified. syntax_err the reason string is too long or contains unpaired surrogates. note: in gecko, this method didn't support any parameters prior to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5). specifications specification status comment html living standard the definition of 'websocket.close()' in that specification. living standard initial definition ...
XMLHttpRequest.responseText - Web APIs
if the request failed or "" if the request has not yet been sent by calling send(). while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet. you know the entire content has been received when the value of readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok"). exceptions invalidstateerror the xmlhttprequest.responsetype is not set to either the empty string or "text". since the responsetext property is only valid for text content, any other value is an error condition. example var xhr = new xmlhttprequest(); xhr.open('get', '/server', true); // if specified, responsetype must be empty string or "text" xhr.responsetype = 'te...
...s not set to either the empty string or "text". since the responsetext property is only valid for text content, any other value is an error condition. ...
...httprequest(); xhr.open('get', '/server', true); // if specified, responsetype must be empty string or "text" xhr.responsetype = 'text'; xhr.onload = function () { if (xhr.readystate === xhr.done) { if (xhr.status === 200) { console.log(xhr.response); console.log(xhr.responsetext); } } }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest - Web APIs
lue that defines the response type. xmlhttprequest.responseurl read only returns the serialized url of the response or the empty string if the url is null. xmlhttprequest.responsexml read only returns a document containing the response to the request, or null if the request was unsuccessful, has not yet been sent, or cannot be parsed as xml or html. not available in workers. xmlhttprequest.status read only returns an unsigned short with the status of the response of the request. xmlhttprequest.statustext read only returns a domstring containing the response string returned by the http server. unlike xmlhttprequest.status, this includes the entire text of the response message ("200 ok", for example). note: according to the http/2 specification (8.1.2.4 response pseudo-header fields...
... xmlhttprequest.timeout is an unsigned long representing the number of milliseconds a request can take before automatically being terminated. xmlhttprequesteventtarget.ontimeout is an eventhandler that is called whenever the request times out. xmlhttprequest.upload read only is an xmlhttprequestupload, representing the upload process. ...
...the onloadend property. loadstart fired when a request has started to load data. ...
Web APIs
Web › API
tewindowshow mscandidatewindowupdate msgestureevent msgraphicstrust msmanipulationevent msrangecollection mssitemodeevent magnetometer mathmlelement mediacapabilities mediacapabilitiesinfo mediaconfiguration mediadecodingconfiguration mediadeviceinfo mediadevices mediaelementaudiosourcenode mediaencodingconfiguration mediaerror mediaimage mediakeymessageevent mediakeysession mediakeystatusmap mediakeysystemaccess mediakeysystemconfiguration mediakeys medialist mediametadata mediapositionstate mediaquerylist mediaquerylistevent mediaquerylistlistener mediarecorder mediarecordererrorevent mediasession mediasessionactiondetails mediasettingsrange mediasource mediastream mediastreamaudiodestinationnode mediastreamaudiosourcenode mediastreamaudiosourceoptions mediastreamconstraints me...
...esponse paymentvalidationerrors pbkdf2params performance performanceentry performanceeventtiming performanceframetiming performancelongtasktiming performancemark performancemeasure performancenavigation performancenavigationtiming performanceobserver performanceobserverentrylist performancepainttiming performanceresourcetiming performanceservertiming performancetiming periodicwave permissionstatus permissions photocapabilities plugin pluginarray point pointerevent popstateevent positionoptions processinginstruction progressevent promiserejectionevent publickeycredential publickeycredentialcreationoptions publickeycredentialrequestoptions pushevent pushmanager pushmessagedata pushregistrationmanager pushsubscription r rtcansweroptions rtccertificate rtcconfiguration rtc...
...prequesteventtarget xmlhttprequestresponsetype xmlserializer xpathevaluator xpathexception xpathexpression xpathnsresolver xpathresult xrboundedreferencespace xrenvironmentblendmode xreye xrframe xrframerequestcallback xrhandedness xrinputsource xrinputsourcearray xrinputsourceevent xrinputsourceeventinit xrinputsourceschangeevent xrinputsourceschangeeventinit xrpermissiondescriptor xrpermissionstatus xrpose xrreferencespace xrreferencespaceevent xrreferencespaceeventinit xrreferencespacetype xrrenderstate xrrenderstateinit xrrigidtransform xrsession xrsessionevent xrsessioneventinit xrsessioninit xrsessionmode xrspace xrsystem xrtargetraymode xrview xrviewerpose xrviewport xrvisibilitystate xrwebgllayer xrwebgllayerinit xsltprocessor ...
Event reference
fering of content. canplaythrough event html5 media the user agent can play the media up to its end without having to stop for further buffering of content. change event dom l2, html5 the change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user. chargingchange event battery status the battery begins or stops charging. chargingtimechange event battery status the chargingtime attribute has been updated. click mouseevent dom l3 a pointing device button has been pressed and released on an element. close event websocket a websocket connection has been closed. complete indexeddb a transaction successfull...
...vice such as a camera, microphone, or speaker is connected or removed from the system. devicemotion devicemotionevent device orientation events fresh data is available from a motion sensor. deviceorientation deviceorientationevent device orientation events fresh data is available from an orientation sensor. dischargingtimechange event battery status the dischargingtime attribute has been updated. domactivate uievent dom l3 a button, link, or state changing element is activated (use click instead). domattributenamechanged mutationnameevent dom l3 removed the name of an attribute changed (use mutation observers instead). domattrmodified mutationevent dom l3 the value of an attribut...
... keyboardevent dom l3 a key is pressed down, and that key normally produces a character value (use input event instead). keyup keyboardevent dom l3 a key is released. languagechange event html 5.1the definition of 'navigatorlanguage.languages' in that specification. the user's preferred languages have changed. levelchange event battery status the level attribute has been updated. load uievent dom l3 a resource and its dependent resources have finished loading. load progressevent progress and xmlhttprequest progression has been successful. loadeddata event html5 media the first frame of the media has finished loading. loadedmetadata event html5 media the metadat...
Evolution of HTTP - HTTP
resource (not the url as both the protocol, server, and port are unnecessary once connected to the server). get /mypage.html the response is extremely simple too: it only consisted of the file itself. <html> a very simple html page </html> unlike subsequent evolutions, there were no http headers, meaning that only html files could be transmitted, but no other type of documents. ...
...were no status or error codes: in case of a problem, a specific html file was send back with the description of the problem contained in it, for human consumption. ...
... ...
Cache-Control - HTTP
ension cache-control directives are not part of the core http caching standards document. check the compatibility table for their support; user-agents that don't recognize them should ignore them. cache-control: immutable cache-control: stale-while-revalidate=<seconds> cache-control: stale-if-error=<seconds> directives cacheability a response is normally cached by the browser if: it has a status code of 301, 302, 307, 308, or 410 and cache-control does not have no-store, or if proxy, does not have private and authorization is unset either has a status code of 301, 302, 307, 308, or 410 or has public, max-age or s-maxage in cache-control or has expires set public the response may be stored by any cache, even if the response is normally non-cacheable. private the...
...edit the response body, content-encoding, content-range, or content-type. it therefore forbids a proxy or browser feature, such as google’s web light, from converting images to minimize data for a cache store or slow connection. only-if-cached set by the client to indicate "do not use the network" for the response. the cache should either respond using a stored response, or respond with a 504 status code. conditional headers such as if-none-match should not be set. there is no effect if only-if-cached is set by a server as part of a response. examples preventing caching to disable caching of a resource, you can send the following response header: good: cache-control: no-store bad: cache-control: private,no-cache,no-store,max-age=0,must-revalidate,pre-check=0,post-check=0 ...
...ntrol: public, max-age=604800, immutable requiring revalidation specifying no-cache or max-age=0 indicates that clients can cache a resource and must revalidate each time before using it. ...
Tk - HTTP
Web › HTTP › Headers › Tk
g gateway or multiple parties. the server is acting as a gateway to an exchange involving multiple parties. n not tracking. t tracking. ...
... response header forbidden header name no syntax tk: ! (under construction) tk: ? (dynamic) tk: g (gateway or multiple parties) tk: n (not tracking) tk: t (tracking) tk: c (tracking with consent) tk: p (potential consent) tk: d (disregarding dnt) tk: u (updated) directives ! under construction. the origin server is currently testing its communication of tracking status. ? dynamic. the origin server needs more information to determine tracking status. g gateway or multiple parties. the server is acting as a gateway to an exchange involving multiple parties. n not tracking. t tracking. c tracking with consent. the origin server believes it has received prior consent for tracking this user, user agent, or device. p potential consent. the origin server ...
...1 data until such consent has been determined, and further promises to delete or permanently de-identify within 48 hours any dnt:1 data received for which such consent has not been received. d disregarding dnt. the origin server is unable or unwilling to respect a tracking preference received from the requesting user agent. u updated. the request resulted in a potential change to the tracking status applicable to this user, user agent, or device. examples a tk header for a resource that claims not to be tracking would look like: tk: n specifications specification status comment tracking preference expression (dnt)the definition of 'tk header field' in that specification. obsolete initial definition. ...
Network Error Logging - HTTP
dy" key contains the network error report. http 400 (bad request) response { "age": 20, "type": "network-error", "url": "https://example.com/previous-page", "body": { "elapsed_time": 338, "method": "post", "phase": "application", "protocol": "http/1.1", "referrer": "https://example.com/previous-page", "sampling_fraction": 1, "server_ip": "137.205.28.66", "status_code": 400, "type": "http.error", "url": "https://example.com/bad-request" } } dns name not resolved note that the phase is set to dns in this report and no server_ip is available to include. { "age": 20, "type": "network-error", "url": "https://example.com/previous-page", "body": { "elapsed_time": 18, "method": "post", "phase": "dns", "protocol": "http/1.1",...
...olved note that the phase is set to dns in this report and no server_ip is available to include. ...
...connection was reset tcp.refused the tcp connection was refused by the server tcp.aborted the tcp connection was aborted tcp.address_invalid the ip address is invalid tcp.address_unreachable the ip address is unreachable tcp.failed the tcp connection failed due to reasons not covered by previous errors http.error the user agent successfully received a response, but it had a 4xx or 5xx status code http.protocol.error the connection was aborted due to an http protocol error http.response.invalid response is empty, has a content-length mismatch, has improper encoding, and/or other conditions that prevent user agent from processing the response http.response.redirect_loop the request was aborted due to a detected redirect loop http.failed the connection failed due to errors in ht...
A typical HTTP session - HTTP
Web › HTTP › Session
in client-server protocols, like http, sessions consist of three phases: the client establishes a tcp connection (or the appropriate connection if the transport layer is not tcp). 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. establishing a connection in client-server protocols, it is the client which establishes the connection. opening a connection in http means initiating a connection in the underlying transport layer, usually this is tcp. with tcp the defaul...
...hod sends data to a server so it may change its state. this is the method often used for html forms. structure of a server response after the connected agent has sent its request, the web server processes it, and ultimately returns a response. similar to a client request, a server response is formed of text directives, separated by crlf, though divided into three blocks: the first line, the status line, consists of an acknowledgment of the http version used, followed by a status request (and its brief meaning in human-readable text). subsequent lines represent specific http headers, giving the client information about the data sent (e.g. type, data size, compression algorithm used, hints about caching). similarly to the block of http headers for a client request, these http headers form a...
... date: thu, 06 dec 2018 17:35:13 gmt expires: thu, 06 dec 2018 17:35:13 gmt server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie x-cache: error from cloudfront <!doctype html... (contains a site-customized page helping the user to find the missing resource) response status codes http response status codes indicate if a specific http request has been successfully completed. responses are grouped into five classes: informational responses, successful responses, redirects, client errors, and servers errors. 200: ok. the request has succeeded. 301: moved permanently. this response code means that the uri of requested resource has been changed. 404: not found. the...
301 Moved Permanently - HTTP
Web › HTTP › Status › 301
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. a browser redirects to this page and search engines update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is sent to the new url). even if the specification requires the method (and the body) not to be altered when the redirection is performed, not all user-agents align with it - you can still find this type of bugged software out there. ...
...ation requires the method (and the body) not to be altered when the redirection is performed, not all user-agents align with it - you can still find this type of bugged software out there. ...
...uires the method (and the body) not to be altered when the redirection is performed, not all user-agents align with it - you can still find this type of bugged software out there. ...
308 Permanent Redirect - HTTP
Web › HTTP › Status › 308
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. a browser redirects to this page and search engines update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is sent to the new url). the request method and the body will not be altered, whereas 301 may incorrectly sometimes be changed to a get method. note: some web applications may use the 308 permanent redirect in a non-standard way and for other purposes. ...
... 'link-juice' is sent to the new url). the request method and the body will not be altered, whereas 301 may incorrectly sometimes be changed to a get method. ...
...ome web applications may use the 308 permanent redirect in a non-standard way and for other purposes. ...
428 Precondition Required - HTTP
Web › HTTP › Status › 428
the http 428 precondition required response status code indicates that the server requires the request to be conditional. typically, this means that a required precondition header, such as if-match, is missing. when a precondition header is not matching the server side state, the response should be 412 precondition failed. ...
... the http 428 precondition required response status code indicates that the server requires the request to be conditional. typically, this means that a required precondition header, such as if-match, is missing. when a precondition header is not matching the server side state, the response should be 412 precondition failed. ...
...ires the request to be conditional. typically, this means that a required precondition header, such as if-match, is missing. ...
429 Too Many Requests - HTTP
Web › HTTP › Status › 429
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. ...
... 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. ...
...ts 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. ...
511 Network Authentication Required - HTTP
Web › HTTP › Status › 511
the http 511 network authentication required response status code indicates that the client needs to authenticate to gain network access. this status is not generated by origin servers, but by intercepting proxies that control access to the network. network operators sometimes require some authentication, acceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport). they often identify clients who have not done so using their media access control (mac) addresses. ...
...cess. this status is not generated by origin servers, but by intercepting proxies that control access to the network. network operators sometimes require some authentication, acceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport). they often identify clients who have not done so using their media access control (mac) addresses. ...
...cceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport). ...
Porting the Library Detector - Archive of obsolete content
brary detector. the library detector tells you which javascript frameworks the current web page is using. it does this by checking whether particular objects that those libraries add to the global window object are defined. for example, if window.jquery is defined, then the page has loaded jquery. for each library that it finds, the library detector adds an icon representing that library to the status bar. it adds a tooltip to each icon, which contains the library name and version. you can browse and run the ported version in the sdk's examples directory. how the library detector works all the work is done inside a single file, librarydetector.xul this contains: a xul overlay a script the xul overlay adds a box element to the browser's status bar: the script does everything else. th...
...brary version. each test also contains a chrome:// url pointing to the icon associated with its library. the script listens to gbrowser's domcontentloaded event. when this is triggered, the testlibraries() function builds an array of libraries by iterating through the tests and adding an entry for each library which passes. once the list is built, the switchlibraries() function constructs a xul statusbarpanel element for each library it found, populates it with the icon at the corresponding chrome:// url, and adds it to the box. finally, it listens to gbrowser's tabselect event, to update the contents of the box for that window. content script separation the test objects in the original script need access to the dom window object, so in the sdk port, they need to run in a content script. in...
Downloading Files - Archive of obsolete content
normally, nsiauthprompt expects a prompt to be displayed so the user can enter cr...
...404 error for instance). // tried with .jpg, .ico, .gif (even .html). ...
Communication between HTML and your extension - Archive of obsolete content
see also interaction between privileged and non-privileged pages. communication between an html page and and extension after building a sample extension by reading carefully and following the complete instructions for building an extension i was able to get an extension that could display something on the status bar. what i wanted to do was have an extension "look" for something on an html page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation. with a lot of help from irc://irc.mozilla.org#js and irc://irc.mozilla.org#extdev i was able to get it running pretty well, but i still would rather have the client less responsible for pinging the extension to "look" for what is on the page. what i tried my...
...at triggered "onload" event // do something with the loaded page. // doc.location is a location object (see below for a link). // you can use it to make your code executed on certain pages only. if (doc && doc.addeventlistener) doc.addeventlistener("my-custom-event", myextension.customreceived, false); since the event is dispatched after the element in the html is updated by the statuschanged function, the element that extension is looking for is there to find. ...
How to convert an overlay extension to restartless - Archive of obsolete content
if your file is text, use "text" as your data type. if you're getting json this way make sure to explicitly set the type as "text" if you intend to parse it yourself. even though it says that the default type is "text", firefox will attempt to au...
... if your file is text, use "text" as your data type. ...
Listening to events in Firefox extensions - Archive of obsolete content
tion is called by the pageshow event and is used to populate the character set menu and update the ui elements associated with any detected feeds or opensearch plugins for the website. xulbrowserwindow xulbrowserwindow is an nsiwebprogresslistener used to get progress events for the currently visible browser. ...
...e site's security changes tabsprogresslistener this object is a tabs progress listener and receives events for all browsers in the window. it is used to detect when a webpage attempts to refresh itself and allow the user to block the attempt. how events are used by the tabbrowser tabbrowser maintains a set of objects relating to progress listening for each browser. first it creates a browser-status-filter and adds it as a web progress listener for the browser. next it creates an internal object to receive all web progress events from the browser. this is created by the method mtabprogresslistener(). this receives events from the browser-status-filter. the filter acts to reduce the number of status and progress events to improve performance. the filters are held in the array mfilters, the in...
Firefox addons developer guide - Archive of obsolete content
should we keep this part ? gen's opinion: yes, because it is important for developers to make informed decisions regarding oss licenses and it was a part of the original guide. opinions: i think we should be careful about adding new contents to this guide. the original versio...
...med decisions regarding oss licenses and it was a part of the original guide. opinions: i think we should be careful about adding new contents to this guide. the original version of this guide was written as a first step guide for beginners. if we add too much topics, they possibly make learners weary. an alternative idea: writing a "next step" guide for interested people such as adding statusbar buttons, sidebar panels, and so on. (by piro) i do think this guide should cover more advanced topics as well. there already is a tutorial for beginners: building an extension. slosd 09 april 2009 ...
CSS3 - Archive of obsolete content
animations, as well as new layouts like multi-columns, flexible box or grid layouts. experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future. modules and the standardization process css level 2 needed 9 years, from august 2002 to june 2011 to reach the recommendation status. this was due to the fact that a few secondary features held back the whole specification. in order to accelerate the standardization of non-problematic features, the css working group of the w3c, in a decision referred as the beijing doctrine, divided css in smaller components called modules . each of these modules is now an independent part of the language and moves towards standardization at i...
...css2.1 and the mature modules. the w3 consortium periodically publishes such snapshots, like in 2007, 2010, 2015, 2017, and 2018. though today no module with a level greater than 3 is standardized, this will change in the future. some modules, like selectors 4 or css borders and backgrounds level 4 already have an editor's draft, though they haven't yet reached the first published working draft status. css modules status completed modules a few css modules already became a standard as a w3c recommendation. these should be no more changes. css color module level 3 recommendation since june 7th, 2011 adds the opacity property, and the hsl(), hsla(), rgba() and rgb() functions to create <color> values. it also defines the currentcolor keyword as a valid color. t...
Finding the code to modify - Archive of obsolete content
ind the specific code within that file. again, the dom inspector makes this easy. the "document - dom nodes" pane on the left-hand side of the inspector window displays a tree representation of the browser window's xul file. when you select a node in the tree, a red border flashes for several seconds around the visual representation of that node in the browser window. ...
...he "document - dom nodes" pane on the left-hand side of the inspector window displays a tree representation of the browser window's xul file. when you select a node in the tree, a red border flashes for several seconds around the visual representation of that node in the browser window. scroll down the tree to the statusbar node and select it. notice the flashing red border around the horizontal status bar at the bottom of the browser window. click the plus sign next to the statusbar node in the dom inspector and select each statusbarpanel node in turn. notice the flashing red border around each different section of the status bar. open the navigator.xul file in a text editor. find the statusbar element within it. this is where we are going to add our tinderbox status ui. inspectorwidget the...
In-Depth - Archive of obsolete content
ded) will override the operating system default. use this when you want one or two controls to look different from the operating systems defaults. ...
...verride the operating system default. use this when you want one or two controls to look different from the operating systems defaults. ...
Download Manager improvements in Firefox 3 - Archive of obsolete content
ion about past and present downloads, and request notifications as to the progress of downloads. nsidownload describes a file in the download queue; these files may currently be queued for download, actively being downloaded, or finished being downloaded. nsidownloadprogresslistener applications and extensions implement this interface to be made aware of changes in the status of downloads. nsidownloadmanagerui implement this interface to replace or augment the download manager user interface. other download manager documentation download manager preferences this article lists preferences used by the download manager as well as their default values. the download manager schema this article describes the database format used ...
...nces used by the download manager as well as their default values. the download manager schema this article describes the database format used to store and track information about each download. examples monitoring downloads an example showing how to use the new download manager apis to create a download log window that shows all past and present downloads and their status, including the start and end times of the downloads, the download speed, and more. also demonstrates the storage api. ...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
specify a username and password for the given url needed. int readystate state of the request. possible values: value description 0 uninitialized - open() has not been called yet. 1 loading - send() has not been called yet. 2 loaded - send() has been called, headers and status are available. 3 interactive - downloading, responsetext holds the partial data. 4 completed - finished with all operations. string responsetext string containing the response. domdocument responsexml dom document containing the response. void send(variant body) initiates the request.
...ontaining the response. void send(variant body) initiates the request. if body is defined, it is sent as the body of the post request. body can be an xml document or a string serialized xml document. void setrequestheader (string headername, string headervalue) sets an http request header for use in the http request. has to be called after open() is called. string status the status code of the http response. xslt differences mozilla supports xsl transformations (xslt) 1.0. it also allows javascript to perform xslt transformations and allows running xpath on a document. mozilla requires that you send the xml and xslt files with an xml mimetype (text/xml or application/xml). this is the most common reason why xslt won't run in mozilla but will in intern...
Configuration - Archive of obsolete content
unique to the web application, but also to you. this identifier becomes the name of the profile folder where your webapp is installed: google.mail@your.name uri the uri/url of the web app: http://mail.google.com name the display name of the application: gmail icon the icon you want to use for the prism window when running this web app. the actual icon file should be stored in the webapp bundle. status turns the status messages on or off for this web app: yes or no location turns the readonly location bar on or off for this web app: yes or no navigation turns the hotkey history navigation (alt+left, alt+right and alt+home) on or off for this web app: yes or no splashscreen filename of an html page to be displayed while the app is loading. the file must be located in the web app home directory: ...
...ism profile folder. ...
Supporting private browsing mode - Archive of obsolete content
e variable, then turn on private browsing by setting its value to true. from that point until we restore the original value of the private browsing mode setting, things are done privately. this allows us to, for example, work with the places database without affecting its contents. private browsing notifications there are notifications available that allow you to easily watch for changes to the status of the private browsing mode, including detecting when it turns on and off. in addition, there is a browser:purge-session-history notification that is sent when the browser purges private data that extensions can watch in order to know when it's time to do the same. a private browser listener helper object this helper object registers listeners for private browsing mode changes. this handles in...
...ly enabled, as shown here: var listener = new privatebrowsinglistener(); if (listener.inprivatebrowsing) { // we are in private browsing mode! } else { // we are not in private browsing mode! } in addition, you can install watcher functions to be called when private browsing turns on and off, as shown in the following example. this lets you passively monitor for changes in private browsing status. var listener = new privatebrowsinglistener(); listener.watcher = { onenterprivatebrowsing : function() { // we have just entered private browsing mode! }, onexitprivatebrowsing : function() { // we have just left private browsing mode! } }; canceling shutting off private browsing mode extensions can prevent private browsing mode from being shut off. an extension might wish to ...
XUL Events - Archive of obsolete content
vent 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>. ...
...he mouse or by pressing a shortcut key. you should always use the command event instead of click because it will be called in all of the needed cases. attribute: oncommand commandupdate this event occurs when a command update occurs on a <commandset> element. you would use this to update the disabled status of its commands. attribute: oncommandupdate contextmenu this event is sent to an element when the user requests to open the context menu for the element. the action to do this varies by platform, but it will typically be a right click. this handler is usually used to dynamically set the commands on a...
MenuItems - Archive of obsolete content
is shown, whereas if the checkbox is off, the toolbar is not shown. the user can select the menu item to switch the toolbar visibility. this type of menuitem can be created by using the type attribute and setting it to the value "checkbox". <menu label="view" accesskey="v"> <menupopup> <menuitem label="show toolbar" accesskey="t" type="checkbox" checked="true"/> <menuitem label="show status bar" accesskey="s" type="checkbox"/> </menupopup> </menu> both menuitems are of the checkbox type. the first menuitem is checked by default, as indicated by the checked attribute set to the value true. the second menuitem is not checked by default. when the user activates the menuitem, the command event gets fired. from within a command listener, you can execute code which will change the s...
...e="checkbox"/> </menupopup> </menu> both menuitems are of the checkbox type. the first menuitem is checked by default, as indicated by the checked attribute set to the value true. the second menuitem is not checked by default. when the user activates the menuitem, the command event gets fired. from within a command listener, you can execute code which will change the state of the toolbar or status bar or whatever it is that need changing. you do not need to update the checked attribute as the menuitem will update this automatically before the command event is fired. note that the checked state is updated before the command event fires, so if you use the menuitem's checked attribute within the command listener, it will already be in the new state. <script> function changetoolbarstate(even...
Menus - Archive of obsolete content
appears from the screen again. the menu element the menu element is used for the labels on a menubar and for the labels of submenus. for information about submenus, see submenus below. the label for the menu element is specified using the label attribute. in the example below, the menu has the label 'view'. <menu label="view"> <menupopup> <menuitem label="toolbar"/> <menuitem label="status bar"/> </menupopup> </menu> when the menu is clicked, it opens the menupopup contained within it. for this reason, a menupopup should be placed as a direct child of the menu. the menu can also be opened by using the keyboard. the user can press a key to highlight the menu labels and navigate with the cursor keys. the key is different for each platform; on windows f10 can be used. another way...
...by nesting a menu element inside another menupopup. when the mouse is moved over the submenu label, or the cursor keys move the current item to the submenu, that menu's popup appears. it will close when the mouse is moved away or the current item is changed. <menubar id="sample-menubar"> <menu id="view-menu" label="view"> <menupopup> <menuitem label="toolbar"/> <menuitem label="status bar"/> <menuseparator/> <menu label="sort" accesskey="s"> <menupopup> <menuitem label="by name"/> <menuitem label="by date"/> </menupopup> </menu> </menupopup> </menu> </menubar> in this example, a top level 'view' menu has two child menuitems, a separator and a submenu created with the menu tag. the menu has the label 'sort' and an ...
Textbox (XPFE autocomplete) - Archive of obsolete content
this should be one of the characters that appears in the label attribute for the element. alwaysopenpopup obsolete since gecko 1.9.1 type: boolean note: applies to: t...
...completesession. getsessionbyname( name ) obsolete since gecko 26 return type: nsiautocompletesession returns the session object with the given name. this will return an object of type nsiautocompletesession. getsessionresultat( session, index ) obsolete since gecko 26 return type: result item returns the result item at the specified index for the specified session. getsessionstatusat( index ) obsolete since gecko 26 return type: any value listed in nsiautocompletestatus returns the status for the session object with the given index. getsessionvalueat( session, index ) return type: result value returns the result value at the specified index for a specific session. removesession( session ) obsolete since gecko 26 return type: void removes a session ob...
XUL Questions and Answers - Archive of obsolete content
ew 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" here // (...
...in addition i need to evaluate the browser contentdocument dom in order to clean "target" attributes on links, and so on. */ how do i crea...
XUL Reference - Archive of obsolete content
member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring tool...
...g tab tabbox tabpanel tabpanels tabs controls --- text and images label caption image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker ...
action - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ,...
...ip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), ...
arrowscrollbox - Archive of obsolete content
if false, the mouse must be hovered over the arrows to scroll automatically. disabled type: boolean indicates whether the element is disabled or not. if this attribute is set, the element is di...
... higher tabindex are later in the tab sequence. properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width disabled type: boolean gets and sets the value of the disabled attribute. scrollboxobject type: nsiscrollboxobject the scroll box object implements the nsiscrollboxobject interface, which may be used to retrieve and adjust the scroll position of the list box. scrollincrement type: integer a read only propert...
assign - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
bbox - Archive of obsolete content
Archive › Mozilla › XUL › bbox
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
binding - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable ref...
...ement. it can be a variable reference or an rdf resource uri. ...
bindings - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value. predicate type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference...
... be a variable reference or an rdf resource uri. ...
box - Archive of obsolete content
Archive › Mozilla › XUL › box
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
broadcasterset - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
column - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
columns - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
commandset - Archive of obsolete content
he command dispatcher. focus: occurs when the focused element changes. select: occurs when the selected text changed. clipboard: occurs when the clipboard is changed. undo: occurs when the undo buffer is changed. oncommandupdate type: script code this event occurs when a command update occurs. you would use this to update the disabled status of items. targets type: comma-separated list of element ids a comma-separated list of element ids that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all elements are valid. the command update will only occur when the event occurs to one of the specified elements. properties inherited properties align, ,...
... event occurs to one of the specified elements. ...
conditions - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
deck - Archive of obsolete content
Archive › Mozilla › XUL › deck
you may select an item by assigning its index to this property. by assigning -1 to this property, all items will be deselected. returns -1 if no items are selected do not hide panels; the deck element o...
...ning a value to this property will modify the selected panel. ...
dropmarker - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
...indicating the type of accessibility object for the element. ...
grid - Archive of obsolete content
Archive › Mozilla › XUL › grid
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
grippy - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
groupbox - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
...indicating the type of accessibility object for the element. ...
hbox - Archive of obsolete content
Archive › Mozilla › XUL › hbox
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
keyset - Archive of obsolete content
if this attribute is set, the element is disabled. disabled elements are usually drawn with grayed-out text. if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. in the c...
...e, as it may need to update additional state. ...
listcol - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
listcols - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
listhead - Archive of obsolete content
disabled type: boolean gets and sets the value of the disabled attribute. inherited properties align, , allowevents, , boxobject, builder, , , , classname,...
...an gets and sets the value of the disabled attribute. ...
listheader - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
...indicating the type of accessibility object for the element. ...
member - Archive of obsolete content
container type: ? a variable reference to a node that is expected to be a container. if the variable is the same as the uri attribute on the ...
..., the resource must be a container element in order to match. ...
observes - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
page - Archive of obsolete content
Archive › Mozilla › XUL › page
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
popupset - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
preferences - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...also executes code specified in onchanged attribute of the element. see also the description of change event of <preference>. void observe(in nsisupports asubject, in string atopic, in wstring...
progressmeter - Archive of obsolete content
max type: integer gets and sets the value of the max attribute. mode type: string gets and sets the value of the mode attribute. value type: stri...
... and set using the textbox.value and menulist.value syntax. ...
query - Archive of obsolete content
Archive › Mozilla › XUL › query
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
queryset - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
resizer - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
row - Archive of obsolete content
Archive › Mozilla › XUL › row
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
rows - Archive of obsolete content
Archive › Mozilla › XUL › rows
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
script - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
scrollbox - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
scrollcorner - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
separator - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
spacer - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
spinbuttons - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
stack - Archive of obsolete content
Archive › Mozilla › XUL › stack
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
stringbundleset - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
tabpanel - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
template - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
textnode - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
titlebar - Archive of obsolete content
properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu...
...e did not work for title bars prior to firefox 3. ...
toolbargrippy - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , m...
...ible returns the accessibility object for the element. ...
toolbaritem - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
toolbarpalette - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
toolbarseparator - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id...
... indicating the type of accessibility object for the element. ...
toolbarset - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , ...
...tip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), g...
toolbarspacer - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
...indicating the type of accessibility object for the element. ...
toolbarspring - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, i...
...indicating the type of accessibility object for the element. ...
treechildren - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
treecols - Archive of obsolete content
inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
...indicating the type of accessibility object for the element. ...
treerow - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
treeseparator - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
triple - Archive of obsolete content
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
vbox - Archive of obsolete content
Archive › Mozilla › XUL › vbox
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
where - Archive of obsolete content
Archive › Mozilla › XUL › where
coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, ...
...p, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
Archived Mozilla and build documentation - Archive of obsolete content
creating a mozilla extension a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection). this tutorial walks you through the process of building a mozilla extension that adds an icon to mozilla's status bar showing the current status of the mozilla source code (i.e. whether or not the latest version of the code is compiling successfully and passing tests). the extension will access tinderbox, mozilla.org's webtool for tracking source code status, to get the status of the code. creating a skin for firefox/getting started download the latest version of fi...
...scuss later. browsers, like internet explorer 4, that were built before the conception of w3c standards inherited many quirks. in this article, i will describe mozilla's quirks mode, which provides strong backwards html compatibility with internet explorer and other legacy browsers. monitoring downloads firefox 3 makes it easier than ever to monitor the status of downloads. although it was possible to do so in previous versions of firefox, it was previously only possible for one observer to do so at a time. firefox 3 introduces new api that allows any number of listeners to observe downloads. mozilla application framework the mozilla application framework: for powerful, easy to develop cross-platform applications ...
2006-09-22 - Archive of obsolete content
update' test paul reed made a test of the 'major update' feature available on sept. 22nd internal rc1 testing complete firefox 2 internal rc1 testing concluded on sept. 25th. ...
...t. 22nd internal rc1 testing complete firefox 2 internal rc1 testing concluded on sept. 25th. areas tested and results available at the above link. ...
2006-11-24 - Archive of obsolete content
announcments bon echo status mike beltzner posted a small to-do list with regards to bon echo firefox 1.5.0.9/2.0.0.1 jay patel posted an update of bugs for the firefox 1.5.0.9/2.0.0.1 releases discussion non-ascii rendering performance boris zbarsky made some suggestions on how to improve international font rendering cvs commit access changes a large discussion went on about changes to policies surrounding cvs commit access project drivers and technical oversight mike connor suggested ways to better organize project management, policy making, and technical oversight. ...
...prove international font rendering cvs commit access changes a large discussion went on about changes to policies surrounding cvs commit access project drivers and technical oversight mike connor suggested ways to better organize project management, policy making, and technical oversight. others gave input on this as well meetings because of the firefox summit last week there is no project status meeting this week november 22 gecko 1.9/gran paradiso status meeting: (agenda) ...
NPAPI plugin developer guide - Archive of obsolete content
propriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initiali...
...stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in ...
Common Firefox theme issues and solutions - Archive of obsolete content
mode="text"]) to those style rules. for instance use toolbar[iconsize="small"]:not ([mode="text"]). a little experimenting may be required to fully address this issue with your theme. address bar identity box is missing padlock icons for secure sites in firefox 14 and later the identity box has been significantly changed and the favicon has been replaced by an icon that indicates the website's status. in the case of secure sites the icon must be a padlock. to fix this issue, you need to copy the files chrome://browser/skin/identity-icons-generic.png, chrome://browser/skin/identity-icons-https.png and chrome://browser/skin/identity-icons-https-ev.png to your browser folder. you can modify/redesign these icons to match your theme provided appropriate padlock icons are used for secure sites but ...
... web console close button is missing the web console (tools > web developer > web console) is missing its close button, which makes it impossible to close. web console close button sprite mapping is messed up on the web console (tools > web developer > web console) the sprite mapping for the close button is messed up. styl...
Theme changes in Firefox 2 - Archive of obsolete content
t png used as an overlay on top of items that are disabled in the add-ons manager. mozapps/extensions/itemenabledfader.png new file; a translucent png used as an overlay on top of items that are enabled in the add-ons manager. mozapps/extensions/notifybadges.png new file; contains the icons used ito badge the icons for add-ons in the add-on manager window to indicate their status. these look like this in the default theme: the first icon (green here) indicates that an add-on has an update available. the second icon (yellow here)appears to be used for blocklisted items; trying to confirm. the third icon (red here) indicates that an add-on is disabled, either by the user or because it's incompatible with the application. the fourth icon (blue ...
...nger used in firefox 2 and should be removed: #contributorsbox #creatorbox #extensioncontributors #extensioncontributors #extensioncreatorlabel the following styles were added: .indent .sectiontitle you may wish to make changes to other styles as well. ...
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
ion name previously returned from debug.mstraceasyncoperationstarting. example the following code provides an example of tracing an asynchronous call for a windows 8.x store app. ...
...ion() { var opid = debug.mstraceasyncoperationstarting('async trace'); dosomethingasync().then(function (result) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_success); debug.mstraceasynccallbackstarting(opid); // process result of async operation. }, function (error) { debug.mstraceasyncoperationcompleted(opid, debug.ms_async_op_status_error); debug.mstraceasynccallbackstarting(opid); }); debug.mstraceasynccallbackcompleted(); } function dosomethingasync() { return winjs.promise.as(true); } asyncwrapperfunction(); requirements supported in the internet explorer 11 standards document mode. also supported in store apps (windows 8.1 and windows phone 8.1). not supported in the following document modes: q...
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
the debug.msupdateasynccallbackrelation function updates the relationship status between a synchronous work item and the associated asynchronous operation. syntax debug.msupdateasynccallbackrelation(relatedasyncoperationid, relationtype) parameters relatedasyncoperationid the id associated with the asynchronous operation. relationtype optional the value that specifies the relationship status. remarks the synchronous work item is typically the callback function for the asynchronous operation. this function may be called when an asynchronous operation is aborted, when a join operation is used, or in other scenarios. ...
...chronous operation. relationtype optional the value that specifies the relationship status. remarks the synchronous work item is typically the callback function for the asynchronous operation. this function may be called when an asynchronous operation is aborted, when a join operation is used, or in other scenarios. the possible values for relationtype include: debug.ms_async_callback_status_assign_delegate debug.ms_async_callback_status_join debug.ms_async_callback_status_chooseany debug.ms_async_callback_status_cancel debug.ms_async_callback_status_error for more information, see debug constants. note: some debugging tools do not display the information sent to the debugger by this function. requirements supported in the internet explorer 11 stand...
Introduction to game development for the Web - Game development
rmation about your sales and your game's reach. you get to manage your customer relationship more closely, in your own way. no more having customer feedback filtered through an app store's limited mechanisms. engage with your customers the way you want to, without a middleman. your players can play your game anywhere, anytime. because the web is ubiquitous, your customers can check their game's status on their phones, tablets, their home laptops, their work desktops, or anything else. web technologies for game developers for the tech folks, let's dig into the apis the web brings to the table that cater to game developers. here's a thorough list to give you a taste of what the web can do for you: full screen api this simple api lets your game take over the entire screen, thereby immersi...
... ...
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
in a row with the same effect while leaving the server in the same state. in other words, an idempotent method should not have any side-effects (except for keeping statistics). implemented correctly, the get, head, put, and delete method are idempotent, but not the post method. all safe methods are also idempotent. 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. another implication of delete being idempotent is that developers should not implement restful apis with a delete last entry functionality using the delete method. note that the idempotence of a method is not guaranteed by the server and some applications...
... technical knowledge description of common idempotent methods: get, head, put, delete, options, trace ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
tructure crud (create, read, update, delete) is an acronym for ways one can operate on stored data. it is a mnemonic for the four basic functions of persistent storage. crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status. 53 csp glossary, http, infrastructure a csp (content security policy) is used to detect and mitigate certain types of website related attacks like xss and data injections. 54 csrf glossary, security csrf (cross-site request forgery) is an attack that impersonates a trusted user and sends a website unwanted commands. 55 css css, codingscrip...
...delivered without unexpected manipulation. it works by allowing you to provide a cryptographic hash that a fetched file must match. 395 stun glossary, infrastructure, stun, webmechanics, webrtc stun (session traversal utilities for nat) is an auxiliary protocol for transmitting data around a nat (network address translator). stun returns the ip address, port, and connectivity status of a networked computer behind a nat. 396 svg beginner, codingscripting, glossary, graphics, svg, l10n:priority scalable vector graphics (svg) is a 2d vector image format based on an xml syntax. 397 svn collaborating, glossary apache subversion (svn) is a free source control management (scm) system. it allows developers to keep a history of text and code ...
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
lf 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. (for example, firefox does not support it per https://bugzilla.mozilla.org/show_bug.cgi?id=109553.) other methods, like put or delete are not cacheable and their result cannot be cached. the status code of the response is known by the application caching, and it is considered cacheable. the following status code are cacheable: 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501. there are specific headers in the response, like cache-control, that prevents caching. note that some non-cacheable requests/responses to a specific uri may invalidate previously cached responses on the sam...
... 300, 301, 404, 405, 410, 414, and 501. there are specific headers in the response, like cache-control, that prevents caching. note that some non-cacheable requests/responses to a specific uri may invalidate previously cached responses on the same uri. for example, a put to pagex.html will invalidate all cached get or head requests to the same uri. when both, the method of the request and the status of the response, are cacheable, the response to the request can be cached: get /pagex.html http/1.1 (…) 200 ok (…) a put request cannot be cached. moreover, it invalidates cached data for request to the same uri done via head or get: put /pagex.html http/1.1 (…) 200 ok (…) a specific cache-control header in the response can prevent caching: get /pagex.html http/1.1 (…) 200 ok ...
Index - Learn web development
we'll go on to look at how we handle events in react, and start adding some interactivity. 275 componentizing our svelte app beginner, components, frameworks, javascript, learn, svelte, client-side, conditional rendering, passing data now we have all of our app's required functionality in place. we can display, add, edit and delete todos, mark them as completed, and filter by status. 276 creating our first vue component beginner, components, frameworks, javascript, learn, client-side, props, state, vue and that will do for this article. at this point we have a nicely-working todoitem component that can be passed a label to display, will store its checked state, and will be rendered with a unique id each time it is called. you can check if the unique ids ...
...ces that you should go on to, to continue your svelte learning journey. 278 dynamic behavior in svelte: working with variables and props beginner, frameworks, javascript, learn, svelte, variables, client-side, props that will do for now! in this article we already implemented most of our desired functionality. our app can display, add, and delete todos, toggle their completed status, show how many of them are completed and apply filters. 279 ember interactivity: footer functionality, conditional rendering beginner, ember, frameworks, javascript, learn, client-side, conditional rendering that's enough for now. at this point, not only can we mark todos as complete, but we can clear them as well. now the only thing left to wire up the footer are the three f...
Making decisions in your code — conditionals - Learn web development
get an ice cream.'; } else if (choice === 'sunny' && temperature >= 86) { para.textcontent = 'it is ' + temperature + ' degrees outside — really hot! if you want to go outside, make sure to put some sunscreen on.'; } so for example, the first code block will only be run if choice === 'sunny' and temperature < 86 return true. ...
...e. let's look at a quick or example: if (icecreamvanoutside || housestatus === 'on fire') { console.log('you should leave the house quickly.'); } else { console.log('probably should just stay in then.'); } the last type of logical operator, not, expressed by the ! operator, can be used to negate an expression. let's combine it with or in the above example: if (!(icecreamvanoutside || housestatus === 'on fire')) { console.log('probably should just stay in then.'); } else { console.log('you should leave the house quickly.'); } in this snippet, if the or statement returns true, the not operator will negate it so that the overall expression returns false. you can combine as many logical statements together as you want, in whatever structure. the following example executes the code insi...
Introduction to the server side - Learn web development
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. the response contains a status line indicating whether or not the request succeeded (e.g. "http/1.1 200 ok" for success). the body of a successful response to a request would contain the requested resource (e.g. a new html page, or an image, etc...), which could then be displayed by the web browser. static sites the diagram below shows a basic web server architecture for a static site (a static site is one that returns the...
...eb server architecture for a static site (a static site is one that returns the same hard-coded content from the server whenever a particular resource is requested). when a user wants to navigate to a page, the browser sends an http "get" request specifying its url. the server retrieves the requested document from its file system and returns an http response containing the document and a success status (usually 200 ok). if the file cannot be retrieved for some reason, an error status is returned (see client error responses and server error responses). dynamic sites a dynamic website is one where some of the response content is generated dynamically, only when needed. on a dynamic website html pages are normally created by inserting data from a database into placeholders in html templates (t...
Working with Svelte stores - Learn web development
d the following import statement below the existing ones: import { alert } from '../stores.js' update your addtodo() function like so: function addtodo(name) { todos = [...todos, { id: newtodoid, name, completed: false }] $alert = `todo '${name}' has been added` } update removetodo() like so: function removetodo(todo) { todos = todos.filter(t => t.id !== todo.id) todosstatus.focus() // give focus to status heading $alert = `todo '${todo.name}' has been deleted` } update the updatetodo() function to this: function updatetodo(todo) { const i = todos.findindex(t => t.id === todo.id) if (todos[i].name !== todo.name) $alert = `todo '${todos[i].name}' has been renamed to '${todo.name}'` if (todos[i].completed !== todo.completed) $...
...ontains dynamic content that should be announced by assistive technologies with the aria-live property followed by the politeness setting, which is used to set the priority with which screen readers should handle updates to that regions. the possible settings are off, polite, or assertive. for common situations, you also have several predefined specialized role values that can be used, like log, status and alert. in our case, just adding a role="alert" to the <div> container will do the trick, like this: <div role="alert" on:click={() => visible = false}> in general, testing your applications using screen readers is a good idea, not only to discover accessibility issues but also to get used to how visually impaired people use the web. you have several options, like nvda for windows, chromevo...
Accessibility API cross-reference
structure (abstract role) represents an entire table table table tab...
... statictext label label see aria-readonly the text nodes of html elements are uneditable by default, apart from <input type=text>, or those with a contenteditable attribute entire status bar. in aria, a type of live region whose content is advisory information for the user but is not important enough to justify an alert, often but not necessarily presented as a status bar. statusbar n/a n/a status a document structural element. structure (abstract role) represents an entire table table table table table <table> a container for the resources associated with a tab, where each tab is contained in a tablist. tabpanel ...
Gecko info for Windows accessibility vendors
unique features role_table html: <table> dhtml: role="wairole:grid" (in this case state_focusable is set) accname is supported via <caption> first child of table or summary attribute role_columnheader xul: tree column headers html: <th> ...
... unique features role_table html: <table> dhtml: role="wairole:grid" (in this case state_focusable is set) accname is supported via <caption> first child of table or summary attribute role_columnheader xul: tree column headers html: <th> dhtml: role="wairol...
Creating Sandboxed HTTP Connections
ataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // request was successfull this.mcallbackfunc(this.mdata); } else { // request failed this.mcallbackfunc(null); } gchannel = null; }, // nsichanneleventsink onchannelredirect: function (aoldchannel, anewchannel, aflags) { // if redirecting, store the new channel gchannel = anewchannel; }, // n...
... store the new channel gchannel = anewchannel; }, // nsiinterfacerequestor getinterface: function (aiid) { try { return this.queryinterface(aiid); } catch (e) { throw components.results.ns_nointerface; } }, // nsiprogresseventsink (not implementing will cause annoying exceptions) onprogress : function (arequest, acontext, aprogress, aprogressmax) { }, onstatus : function (arequest, acontext, astatus, astatusarg) { }, // nsihttpeventsink (not implementing will cause annoying exceptions) onredirect : function (aoldchannel, anewchannel) { }, // we are faking an xpcom interface, so we need to implement qi queryinterface : function(aiid) { if (aiid.equals(components.interfaces.nsisupports) || aiid.equals(components.interfaces.nsiinterf...
Eclipse CDT Manual Setup
eating an eclipse project to create an eclipse project for your mozilla source tree, select "file > new > makefile project with existing code". in the "import existing code" window that opens, enter a meaningful project name that identifies your mozilla source tree, set the code location to the root of your source tree, select an appropriate toolchain (e.g., "macosx gcc"), and click finish. the status bar at the bottom right of the window should now show that eclipse is "refreshing the workspace" (gathering a list of all the files in the source tree). click on the little green button beside this message to open the "progress" tab, and keep an eye on the "refreshing workspace" item as you continue with the steps below. (if an "indexing" item starts after the "refreshing the workspace" item has ...
...ole tab and the build item has disappeared from the progress tab, you can start indexing the source. if indexing started automatically (see the progress tab), cancel it, since there seems to be a bug that makes it give bad results when it starts automatically at this stage. right-click the project root in the project explorer tab and select "index > rebuild". you will now see "indexing..." in the status bar at the bottom right and an indexing item in the progress tab. it will take 10 minutes or so on a decent developer machine for a full rebuild of the index. once the indexer has finished (keep an eye on the progress tab), sanity check that everything went as it should have by right-clicking the project in the project explorer tab and selecting "index > search for unresolved includes". if you g...
Interface Compatibility
parameters or other javascript techniques. where appropriate, new apis should be designed so that they are compatible with future plans, and clients do not need xpcom boilerplate. this may involve using javascript modules, passing named parameters using objects, or other similar techniques. ...
... js-ctypes is the recommended way for extensions to call into os or third-party native code. ...
Implementing Download Resuming
, and store it for later use. the entity id is what ensures that the file remains unchanged. this can also be used to check whether the download is resumable: if it is not (e.g. the server is not using http 1.1), then accessing this attribute will throw an ns_error_not_resumable exception. if the download gets interrupted, necko will call the stream listener's onstoprequest method with a failure status. (todo: document what webbrowserpersist/exthandler do). the front-end code can then notify the user of this, and offer to resume the download. resuming a download in order to resume a download, you should create a channel as usual (using nsiioservice). then, you can check if it implements nsiresumablechannel. if it does not, the protocol does not support resuming. otherwise, call resumeat with...
...tch), then necko will notify the stream listener with an ns_error_entity_changed error code. the front-end may want to offer the user to get the new file from scratch in such a case. resuming not supported in some cases, it's not possible to detect whether the server supports resuming until the user actually tries to resume. in such a case, the stream listener will get an ns_error_not_resumable status. here, too, the front-end may want to offer downloading the entire file from scratch. ...
NetUtil.jsm
source, asink, acallback ); parameters asource the input stream from which to read the source data. this must be an nsiinputstream based object. asink the output stream to which to copy the data. this must be an nsioutputstream based object. acallback an optional function that will be called when the copy operation is completed. the callback receives a single parameter: the nsresult status code for the copy operation. return value returns the nsiasyncstreamcopier object that is handling the copy. exceptions thrown this method throws an exception with the message "must have a source and a sink" if either asource or asink is null. example this example writes a string to a file; it comes from the test suite for the netutil module. var file = cc["@mozilla.org/file/directory_ser...
... acallback ); parameters asource the source to open asynchronously. this may be specified as an nsiuri, nsifile, nsichannel, nsiinputstream or as a string specifying the url to open. acallback a function that will be called when the open operation is completed. 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. exceptions thrown this method throws an exception with the message "must have a source and a callback" if either asource or acallback is null. example this example shows the basic code consumers would need to implement to be correct. netutil.asyncfetch(channel, function(ainputstream, aresult) { // check that we had suc...
Application Translation with Mercurial
check what is available for translation find out on which branch localization is done for your locale: read your localization team's page by clicking on the team with your language code (e.g. "de" for german). the localization lead for your language knows the branch. the default localization branch is aurora. next check what is still untranslated by going to localization status page and click on the page for your language. in the section "applications & sign-offs", you will find different products and branches which are currently in translation. gaia-* denotes branches of firefox os, the operating system for mobile devices. firefox and fx-* denote branches of firefox for desktop, the browser for desktops and notebooks running, windows, mac os or linux. fennec and fenn...
...by clicking on the team with your language code (e.g. "de" for german) for a style guide (e.g. style guide for german). transvision offers searching for texts and text ids ("entities" or "keys"), allowing to quickly find translations for already translated texts. microsoft's terminology search allows fast lookups of localized technical terms. choosing what to translate go to the localization status page and click on the '<number> missing' label of the firefox branch on which you want to translate, e.g. fx_aurora. the page which opens has a bar holding information about how many texts (strings) have already been translated, how many there are in english and your locale and have the same text, and how many are missing in your local. the interesting part follows below as list of missing texts.
QA phase
le/3.6/x-testing, otherwise, it should be located at /path/to/your/working_dir/l10n_base/x-testing. in this directory, you should have an hg repository. you might have created it yourself by running hg init or hg clone or you might have had it created by koala when you were setting up a new localization project. also at this point, you shouldn't have any uncommitted changes (i.e., running the hg status command should show nothing). let's see what the last revision in this repository is. enter the following command: $ hg log -l 1 you should see an output similar to the one below: changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings now compare the local repository on you...
...able (0.64% used) your changeset has been successfully pushed to your repository! as you begin to move through your translations, you should commit the changes locally and push your work to this experimental repository. for instance, if you have finished translating all the .dtd and .properties files in your x-testing/browser/chrome/browser/ directory, then you should run these commands: $ hg status $ hg commit -m "translated browser/chrome/browser/" $ hg outgoing $ hg push http://hg.mozilla.org/l10n-central/x-testing note that due to the distributed nature of hg, hg commit saves the changes locally (i.e., in your computer's hg repository). you can see the history of commits with hg log. after doing hg commit, you still need to send the changes to the remote repository. this is where hg pus...
PR_CancelJob
causes a previously queued job to be canceled. ...
... causes a previously queued job to be canceled. ...
PR_CloseSemaphore
closes a specified semaphore. ...
... closes a specified semaphore. ...
PR_DeleteSemaphore
removes a semaphore specified by name from the system. ...
... removes a semaphore specified by name from the system. ...
PR_Interrupt
returns the function returns one of the following values: if the specified thread is currently blocked, pr_success. otherwise, pr_failure. 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. it is assumed that a control point has been mutually arranged between the thread doing the interrupting and the thread being interrupted. ...
...ng interrupted. when the interrupted thread reaches the prearranged point, it can communicate with its peer to discover the real reason behind the change in plans. the interrupt request remains in the thread's state until it is delivered exactly once or explicitly canceled. the interrupted thread returns pr_failure (-1) with an error code (see pr_geterror) for blocking operations that return a prstatus (such as i/o operations, monitor waits, or waiting on a condition). to check whether the thread was interrupted, compare the result of pr_geterror with pr_pending_interrupt_error. pr_interrupt may itself fail if the target thread is invalid. bugs pr_interrupt has the following limitations and known bugs: there can be a delay for a thread to be interrupted from a blocking i/o function. in al...
PR_JoinJob
blocks the current thread until a job has completed. ...
... blocks the current thread until a job has completed. ...
PR_JoinThreadPool
waits for all threads in a thread pool to complete, then releases resources allocated to the thread pool. ...
... waits for all threads in a thread pool to complete, then releases resources allocated to the thread pool. ...
PR_PostSemaphore
increments the value of a specified semaphore. ...
... increments the value of a specified semaphore. ...
PR_ShutdownThreadPool
notifies all threads in a thread pool to terminate. ...
... notifies all threads in a thread pool to terminate. ...
PR_WaitSemaphore
if the value of the semaphore is > 0, the value of the semaphore is decremented and the function returns. ...
...if the value of the semaphore is > 0, the value of the semaphore is decremented and the function returns. ...
NSS_3.12_release_notes.html
ged to sec_oid_ansix962_ecdsa_sha1_signature note: sec_oid_ansix962_ecdsa_signature_with_sha1_digest is also kept for compatibility reasons. ...
...cesscertresponse is unable to process certs in der format bug 395224: don't reject certs with critical netscapecerttype extensions in libpkix bug 395427: pkix_pl_initialize must not call nss_init bug 395850: build of libpkix tests creates links to nonexistant shared libraries and breaks windows build bug 398401: memory leak in pkix init. bug 399326: libpkix is unable to validate cert for certusagestatusresponder bug 400947: thread unsafe operation in pkix_pl_hashtable_add cause selfserv to crash. bug 402773: verify the list of public header files in nss 3.12 bug 403470: strsclnt + tstclnt crashes when pkix enabled. bug 403685: application crashes after having called cert_pkixverifycert bug 408434: crash with pkix based verify bug 411614: explicit policy does not seem to work. bug 417024: convert...
NSS 3.15.1 release notes
um type. ssl_signature_algorithms_xtn - a new value in the sslextensiontype enum type. new pkcs #11 mechanisms none. notable changes in nss 3.15.1 bug 856060 - enforce name constraints on the common name in libpkix when no subjectaltname is present. bug 875156 - add const to the function arguments of sec_certnicknameconflict. bug 877798 - fix ssltap to print the certificate_status handshake message correctly. bug 882829 - on windows, nss initialization fails if nss cannot call the rtlgenrandom function. bug 875601 - secmod_closeuserdb/secmod_openuserdb fails to reset the token delay, leading to spurious failures. bug 884072 - fix a typo in the header include guard macro of secmod.h. bug 876352 - certutil now warns if importing a pem file that contains a private key...
... nss initialization fails if nss cannot call the rtlgenrandom function. bug 875601 - secmod_closeuserdb/secmod_openuserdb fails to reset the token delay, leading to spurious failures. bug 884072 - fix a typo in the header include guard macro of secmod.h. bug 876352 - certutil now warns if importing a pem file that contains a private key. bug 565296 - fix the bug that shlibsign exited with status 0 even though it failed. the nss_survive_double_bypass_failure build option is removed. bugs fixed in nss 3.15.1 https://bugzilla.mozilla.org/buglist.cgi?list_id=5689256;resolution=fixed;classification=components;query_format=advanced;target_milestone=3.15.1;product=nss compatibility nss 3.15.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program link...
NSS API Guidelines
they can be seen as operating on a particular object. this object, that the function is operating on, should come first. for instance, in most ssl functions this is the nspr socket, or the ssl socket structure: update, final, encrypt, decrypt type functions operating on their state contexts, etc. ...
...ed char *inbuf, secbufferleninlen) encrypt and decrypt like functions which have different properties, additional parameters, callbacks, etc., should insert their additional parameters between the context (first parameter) and the output buffer. all hashing update, macing update, and encrypt/decrypt functions which act like filters should have a consistent signature: secstatus pk11_digestop(pk11context *context, unsigned char *inbuf, secbufferleninlen) functions like these which have different properties, for example, additional parameters, callbacks, etc., should insert their additional parameters between the context (first parameter) and the input buffer. within your layer, multiple similar functions should have consist...
NSS PKCS11 Functions
modulespec specifies how the module should be loaded. more information about module spec is available at pkcs11_module_specs. nss parameters may be specified in module specs used by secmod_loadusermodule. module will continue to function in the nss infrastructure until unloaded with secmod_unloadusermodule. secmod_unloadusermodule unload a pkcs #11 module. syntax #include "secmod.h" extern secstatus secmod_unloadusermodule(secmodmodule *module); parameters this function has the following parameters: module is the module to be unloaded. returns the function returns one of these values: if successful, secsuccess. if unsuccessful, secfailure. description secmod_unloadusermodule detaches a module from the nss trust domain and unloads it. the module should have previously been loaded by secmo...
...main and unloads it. the module should have previously been loaded by secmod_loadusermodule. secmod_closeuserdb close an already opened user database. note: the database must be in the internal token, and must be one created with secmod_openuserdb(). once the database is closed, the slot will remain as an empty slot until it's used again with secmod_openuserdb(). syntax #include <pk11pub.h> secstatus secmod_closeuserdb(pk11slotinfo *slot) parameters this function has the following parameter: slot a pointer to a slot info structure. this slot must a a slot created by secmod_openuserdb() at some point in the past. returns the function returns one of these values: if successful, secsuccess). if unsuccessful, secfailure. secmod_openuserdb open a new database using the softoken. syntax #includ...
NSS_Initialize
to-do: document the "sql:" prefix. certprefix [in] prefix added to the beginning of the certificate database, for example, "https-server1-". keyprefix [in] prefix added to the beginning of the key database, for example, "https-server1-". secmodname [in] name of the security module database, usually "secmod.db". ...
...#11 modules used by both nss and the java sunpkcs11 provider. this should occur after a new flag is defined for c_initialize by the pkcs#11 working group. ...
OLD SSL Reference
described in the rest of this document, and how to manage the memory used for them. additional types are described with the functions that use them or in the header files. types and structures certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus managing secitem memory secitem_freeitem secitem_zfreeitem chapter 4 ssl functions this chapter describes the core ssl functions. ssl initialization functions nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefaul...
... ssl_authcertificate ssl_badcerthook ssl_getclientauthdatahook nss_getclientauthdata ssl_handshakecallback ssl communication functions ssl_invalidatesession ssl_datapending ssl_securitystatus ssl_getsessionid ssl_setsockpeerid ssl functions used by callbacks ssl_peercertificate ssl_revealurl ssl_revealpinarg ssl handshake functions ssl_forcehandshake ssl_rehandshake ssl_...
JS_SetGCCallback
callback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_setgccallback) any jscontext. the gc callback of the associated jsruntime is set. rt jsruntime * the jsruntime for which to set the gc callback. cb jsgccallback pointer to the new callback function to use. ...
... jscontext. the gc callback of the associated jsruntime is set. rt jsruntime * the jsruntime for which to set the gc callback. cb jsgccallback pointer to the new callback function to use. callback syntax typedef enum jsgcstatus { jsgc_begin, jsgc_end, jsgc_mark_end, // obsolete since jsapi 13 jsgc_finalize_end // obsolete since jsapi 13 } jsgcstatus; typedef void (* jsgccallback)(jsruntime *rt, jsgcstatus status, void *data); name type description cx jscontext * the context in which garbage collection is happening. status jsgcstatus one of the jsgcstatus constants, described below, indicating the stage of gc. description js_setgccallback sets a callback function which the garbage collector...
JSAPI reference
nd floating-point numbers are garbage collected. ...
... the garbage collector: js_gc js_maybegc js_getgcparameter js_setgcparameter js_getgcparameterforthread added in spidermonkey 17 js_setgcparameterforthread added in spidermonkey 17 js_setgcparametersbasedonavailablememory added in spidermonkey 31 enum jsgcparamkey js_setgccallback enum jsgcstatus js_addfinalizecallback added in spidermonkey 38 enum jsfinalizestatus added in spidermonkey 17 js_removefinalizecallback added in spidermonkey 38 js_setgczeal added in spidermonkey 1.8 js_schedulegc added in spidermonkey 17 js_dumpheap added in spidermonkey 1.8 js_setgccallbackrt obsolete since jsapi 13 js_setfinalizecallback added in spidermonkey 17 obsolete since jsapi 32 js_markgcthing obsolete since jsapi 5 js_isabouttobefinalized obsolete since...
Finishing the Component
of the service manager must first obtain a pointer to the * global service manager by calling ns_getservicemanager. after that, * they can request specific services by calling getservice. * when they are finished they can ns_release() the service as usual. * * a user of a service may keep references to particular services * indefinitely and only must call release when it shuts down. * * @status frozen */ these frozen interfaces and functions are part of the gecko sdk. the rule of thumb is that interfaces outside of the sdk are considered "experimental" or unfrozen. see the following sidebar for information about how frozen and unfrozen interfaces can affect your component development, and for technical details about how interface changes beneath your code can cause havoc. the dange...
...eps you used to create the weblock.h, create a header from this idl file using the xpidl compiler. once you have these interface and header files, you can modify the weblock class to implement the nsicontentpolicy interface. the weblock class will then support four interfaces: nsisupports, nsiobserver, nsicontentpolicy, and iweblock. weblock interfaces interface name defined by status summary nsisupports xpcom frozen provides interface discovery, and object reference counting nsiobserver xpcom frozen allows messaging passing between objects nsicontentpolicy content not frozen interface for policy control mechanism iweblock web lock not frozen enables and disables weblock. also, provides access to the ur...
Components.isSuccessCode
tions when encountered in javascript, this function usually is not necessary. however, if you are using asynchronous apis, it may be essential. for example, if you ask a component or service to asynchronously perform some task, you must usually pass in an object which will be notified when the task is completed. 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()). to determine the success or failure of the complex task, you would call components.issuccesscode() upon the status code included in the notification. examples checking whether copying a stream's data succeeded the following example demonstrates copying data from a buffered nsiinputst...
...c = 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[...
nsIApplicationUpdateService
r the install directory. read only. obsolete since gecko 1.9.1.7pre isdownloading boolean true if a download is in progress, otherwise false. read only. methods adddownloadlistener() adds a listener that receives progress and state information about the update that is currently being downloaded. this information is most commonly used to update a user interface that informs the user as to the status of an update. 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. downloadupdate() starts downloading a software update. astring downloadupdate( in nsiupdate update, in boolean background ); par...
...nd progress information as the update is downloaded. downloadupdate() starts downloading a software update. astring downloadupdate( in nsiupdate update, in boolean background ); parameters update an nsiupdate object indicating the update to download. background true to download the update in the background or false to download it in the foreground. return value a string indicating the status of the update upon return: "downloading" the update is being downloaded. "pending" the update is ready to be applied. "applying" the update is in the process of being applied. "succeeded" the update has been installed successfully. "download-failed" the update failed to be downloaded. "failed" installing the update failed. pausedownload() pauses the currently active update download. void paused...
nsICacheEntryDescriptor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface provides a cache entry descriptor. ...
... pending requests to skip the cache. void doom(); parameters none. doomandfailpendingrequests() this method with the write access can doom the cache entry and choose to fail pending requests. this means that pending requests will not get a cache descriptor. this is meant as a tool for clients that wish to instruct pending requests to skip the cache. void doomandfailpendingrequests( in nsresult status ); parameters status the access status. getmetadataelement() this method retrieves the meta data. meta data is a table of key/value string pairs. the strings do not have to conform to any particular charset, but they must be null terminated. string getmetadataelement( in string key ); parameters key the key for retrieving the meta data. return value returns the string value containing the...
nsICacheListener
netwerk/cache/nsicachelistener.idlscriptable this interface is a cache listener. 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. the status parameter equals ns_ok on success. see nsicacheservice for accessgranted values. void oncacheentryavailable( in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status ); parameters descriptor the cache entry descriptor. accessgranted the cache ac...
...() this method is called when the requested access (or appropriate subset) is acquired. the status parameter equals ns_ok on success. see nsicacheservice for accessgranted values. void oncacheentryavailable( in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status ); parameters descriptor the cache entry descriptor. accessgranted the cache access mode. status the status of the cache entry availability. oncacheentrydoomed() this method is called when the processing started by nsicachesession.doomentry() is completed. void oncacheentrydoomed( in nsresult status ); parameters status the status is ns_ok when the entry was doomed, or ns_error_not_available when there is no such entry. see also nsicache nsicachesession nsicacheentrydescriptor ...
nsIChannel
rset parameter is given, then its value will replace the the contentcharset attribute of the channel. the stripped contenttype will be lowercased. any implementation of nsichannel must follow these rules. notificationcallbacks nsiinterfacerequestor the notification callbacks for the channel. this is set by clients, who wish to provide a means to receive progress, status and protocol-specific notifications. if this value is null, the channel implementation may use the notification callbacks from its load group. the channel may also query the notification callbacks from its load group if its notification callbacks do not supply the requested interface. interfaces commonly requested include: nsiprogresseventsink, nsiprompt, and nsiauthprompt / nsiauthprompt2. ...
... channel. note: this is a strong reference to the owner, so if the owner is also holding a strong reference to the channel, care must be taken to explicitly drop its reference to the channel. securityinfo nsisupports transport-level security information (if any, else null) corresponding to the channel, normally presented through the interfaces nsitransportsecurityinfo and nsisslstatusprovider read only. uri nsiuri the uri corresponding to the channel. its value is immutable. read only. constants channel specific load flags: bits 23-31 are reserved for future use by this interface or one of its derivatives (for an example see nsicachingchannel). constant value description load_document_uri 16 set (for example by the docshel...
nsIChannelEventSink
s is a temporary redirect. the new uri may be identical to the old one. redirect_internal 1 << 2 this is an internal redirect, i.e. it was not initiated by the remote server, but is specific to the channel implementation. the new uri may be identical to the old one. methods asynconchannelredirect() called when a redirect occurs. this may happen due to an http 3xx status code. this method notifies the sink that a redirect is about to happen, but also to gives the sink the right to veto the redirect by throwing an exception or passing a failure code in the callback. note: vetoing the redirect simply means that newchannel will not be opened. it is important to understand that oldchannel will continue loading as if it received a response of http 200, which includes ...
...result of this method. 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. the redirect will be canceled. onchannelredirect() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) called when a redirect occurs. this may happen due to an http 3xx status code. void onchannelredirect( in nsichannel oldchannel, in nsichannel newchannel, in unsigned long flags ); parameters oldchannel the channel that's being redirected. newchannel the new channel. this channel is not opened yet. flags flags indicating the type of redirect. a bitmask consisting of flags from above. one of redirect_temporary and redirect_permanent wi...
nsICookieConsent
kieconsent.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void getconsent(); methods getconsent() gives a decision on what should be done with a cookie, based on a site's p3p policy and the user's preferences. the policy for the given uri and channel is also returned. nscookiestatus getconsent( in nsiuri uri, in nsihttpchannel httpchannel, in boolean isforeign, out nscookiepolicy policy ); parameters uri the uri to find the policy for. httpchannel the channel to extract the p3p headers from. isforeign true if the cookie originates from a third-party site. this is used to decide the cookie status based on user preferences. policy the policy for ...
...he uri to find the policy for. httpchannel the channel to extract the p3p headers from. isforeign true if the cookie originates from a third-party site. this is used to decide the cookie status based on user preferences. policy the policy for the given uri, or nsicookie::policy_unknown if one cannot be found. valid values are defined in nsicookie.idl. return value returns nscookiestatus. valid values are defined in nsicookie.idl. see also nsicookie ...
nsIDNSService
none. ...
...asses["@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); ...
nsIDOMWindowInternal
ndow. toolbar nsidombarprop readonly: returns the toolbar object, whose visibility can be toggled in the window. locationbar nsidombarprop readonly: returns the locationbar object, whose visibility can be toggled in the window. personalbar nsidombarprop readonly: returns the personalbar object, whose visibility can be toggled in the window. statusbar nsidombarprop readonly: returns the statusbar object, whose visibility can be toggled in the window. directories nsidombarprop readonly: returns the window directories toolbar object. closed boolean readonly: this property indicates whether the referenced window is closed or not. crypto nsidomcrypto readonly: returns the browser crypto obj...
...which can then be used to manipulate various browser security features. pkcs11 nsidompkcs11 obsolete: this property is not supported in newer versions of firefox. controllers nsicontrollers readonly: returns the xul controllers of the chrome window. opener nsidomwindowinternal returns a reference to the window that opened this current window. status domstring sets the text in the status bar at the bottom of the browser or returns the previously set text. defaultstatus domstring gets/sets the status bar text for the given window. location nsidomlocation readonly: returns a nsidomlocation object, which contains information about the url of the document. innerwidth long width of the browser wi...
nsIHTTPHeaderListener
st provide an instance to {geturl,posturl}() that implements both nsipluginstreamlistener and nsihttpheaderlistener. this instance is passed in through {geturl,posturl}()'s streamlistener parameter. the browser will then qi this streamlistener to see if it implements nsihttpheaderlistener. method overview void newresponseheader(in string headername, in string headervalue); void statusline(in string line); methods newresponseheader() called for each http response header. note: you must copy the values of the params. void newresponseheader( in string headername, in string headervalue ); parameters headername headervalue statusline() called once for the http response status line. value does not include a terminating newline. note: you must copy t...
...ine); methods newresponseheader() called for each http response header. note: you must copy the values of the params. ...
nsIHttpActivityObserver
in acstring aextrastringdata ); parameters ahttpchannel the nsihttpchannel on which the activity occurred. aactivitytype the type of activity that occurred; this will be one of the values specified in activity type constants. aactivitysubtype the subtype that further narrows the type of activity that occurred. if the activity type is activity_type_socket_transport, this value will be one of the status_* constants defined by nsisockettransport. if the activity type is activity_type_http_transaction, this will be one of the constants specified in activity subtype constants above. atimestamp the time at which the activity occurred, specified as microseconds elapsed since the epoch of midnight on january 1, 1970. aextrasizedata any additional size data available with this activity. see interpretin...
...low. aextrastringdata any additional string data available with this activity. see interpreting activity data below. interpreting activity data depending on the values of the aactivitytype and aactivitysubtype fields, the aextrasizedata and aextrastringdata parameters take on different meanings. socket transport activity when the activity type is activity_type_socket_transport and the subtype is status_sending_to, the aextrasizedata parameter contains the number of bytes sent. because a single http transaction may consist of multiple chunks of data transmitted through separate socket writes, each socket activity notification will only reflect the number of bytes transmitted in that chunk. http transaction activity for activity notifications of type activity_type_http_transaction, there are thre...
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). read only. defaultloadrequest nsirequest accesses the default load request for the group. each time a number of requests are added to a group, the defaultloadrequest may...
...t to be passed to the onstartrequest notification. removerequest() removes a request from the group. if this is a foreground request then the groupobserver's onstoprequest will be called. by the time this call ends, arequest will have been removed from the loadgroup, even if this function throws an exception. void removerequest( in nsirequest arequest, in nsisupports acontext, in nsresult astatus ); parameters arequest the request to be removed from the load group. acontext the context to be passed to the onstoprequest notification. astatus the status to be passed to the onstoprequest notification. ...
nsIMsgWindow
void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane. statusfeedback nsimsgstatusfeedback this allows the backend code to send status feedback to the ui. msgheadersink nsimsgheadersink this allows the backend code to send message header information to the ui. transactionmanager nsitransactionmanager this is used to track undo/redo transactions. openfolder nsimsgfolder...
...igation object. void stopurls(); closewindow() when the msg window is being unloaded from the content window, this notification can be used to force a flush on anything the message window hangs on. for some reason xpconnect is still hanging onto the message window even though all of our objects have let go of it. this forces a release. it clears out the content listener, the windowcommands, the statusfeedback and the docshell objects. void closewindow(); remarks see also ...
nsINetworkLinkService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/network/network-link-service;1 as a service: var networklinkservice = components.classes["@mozilla.org/network/network-link-service;1"] .getservice(components.interfaces.nsinetworklinkservice); attributes attribute type description islinkup boolean this is set to true when the system is believed to have a usable network connection. ...
...etworklinkservice); attributes attribute type description islinkup boolean this is set to true when the system is believed to have a usable network connection. the link is only up when network connections can be established. for example, the link is down during dhcp configuration (unless there is another usable interface already configured). if the link status is not currently known, we generally assume that it is up. read only. linkstatusknown boolean this is set to true when we believe that islinkup is accurate. read only. linktype unsigned long the type of network connection, one of the link_type_* constants. read only. note: as of gecko 8.0, all operating systems currently return link_type_unknown. android su...
nsIResumableChannel
he starting offset, in bytes, to use to download. entityid information about the file, to match before obtaining the file. pass an empty string to use anything. resumeat() prepare this channel for resuming. the request will not start until asyncopen or open is called. calling resumeat after open or asyncopen has been called has undefined behaviour. during onstartrequest, this channel will have a status of ns_error_not_resumable if the file cannot be resumed, for example because the server doesn't support this. this error may occur even if startpos is 0, so that the front end can warn the user. similarly, the status of this channel during onstartrequest may be ns_error_entity_changed, which indicates that the entity has changed, as indicated by a changed entityid. in both of these cases, no onda...
...void resumeat( in unsigned long long startpos, in acstring entityid ); parameters startpos the starting offset, in bytes, to use to download. ...
nsISSLErrorListener
security/manager/ssl/public/nsisslerrorlistener.idlscriptable a mechanism to report a broken ssl connection. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: the recipient of this ssl status notification should not block. method overview boolean notifysslerror(in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite); methods notifysslerror() called in case of an ssl error. ...
... 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. error the code associated with the error. the ssl status object that describes the problem(s). targetsite the site name that was used to open the current connection. return value the consumer shall return true if it wants to suppress the error message related to the error (the connection will still get canceled). see also nsisockettransport ...
nsIServerSocketListener
hod or by inspecting nsisockettransport.gethost(), which returns a string representation of the client's ip address, which may be either an ipv4 or an ipv6 address. inherits from: nsisupports last changed in gecko 1.7 method overview void onsocketaccepted(in nsiserversocket aserv, in nsisockettransport atransport); void onstoplistening(in nsiserversocket aserv, in nsresult astatus); methods onsocketaccepted() this method is called when a client connection is accepted. void onsocketaccepted( in nsiserversocket aserv, in nsisockettransport atransport ); parameters aserv the server socket. atransport the connected socket transport. onstoplistening() this method is called when the listening socket stops for some reason. the server socket is effecti...
... onsocketaccepted( in nsiserversocket aserv, in nsisockettransport atransport ); parameters aserv the server socket. atransport the connected socket transport. onstoplistening() this method is called when the listening socket stops for some reason. the server socket is effectively dead after this notification. void onstoplistening( in nsiserversocket aserv, in nsresult astatus ); parameters aserv the server socket. astatus the reason why the server socket stopped listening. if the server socket was manually closed, then this value will be ns_binding_aborted. see also nsiserversocket nsisockettransport ...
nsITransport
d streams to the resource. the name "transport" is meant to connote the inherent data transfer implied by this interface (that is, data is being transfered in some fashion via the streams exposed by this interface). a transport can have an event sink associated with it. the event sink receives transport-specific events as the transfer is occurring. for a socket transport, these events can include status about the connection. see nsisockettransport for more info about socket transport specifics. method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); void s...
...egmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long aflags, in unsigned long asegmentsize, in unsigned long asegmentcount); void seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open flags. constant value description open_blocking 1<<0 open flags. open_unbuffered 1<<1 generic nsitransporteventsink status codes. nsitransport implementations may override these status codes with their own more specific status codes (for example, see nsisockettransport). constant value description status_reading 0x804b0008 status_writing 0x804b0009 methods close() close the transport and any open streams. void close( in nsresult areason ); parameters areason the reason for closing the stream. openi...
nsITransportEventSink
netwerk/base/public/nsitransport.idlscriptable implemented by clients that wish to receive transport events. inherits from: nsisupports last changed in gecko 1.7 method overview void ontransportstatus(in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax); methods ontransportstatus() transport status notification. void ontransportstatus( in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters atransport the transport sending this status notification. astatus the transport status (resolvable to a string using nsierrorservice). see nsisockettransport for socket specific status codes and more comments. aprogress the amount of data ...
...this value is relative to aprogressmax. aprogressmax the maximum amount of data that will be read or written. if unknown, 0xffffffff will be passed. ...
nsIWindowMediator
; native code only! void updatewindowtitle(in nsixulwindow awindow, in wstring intitle ); native code only! constants constant value description zleveltop 1 send window to top. zlevelbottom 2 send window to bottom. zlevelbelow 3 place window below some window. methods addlistener() register a listener for window status changes. void addlistener( in nsiwindowmediatorlistener alistener ); parameters alistener the listener to register. example: of window listener object and how to register then unregister. this example below waits for listens to when a window opens, and then after that window opens it adds event listener to listen to when the window completes loading, after that it fires a function. im...
...from front to back. back to front if false. return value an enumerator of nsixulwindows. native code only!registerwindow add the window to the list of known windows. listeners (see addlistener()) will be notified through their onopenwindow method. void registerwindow( in nsixulwindow awindow ); parameters awindow the window to add. removelistener() unregister a listener of window status changes. void removelistener( in nsiwindowmediatorlistener alistener ); parameters alistener the listener to unregister. native code only!setzlevel set the window's z level (as defined in nsixulwindow). the implementation will reposition the window as necessary to match its new z level. the implementation will assume a window's z level to be nsixulwindow.normalz until it has been info...
nsIXULBrowserWindow
. note: the xulbrowserwindow object offered to javascript code provides a great many more methods and attributes than those listed here, which are only the ones available to c++ code. see the documentation for xulbrowserwindow for details. method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void setjsdefaultstatus(in astring status); void setjsstatus(in astring status); void setoverlink(in astring link, in nsidomelement element); methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link. this may be used, for example, to redirect links into new tabs or windows when it's not desirable to replace the content in the current tab (such...
...ri, in nsidomnode linknode, in prbool isapptab ); parameters originaltarget the specified target for the link. linkuri the uri of the link that is about to be traversed. linknode the nsidomnode representing the dom node in which the link is located. isapptab whether or not the link being clicked is in an app tab. return value a string indicating the revised target for the link. setjsdefaultstatus() sets the default status according to javascript's version of the default status. void setjsdefaultstatus( in astring status ); parameters status the status string. setjsstatus() sets the status according to javascript's version of the status. void setjsstatus( in astring status ); parameters status the status string. setoverlink() tells the object implementing this function what link ...
nsMsgSearchTerm
/ search/ public/ nsmsgsearchcore.idl use this to specify the value of a search term [ptr] native nsmsgsearchterm(nsmsgsearchterm); // please note the ! at the start of this macro, which means the macro // needs to enumerate the non-string attributes. ...
...ing_attribute(_a) \ (!(_a == nsmsgsearchattrib::priority || _a == nsmsgsearchattrib::date || \ _a == nsmsgsearchattrib::msgstatus || _a == nsmsgsearchattrib::messagekey || \ _a == nsmsgsearchattrib::size || _a == nsmsgsearchattrib::ageindays || \ _a == nsmsgsearchattrib::folderinfo || _a == nsmsgsearchattrib::location || \ _a == nsmsgsearchattrib::label || _a == nsmsgsearchattrib::junkstatus || \ _a == nsmsgsearchattrib::folderflag || _a == nsmsgsearchattrib::uint32hdrproperty || \ _a == nsmsgsearchattrib::junkpercent || _a == nsmsgsearchattrib::hasattachmentstatus)) %} ...
XPCOM Interface Reference
onnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleeditabletextnsiaccessibleeventnsiaccessiblehyperlinknsiaccessiblehypertextnsiaccessibleimagensiaccessibleprovidernsiaccessiblerelationnsiaccessibleretrievalnsiaccessiblerolensiaccessiblescrollt...
...adnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypevaluensmsgsearchvaluensmsgsearchwidgetvaluenspipromptservice see also interfaces grouped by function ...
nsMsgViewSortType
sort by date you would pass a function the value: components.interfaces.nsmsgviewsorttype.bydate mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article. ...
...simsgdbview.idlscriptable please add a summary to this article. ...
Using the Gecko SDK
to help you build your components "the right way" such that they will remain compatible with future versions of mozilla. for information on how to retrieve and install the gecko sdk, see here. an xpcom component will be compatible with future versions of mozilla if it only makes use of frozen gecko apis. a frozen gecko api is one that is included in the gecko and marked frozen with the text <tt>@status frozen</tt> (with nspr as the exception to the rule). the frozen gecko api consists of a set of component interfaces (c++ vtables) and <tt>extern "c"</tt> symbols exported from the xpcom library and the nspr libraries. the abi of the component interfaces depends on the c++ abi of the host compiler (i.e., the vtable format and calling conventions of the virtual methods may vary from compiler to co...
...ions of same major version of the platform. the sdk contains headers for all of the frozen interfaces and functions, and it also contains headers for classes and functions defined in the glue libraries. when those classes or functions are used, the component must link with the corresponding static library. every frozen interface or function will be labeled as such in the idl or header file with "@status frozen". (note: nspr is the one exception to this rule. all nspr functions are frozen by default and are not marked as such in the respective header files.) the glue library exists to make common tasks easier. for example, the nscomptr class is defined in the xpcom glue library. if your component does not use any of the glue classes or functions, then you do not need to link against the glue libr...
nsIMsgCloudFileProvider
only: the remaining storage space available for this account in bytes. if this value is not known, returns -1. filespaceused long long readonly: the total amount of space used by this account. if this value is not known, returns -1. lasterror acstring readonly: the last error message received from the server. 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. constant value description offlineerr 0x80550014 returned when it appears that there is no active network connection. autherr 0x8055001e returned when authorizing has failed. uploaderr 0x8055311a returned ...
...t of storage being used. void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); parameters awithui whether or not the provider should prompt the user for credentails in the event that the stored credentials have gone stale. if awithui is false, and the credentials are stale, the onstoprequest of the acallback nsirequestlistener will get the autherr status code passed to it. acallback the nsirequestobserver for monitoring the start and stop states of the refresh operation. deletefile() attempts to delete a file that had previously been uploaded using this instance. void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); parameters afile the file that was previously uploaded using this nsimsgcloudfileprov...
Main Windows
ail window that you see when you first open thunderbird is messenger.xul: messenger.xul itself doesn’t contain a lot. its main focus is on handling the folderpane, threadpane, and the message preview sections shown above. the rest is loaded from overlays: mailwindowoverlay.xul this is the red sections shown in the interface above (where?), including the toolbars, notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript. mailoverlay.xul a really small overlay that only adds a few “new message” and “new card” commands to the menus, along with their associated javascript. msghdrviewoverlay.xul shown in blue above (where?), this overlay consists of three boxes. two are stacked sho...
...w.xul is shown when a message is opened. its almost exactly the same as messenger.xul in terms of overlays, but just lacks the folder and threadpanes normally shown. menus, toolbar buttons, and headers are all taken from exactly the same overlays listed above though. mailwindowoverlay.xul this is the red sections shown in the interface above, including the toolbars, notification bars and the status bar.it also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript. msghdrviewoverlay.xul shown in blue above, this overlay consists of three boxes. two are stacked showing either a brief or expanded view of the headers. the third is the attachment box which can be toggled into a slim or an expanded view basemenuoverlay.xul contains the ...
Building a Thunderbird extension 6: Adding JavaScript
warning: this content is for older versions of thunderbird. much of it may no longer be relevant. see developer.thunderbird.net for newer information. in this step we will create a small piece of javascript code that inserts the current date into our statusbar widget. the statusbar is usually displayed at the bottom of the thunderbird window. depending on the installed theme the result will look something like this: modify xul elements with javascript save the following javascript code into the content/ folder next to your myhelloworld.xul file and name it overlay.js. window.addeventlistener("load", function(e) { startup(); }, false); window.setinterval( function() { startup(); }, 60000); //update date every minute function startup() { var mypanel = document.getelementbyid(...
...panel = document.getelementbyid("my-panel"); var date = new date(); var day = date.getday(); var datestring = date.getfullyear() + "." + (date.getmonth()+1) + "." + date.getdate(); mypanel.label = "date: " + datestring; } the first part registers a new event listener that will be executed automatically when thunderbird loads. the event listener then calls our startup function which gets our <statusbarpanel>-element with the id my-panel from the document's dom tree. it then uses javascript's date class to get the current date, which it converts into a string that has the format of yyyy.mm.dd. because the month is zero-based we also need to add one to the month. finally the label of our panel is set to "date: " and concatenated with the date string that contains the formatted date. we use th...
Using COM from js-ctypes
info; /* end inherit from ispeventsource */ /* start ispvoice */ void* setoutput; void* getoutputobjecttoken; void* getoutputstream; void* pause; void* resume; void* setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dwflags, ulong* pulstreamnumber); void* speakstream; void* getstatus; void* skip; void* setpriority; void* getpriority; void* setalertboundary; void* getalertboundary; void* setrate; void* getrate; void* setvolume; void* getvolume; void* waituntildone; void* setsyncspeaktimeout; void* getsyncspeaktimeout; void* speakcompleteevent; void* isuisupported; void* displayui; /* end ispvoice */ }; int main(v...
... }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dwflags ulong // *pulstreamnumber ]).ptr }, { 'speakstream': ctypes.voidptr_t }, { 'getstatus': ctypes.voidptr_t }, { 'skip': ctypes.voidptr_t }, { 'setpriority': ctypes.voidptr_t }, { 'getpriority': ctypes.voidptr_t }, { 'setalertboundary': ctypes.voidptr_t }, { 'getalertboundary': ctypes.voidptr_t }, { 'setrate': ctypes.voidptr_t }, { 'getrate': ctypes.voidptr_t }, { 'setvolume': ctypes.voidptr_t }, { 'getvolume': ctypes.voidptr_t }, { 'waituntild...
Web Console remoting - Firefox Developer Tools
ties to exception and exceptionmessage respectively, to avoid conflict with the default properties used when protocol errors occur. autocomplete and more the autocomplete request packet: { "to": "conn0.console9", "type": "autocomplete", "text": "d", "cursor": 1 } the response packet: { "from": "conn0.console9", "matches": [ "decodeuri", "decodeuricomponent", "defaultstatus", "devicepixelratio", "disableexternalcapture", "dispatchevent", "domyxhr", "document", "dump" ], "matchprop": "d" } there's also the clearmessagescache request packet that has no response. this clears the console api calls cache and should clear the page errors cache - see bug 717611. network logging the networkevent packet whenever a new network request starts b...
...0.netevent14", "type": "networkeventupdate", "updatetype": "requestcookies", "cookies": 0 }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "requestpostdata", "datasize": 1024, "discardrequestbody": false }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "responsestart", "response": { "httpversion": "http/1.1", "status": "304", "statustext": "not modified", "headerssize": 194, "discardresponsebody": true } }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "eventtimings", "totaltime": 1 }, { "from": "conn0.netevent14", "type": "networkeventupdate", "updatetype": "responseheaders", "headers": 6, "headerssize": 194 }, { "from": "conn0.netevent14", "typ...
AuthenticatorResponse.clientDataJSON - Web APIs
or publickeycredentialcreationoptions.challenge. origin the fully qualified origin of the requester which has been given by the client/browser to the authenticator. we should expect the relying party's id to be a suffix of this value. tokenbindingid optional an object describing the state of the token binding protocol for the communication with the relying party. it has two properties: status: a string which is either "supported" which indicates the client support token binding but did not negotiate with the relying party or "present" when token binding was used already id: a domstring which is the base64url encoding of the token binding id which was used for the communication. should this property be absent, it would indicate that the client does not support token binding. ...
... recommendation initial definition. ...
BatteryManager.charging - Web APIs
currently being charged; if the battery is charging, this value is true. otherwise, the value is false. ...
... is charging, this value is true. otherwise, the value is false. ...
BatteryManager.chargingTime - Web APIs
ready fully charged. if the battery is currently discharging, this value is infinity. ...
...currently discharging, this value is infinity. ...
BatteryManager.dischargingTime - Web APIs
or if the system is unable to report the remaining discharging time. ...
...e remaining discharging time. ...
Cache.addAll() - Web APIs
Web › API › Cache › addAll
n() { // 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. you can specify the request object instead of the url. return value a promise that resolves with undefined. exceptions exception happens when typeerror the url scheme is not http or https. 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 runs waituntil() to handle the install process for the app. this consists of calling cachestorage.o...
... working draft initial definition. ...
Cache.put() - Web APIs
Web › API › Cache › put
lows key/value pairs to be added to the current cache object. often, you will just want to fetch() one or more requests, then add the result straight to your cache. in such cases you are better off using cache.add()/cache.addall(), as they are shorthand functions for one or more of these operations. 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. as a result, cache.add/cache.addall can't be used to store opaque respons...
... working draft initial definition. ...
Cache - Web APIs
Web › API › Cache
request since we might use it in a call to cache.put() later on. // both fetch() and cache.put() "consume" the request, so we need to make a copy. // (see /docs/web/api/request/clone) return fetch(event.request.clone()).then(function(response) { console.log(' response for %s from network is: %o', event.request.url, response); if (response.status < 400 && response.headers.has('content-type') && response.headers.get('content-type').match(/^font\//i)) { // this avoids caching responses that we know are errors (i.e. http status code of 4xx or 5xx). // we also only want to cache responses that correspond to fonts, // i.e. have a content-type response header that starts with "font...
...mal response object that has the appropriate error code set. console.error(' error in fetch handler:', error); throw error; }); }) ); }); storing cookies in caches the fetch api requires set-cookie headers to be stripped before returning a response object from fetch(). so a response stored in a cache won't contain headers. specifications specification status comment service workersthe definition of 'cache' in that specification. working draft initial definition. ...
Constraint validation API - Web APIs
others may be barred from constraint validation depending on specific conditions. methods checkvalidity() checks the element's value against its constraints. if the value is invalid, it fires an invalid event at the element and returns false; otherwise it returns true. reportvalidity() htmlformelement method checks the element's value against its constraints and also reports the validity status; if the value is invalid, it fires an invalid event at the element, returns false, and then reports the validity status to the user in whatever way the user agent has available. otherwise, it returns true. setcustomvalidity(message) sets a custom error message string to be shown to the user upon submitting the form, explaining why the value is not valid — when a message is set, the validity s...
...d a custom validity was previously set, the input will register as invalid, even if it current contains a valid value on submission. note: firefox supported a proprietary error attribute — x-moz-errormessage — for many versions, which allowed you set custom error messages in a similar way. this has been removed as of version 66 (see bug 1513890). specifications specification status comment html living standardthe definition of 'constraint validation api' in that specification. living standard html 5.1the definition of 'constraint validation api' in that specification. recommendation no change from the previous snapshot html5. html5the definition of 'constraint validation api' in that specification. recommendation first snapsh...
CredentialsContainer.preventSilentAccess() - Web APIs
a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty promise. for example, you might call this, after a user signs out of a website to ensure that he/she isn't automatically signed in on the next site visit. mediation varies by origin, and is an added check point of browser stored credentials, informing a user of an account login status. this method is typically called after a user signs out of a website, ensuring this user's login information is not automatically passed on the next site visit. earlier versions of the spec called this method requireusermediation(). see browser compatibility for support details. syntax var promise = credentialscontainer.preventsilentaccess() parameters none. returns an empty promise. spec...
...r a user signs out of a website, ensuring this user's login information is not automatically passed on the next site visit. earlier versions of the spec called this method requireusermediation(). see browser compatibility for support details. syntax var promise = credentialscontainer.preventsilentaccess() parameters none. returns an empty promise. specifications specification status comment credential management level 1the definition of 'preventsilentaccess()' in that specification. working draft initial definition. ...
Document: visibilitychange event - Web APIs
the visibilitychange event is fired at the document when the content of its tab have become visible or have been hidden. bubbles yes cancelable no interface event event handler property onvisibilitychange usage notes the event doesn't include the document's updated visibility status, but you can get that information from the document's visibilitystate property. ...
...ibilitystate property. examples this example begins playing a music track when the document becomes visible, and pauses the music when the document is no longer visible. document.addeventlistener("visibilitychange", function() { if (document.visibilitystate === 'visible') { backgroundmusic.play(); } else { backgroundmusic.pause(); } }); specifications specification status comment page visibility (second edition)the definition of 'visibilitychange' in that specification. recommendation browser compatibility no compatibility data found. please contribute data for "api.document.visibilitychange" (depth: 1) to the mdn compatibility data repository. ...
Document - Web APIs
Web › API › Document
ts/sets the ability to edit the whole document. document.dirread only gets/sets directionality (rtl/ltr) of the document. document.domain gets/sets the domain of the current document. document.lastmodifiedread only returns the date on which the document was last modified. document.locationread only returns the uri of the current document. document.readystateread only returns loading status of the document. document.referrerread only returns the uri of the page that linked to this page. document.title sets or gets the title of the current document. document.urlread only returns the document location as a string. properties included from documentorshadowroot the document interface includes the following properties defined on the documentorshadowroot mixin. note that this i...
...me non-standard properties: document.filesize* returns size in bytes of the document. starting with internet explorer 11, that property is no longer supported. see msdn. internet explorer does not support all methods from the node interface in the document interface: document.contains as a work-around, document.body.contains() can be used. specifications specification status comment domthe definition of 'document' in that specification. living standard intend to supersede dom 3 html living standardthe definition of 'document' in that specification. living standard turn the htmldocument interface into a document extension. css object model (cssom) view modulethe definition of 'document' in that specification. working dr...
Element: fullscreenchange event - Web APIs
for the fullscreenchange event is added to the element whose id is fullscreen-div. if the user clicks on the "toggle fullscreen mode" button, the click handler will toggle full-screen mode for the div. if document.fullscreenelement has a value it will exit full-screen mode. if not, the div will be placed into full-screen mode. remember that by the time the fullscreenchange event is handled, the status of the element has already changed. so if the change is to full-screen mode, document.fullscreenelement will point to the element that is now in full-screen mode. on the other hand, if document.fullscreenelement is null, full-screen mode has been canceled. what that means to the example code is that, if an element is currently in full-screen mode, the fullscreenchange handler logs the id of the ...
... console.log('leaving full-screen mode.'); } }); document.getelementbyid('toggle-fullscreen').addeventlistener('click', (event) => { if (document.fullscreenelement) { // exitfullscreen is only available on the document object. document.exitfullscreen(); } else { document.getelementbyid('fullscreen-div').requestfullscreen(); } }); specifications specification status fullscreen api living standard ...
Element.getElementsByTagName() - Web APIs
h a matching tag name, in the order they appear. if no elements are found, the htmlcollection is empty. element is the element from where the search starts. only the element's descendants are included, not the element itself. tagname is the qualified name to look for. the special string "*" represents all elements. for compatibility with xhtml, lower-case should be used. ...
...'s descendants are included, not the element itself. tagname is the qualified name to look for. the special string "*" represents all elements. for compatibility with xhtml, lower-case should be used. example // check the status of each data cell in a table const table = document.getelementbyid('forecast-table'); const cells = table.getelementsbytagname('td'); for (let cell of cells) { let status = cell.getattribute('data-status'); if (status === 'open') { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagname()' in that specification. living standard changed the return value from nodelist to htmlcollection document object model (dom) level 3 core specificationthe definition of '...
EventSource - Web APIs
essage event is fired. unlike websockets, server-sent events are unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web browser). that makes them an excellent choice when there's no need to send data from the client to the server in message form. for example, eventsource is a useful approach for handling things like social media status updates, news feeds, or delivering data into a client-side storage mechanism like indexeddb or web storage. when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6). the issue has been marked as "won't fix" in chrome and firefox. this l...
... living standard ...
Fetch API - Web APIs
Web › API › Fetch API
directly using the request() and response() constructors, but it's uncommon to do this directly. instead, these are more likely to be created as results of other api actions (for example, fetchevent.respondwith() from service workers). differences from jquery the fetch specification differs from jquery.ajax() in three main ways: the promise returned from fetch() won’t reject on http error status even if the response is an http 404 or 500. instead, it will resolve normally (with ok status set to false), and it will only reject on network failure or if anything prevented the request from completing. fetch() won't can receive cross-site cookies; you can’t can establish a cross site session using fetch. set-cookie headers from other sites are silently ignored. fetch() won’t send cookie...
...nse/request headers, allowing you to query them and take different actions depending on the results. request represents a resource request. response represents the response to a request. fetch mixin body provides methods relating to the body of the response/request, allowing you to declare what its content type is and how it should be handled. specifications specification status comment fetch living standard initial definition ...
FontFaceSet - Web APIs
it will be one of 'loading' or 'loaded'. fontfaceset.ready read only promise which resolves once font loading and layout operations have completed. events fontfaceset.onloading an eventlistener called whenever an event of type loading is fired, indicating a font-face set has started loading. ...
...oesn't initiate a load when it isn't. fontfaceset.clear() removes all manually-added fonts from the font set. css-connected fonts are unaffected. fontfaceset.delete() removes a manually-added font from the font set. css-connected fonts are unaffected. fontfaceset.load() returns a promise which resolves to a list of font-faces for a requested font. specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification. editor's draft initial definition ...
Using FormData Objects - Web APIs
you can also app...
... you can also append a file or blob directly to the formdata object, like this: data.append("myfile", myblob, "filename.txt"); ...
HTMLImageElement.alt - Web APIs
ented in svg format may be read by screen readers. this may impact the decisions you make shen writing the alt text for the diagram. icons or logos logos (such as corporate or brand logos) and informational icons should use the corresponding text in their alt strings. that is, if an image is a corporate logo, the alt text should be the name of the company. if the image is an icon representing a status or other information, the text should be the name of that state. for example, if an image is a badge that's shown on a page to indicate that the content of the page is new and has been updated recently, the corresponding alt text might be "updated recently" or even "updated on 27 august 2019". in this example, a starburst image with the word "new!" is used to indicate that an article is about s...
..., 80% 80%, 70% 90%, 50% 100%, 0 100%, 0 0); } .contents { margin-top: 1em; font: 16px arial,helvetica,verdana,sans-serif; } result other images images simply showing objects or scenes should have alt text describing what's seen in the image. a photo of a yellow teapot might literally have its alt attribute set to "a yellow teapot". specifications specification status comment html living standardthe definition of 'htmlimageelement.alt' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explo...
HTMLMediaElement.load() - Web APIs
ing an appropriate media resource given the options specified in the <audio> or <video> element and its src attribute or child <source> element(s). this is described in more detail in supporting multiple formats in video and audio content. the process of aborting any ongoing activities will cause any outstanding promises returned by play() being resolved or rejected as appropriate based on their status before the loading of new media can begin. pending play promises are aborted with an "aborterror" domexception. appropriate events will be sent to the media element itself as the load process proceeds: if the element is already in the process of loading media, that load process is aborted and the abort event is sent. if the element has already been initialized with media, the emptied event i...
... a timeupdate event is sent. once media has been selected and loading is ready to begin, the loadstart event is delivered. from this point onward, events are sent just like any media load. example this example finds a <video> element in the document and resets it by calling load(). var mediaelem = document.queryselector("video"); mediaelem.load(); specifications specification status comment html living standardthe definition of 'htmlmediaelement.load()' in that specification. living standard initial definition. html5the definition of 'htmlmediaelement.load()' in that specification. recommendation initial definition. ...
IDBIndex.multiEntry - Web APIs
in the following example we open a transaction and an object store, then get the index lname from a simple contacts database. we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key. the multi-entry status of the index is logged to the console: it should be returned as false. finally, we iterate through each record, and insert the data into an html table. for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transa...
... recommendation indexed database api draftthe definition of 'multientry' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https...
IDBIndex.unique - Web APIs
Web › API › IDBIndex › unique
ample in the following example we open a transaction and an object store, then get the index lname from a simple contacts database. we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key. the unique status of the index is logged to the console: it should be returned as false. finally, we iterate through each record, and insert the data into an html table. for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transa...
... recommendation indexed database api draftthe definition of 'unique' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
Intersection Observer API - Web APIs
bes an intersection change for one observed // target element: // entry.boundingclientrect // entry.intersectionratio // entry.intersectionrect // entry.isintersecting // entry.rootbounds // entry.target // entry.time }); }; the list of entries received by the callback includes one entry for each target which reporting a change in its intersection status. check the value of the isintersecting property to see if the entry represents an element that currently intersects with the root. be aware that your callback is executed on the main thread. it should operate as quickly as possible; if anything time-consuming needs to be done, use window.requestidlecallback(). also, note that if you specified the root option, the target must be a descendant of ...
...o track whether the intersection ratio is going up or down, we remember the current ratio in the variable prevratio. result below is the resulting content. scroll this page up and down and notice how the appearance of the box changes as you do so. there's an even more extensive example at timing element visibility with the intersection observer api. specifications specification status comment intersection observer working draft ...
MediaQueryList.addListener() - Web APIs
the addlistener() method of the mediaquerylist interface adds a listener to the mediaquerylistener that will run a custom callback function in response to the media query status changing. this is basically an alias for eventtarget.addeventlistener(), for backwards compatibility purposes. older browsers should use addlistener instead of addeventlistener since mediaquerylist only inherits from eventtarget in newer browsers. syntax mediaquerylist.addlistener(func) parameters func a function or function reference representing the callback function you want to run when the media query status changes. in the original implementation, the callback was a non-standard mediaquerylistlistener object. in the new implementation the standard event mechanism is used, the callback is a standard function...
... working draft initial definition ...
MediaQueryList.onchange - Web APIs
the event object is a mediaquerylistevent instance, which is recognised as a medialistquery instance in older browsers, for backwards compatibility purposes. syntax mediaquerylist.onchange = function() { ... ...
... working draft initial definition ...
MediaStreamTrack.muted - Web APIs
roperty. when a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black). syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted. when possible, avoid polling muted to monitor the track's muting status. ...
... when possible, avoid polling muted to monitor the track's muting status. instead, add event listeners for the mute and unmute events. example this example counts the number of tracks in an array of mediastreamtrack objects which are currently muted. let mutedcount = 0; tracklist.foreach((track) => { if (track.muted) { mutedcount += 1; } }); specifications specification status comment media capture and streamsthe definition of 'muted' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack - Web APIs
ement standard "mute" functionality by setting enabled to false, and unmute the media by setting it back to true again. mediastreamtrack.readonly read only returns a boolean value with a value of true if the track is readonly (such a video file source or a camera that settings can't be modified), false otherwise. mediastreamtrack.readystate read only returns an enumerated value giving the status of the track. this will be one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data. in that case, the output of data can be switched on or off using the enabled attribute. "ended" which indicates that the input is not giving any more data and will never provide new data. mediastreamtrack.remote read only re...
...ty. overconstrained sent when the constraints specified for the track cause the track to be incompatible and therefore to not be used. also available through the onoverconstrained event handler property. unmute sent to the track when data becomes available again, ending the muted state. also available through the onunmute event handler property. specifications specification status comment identity for webrtcthe definition of 'isolated tracks' in that specification. candidate recommendation additional properties for isolated track support media capture and streamsthe definition of 'mediastreamtrack' in that specification. candidate recommendation initial definition ...
MediaStream Recording API - Web APIs
if you need or want to check to see if a specific mime type is supported, that's possible as well. just call mediarecorder.istypesupported(). examining potential input sources if your goal is to rec...
...g recorded, it's delivered to consumers in blob form using a blobevent of type dataavailable. ...
MutationObserverInit.attributeOldValue - Web APIs
n value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes. if true, oldvalue is set accordingly. if false, it is not. when using attributeoldvalue, setting the attributes option to true is optional. example in this example, a mutation observer is set up to watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": notifyuser("attri...
... attribute's new value (mutation.target[mutation.attributename]) and its old value (mutation.oldvalue). when observe() is called, the specified options are attributes and attributeoldvalue, which means that changes to attribute values will be reported, and each mutation record will include the oldvalue property specifying the attribute's previous value. specifications specification status comment domthe definition of 'mutationobserverinit.attributeoldvalue' in that specification. living standard ...
MutationObserverInit.attributes - Web APIs
onrecord's oldvalue property. subtree lets you specify whether to watch the target node and all of its descendants (true), or just the target node (false). if you set either attributefilter or attributeoldvalue to true, attributes is automatically assumed to be true, even if you don't expressly set it as such. example in this example, a mutation observer is set up to watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room. this lets the code, for example, reflect changes to users' nicknames, or to mark them as away from keyboard (afk) or offline. function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": notifyuser("attri...
... attribute's new value (mutation.target[mutation.attributename]) and its old value (mutation.oldvalue). when observe() is called, the specified options are attributes and attributeoldvalue, which means that changes to attribute values will be reported, and each mutation record will include the oldvalue property specifying the attribute's previous value. specifications specification status comment domthe definition of 'mutationobserverinit.attributes' in that specification. living standard ...
Navigator.mediaSession - Web APIs
, seek, and other similar controls. an internet radio app, for example, can use setactionhandler() to let fhe media controls on a keyboard or elsehwere on the user's device be used to control the app's media playback. syntax let mediasession = navigator.mediasession; value a mediasession object the current document can use to share information about media it's playing and its current playback status. this information can include typical metadata such as the title, artist, and album name of the song being played as well as potentially one or more images containing things like album art, artist photos, and so forth. example in this example, metadata is submitted to the mediasession object. note that the code begins by ensuring that the navigator.mediasession property is available before atte...
... object. note that the code begins by ensuring that the navigator.mediasession property is available before attempting to use it. if ("mediasession" in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); } specifications specification status comment media session standardthe definition of 'navigator.mediasession' in that specification. draft initial definition. ...
Network Information API - Web APIs
information interface and a single property to the navigator interface: navigator.connection. note: this feature is available in web workers. examples detect connection changes this example watches for changes to the user's connection. var connection = navigator.connection || navigator.mozconnection || navigator.webkitconnection; var type = connection.effectivetype; function updateconnectionstatus() { console.log("connection type changed from " + type + " to " + connection.effectivetype); type = connection.effectivetype; } connection.addeventlistener('change', updateconnectionstatus); preload large resources the connection object is useful for deciding whether to preload resources that take large amounts of bandwidth or memory. this example would be called soon after page load to c...
... draft initial specification ...
OVR_multiview2 - Web APIs
e two views, but there are prototypes of headset with ultra-wide fov using 4 views which is currently the maximum number of views supported by multiview. framebuffer_incomplete_view_targets_ovr if baseviewindex is not the same for all framebuffer attachment points where the value of framebuffer_attachment_object_type is not none, the framebuffer is considered incomplete. calling checkframebufferstatus for a framebuffer in this state returns framebuffer_incomplete_view_targets_ovr. methods framebuffertexturemultiviewovr() simultaneously renders to multiple elements of a 2d texture array. examples this example is taken from the specification. see also this three.js demo for a live multiview example. const gl = document.createelement('canvas').getcontext( 'webgl2', { antialias: false } ...
..., 0, 0, 2); gl.drawelements(...); // draw will be broadcasted to the layers of colortex and depthstenciltex. shader code #version 300 es #extension gl_ovr_multiview2 : require precision mediump float; layout (num_views = 2) in; in vec4 inpos; uniform mat4 u_viewmatrices[2]; void main() { gl_position = u_viewmatrices[gl_viewid_ovr] * inpos; } specifications specification status ovr_multiview2 community approved ...
Performance API - Web APIs
r provides methods and properties used to observe performance measurement events and be notified of new performance entries as they are recorded in the browser's performance timeline. performanceresourcetiming provides methods and properties for retrieving and analyzing detailed network timing data regarding the loading of an application's resources. specifications specification status comment high resolution time recommendation initial definition. high resolution time level 2 recommendation adds performance attribute on window and workerglobalscope. high resolution time level 3 editor's draft add timeorigin property to performance interface. frame timing draft adds performanceframetiming interface. navigat...
..., and decodedbodysize properties to the performanceresourcetiming interface. resource timing level 3 editor's draft user timing recommendation adds mark(), clearmarks(), measure() and clearmeasures() methods to the performance interface. adds the performancemark and peformancemeasure interfaces. user timing level 2 working draft implementation status as shown in the performance interface's browser compatibility table, most of these interfaces are broadly implemented by desktop browsers. to test your browser's support for the performance interface, run the perf-api-support application. see also a primer for web performance timing apis ...
Permissions - Web APIs
permissions.request() requests permission to use a given api. this is not currently supported in any browser. permissions.requestall() requests permission to use a given set of apis. this is not currently supported in any browser. permissions.revoke() revokes the permission currently set on a given api. ...
...revoke() revokes the permission currently set on a given api. example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state === 'granted') { showlocalnewswithgeolocation(); } else if (result.state === 'prompt') { showbuttontoenablelocalnews(); } // don't do anything if the permission was denied. }); specification specification status comment permissionsthe definition of 'permissions' in that specification. working draft initial definition. browser support the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explore...
PushManager - Web APIs
'denied', or 'prompt'. pushmanager.subscribe() subscribes to a push service. it returns a promise that resolves to a pushsubscription object containing details of a push subscription. a new push subscription is created if the current service worker does not have an existing subscription. 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. replaced by pushmanager.permissionstate(). pushmanager.register() subscribes to a push subscription. replaced by pushmanager.subscribe(). pushmanager.registrations() retrieves existing push subscriptions. replaced by pushmanager.getsubscription(). pushmanager.unregister() unregisters and deletes a specified su...
...it using, // for example, an xmlhttprequest. }, function(error) { // during development it often helps to log errors to the // console. in a production environment it might make sense to // also report information about errors back to the // application server. console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification. working draft initial definition. ...
Push API - Web APIs
Web › API › Push API
service worker api have been specified in the push api spec to provide an entry point for using push messages. they also monitor and respond to push and subscription change events. serviceworkerregistration.pushmanager read only returns a reference to the pushmanager interface for managing push subscriptions including subscribing, getting an active subscription, and accessing push permission status. this is the entry point into using push messaging. serviceworkerglobalscope.onpush an event handler fired whenever a push event occurs; that is, whenever a server push message is received. serviceworkerglobalscope.onpushsubscriptionchange an event handler fired whenever a pushsubscriptionchange event occurs; for example, when a push subscription has been invalidated, or is about to be invali...
... received. ...
RTCDataChannel: error event - Web APIs
v => { 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); } if...
...tp cause code. other error types similarly output appropriate information. you can also set up an event handler for error events using the rtcdatachannel interface's onerror event handler property: dc.onerror = ev => { const err = ev.error; /* ... */ } note: since rtcerror is not one of the legacy errors, the value of rtcerror.code is always 0. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'error event' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.readyState - Web APIs
of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection. syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport. rtcdatachannelstate enum the rtcdatachannelstate enum defines string constants which reflect the current status of the rtcdatachannel's underlying data connection. constant description "connecting" the user agent (browser) is in the process of creating the underlying data transport; that is, whatever network level connection is used to link the two peers together is in the process of being set up. this is the state of a new rtcdatachannel after being created by rtcpeerconnectio...
... candidate recommendation initial specification. ...
RTCDtlsTransport.state - Web APIs
candidate recommendation initial definition. ...
... candidate recommendation initial definition. ...
RTCDtlsTransport - Web APIs
candidate recommendation initial definition. ...
... candidate recommendation initial definition. ...
RTCIceTransport: gatheringstatechange event - Web APIs
a gatheringstatechange event is sent to an rtcicetransport when its ice candidate gathering state changes. the gathering state, whose actual status can be found in the transport object's gatheringstate property, indicates whether or not the ice agent has begun gathering candidates, and if so, if it has finished doing so. bubbles no cancelable no interface event event handler property ongatheringstatechange the key difference between gatheringstatechange and icegatheringstatechange is that the latter represents the overall state of the connection including every rtcicetransport used by every rtcrtpsender and every rtcrtpreceiver on the entire connection. in contrast, gatheringstatechange represents changes to the candidate gathering state f...
... candidate recommendation ...
RTCPeerConnection: iceconnectionstatechange event - Web APIs
s an event handler for this event can be added using the rtcpeerconnection.oniceconnectionstatechange property or by using addeventlistener() on the rtcpeerconnection. in this example, a handler for iceconnectionstatechange is set up to update a call state indicator by using the value of iceconnectionstate to create a string which corresponds to the name of a css class that we can assign to the status indicator to cause it to reflect the current state of the connection. pc.addeventlistener("iceconnectionstatechange", ev => { let stateelem = document.queryselector("#call-state"); stateelem.classname = `${pc.iceconnectionstate}-state`; }, false); this can also be written as: pc.oniceconnectionstatechange = ev => { let stateelem = document.queryselector("#call-state"); stateelem.class...
... candidate recommendation ...
RTCPeerConnection.iceGatheringState - Web APIs
ection of ice candidates has finished. you can detect when the value of this property changes by watching for an event of type icegatheringstatechange. syntax var state = rtcpeerconnection.icegatheringstate; value the possible values are those of an enum of type rtcicegatheringstate. rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property. you can detect when this value changes by watching for an event of type icegatheringstatechange. constant description "new" the peer connection was just created and hasn't done any networking yet. "gathering" the ice agent is in the process of gathering candidates for the...
... "complete" the ice agent has finished gathering candidates. if something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ice server, the state will revert to "gathering" to gather those candidates. example var pc = new rtcpeerconnection(); var state = pc.icegatheringstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.icegatheringstate' in that specification. candidate recommendation initial specification. ...
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
by subtracting startrecord's framesdecoded from endrecord.framesdecoded. finally, the frame rate over the elapsed time span is calculated by dividing framesdecoded by elapsedtime. the remainder of the networkteststop() function constructs the html used to display the output of the collected and computed results to the user, then append it to the element statsbox, which we're using to show the status updates to the user. the output log, given the styles used by the example, looks like this: in the screenshot, we see a heading followed by the scrollable <div> we refer to as statsbox. the box contains a number of log entries, the last handful of which are visible. each one represents approximately one second of time (since that's much time we're waiting between calling networkteststart() an...
...ies, the last handful of which are visible. each one represents approximately one second of time (since that's much time we're waiting between calling networkteststart() and networkteststop()). try it and fork it this example is available on glitch for you to try out, examine, or remix. you can also access it directly using glitch's git server. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.localid' in that specification. candidate recommendation initial definition. ...
RTCRtpEncodingParameters - Web APIs
r. this value can only be set when creating the transceiver; after that, this value is read only. dtx only used for an rtcrtpsender whose kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity). the value is taken from the enumerated string type rtcdtxstatus. maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for this encoding. other parameters may further constrain the bit rate, such as the value of maxframerate or transport or physical network limitations. maxframerate a double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime an unsig...
...tor by which to scale down the video during encoding. the default value, 1.0, means that the sent video's size will be the same as the original. a value of 2.0 scales the video frames down by a factor of 2 in each dimension, resulting in a video 1/4 the size of the original. the value must not be less than 1.0 (you can't use this to scale the video up). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpSendParameters.encodings - Web APIs
r. this value can only be set when creating the transceiver; after that, this value is read only. dtx only used for an rtcrtpsender whose kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity). the value is taken from the enumerated string type rtcdtxstatus. maxbitrate an unsigned long integer indicating the maximum number of bits per second to allow for this encoding. other parameters may further constrain the bit rate, such as the value of maxframerate or transport or physical network limitations. maxframerate a double-precision floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime an unsig...
...tor by which to scale down the video during encoding. the default value, 1.0, means that the sent video's size will be the same as the original. a value of 2.0 scales the video frames down by a factor of 2 in each dimension, resulting in a video 1/4 the size of the original. the value must not be less than 1.0 (you can't use this to scale the video up). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters.encodings' in that specification. candidate recommendation initial definition. ...
Response() - Web APIs
Web › API › Response › Response
arameters body optional an object defining a body for the response. this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value). the possible options are: status: the status code for the reponse, e.g., 200. statustext: the status message associated with the status code, e.g., ok. headers: any headers you want to add to your response, contained within a headers object or object literal of bytestring key/value pairs (see http headers for a reference). examples in our fetch response example (see fetch response live) we create a new response object...
...he status code, e.g., ok. headers: any headers you want to add to your response, contained within a headers object or object literal of bytestring key/value pairs (see http headers for a reference). examples in our fetch response example (see fetch response live) we create a new response object using the constructor, passing it a new blob as a body, and an init object containing a custom status and statustext: var myblob = new blob(); var init = { "status" : 200 , "statustext" : "supersmashinggreat!" }; var myresponse = new response(myblob,init); specifications specification status comment fetchthe definition of 'response()' in that specification. living standard initial definition ...
Response.ok - Web APIs
Web › API › Response › ok
syntax var myok = response.ok; value a boolean. 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>. note: at the top of the fetch() block we log the response ok value to the console. ...
...console. 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. living standard initial definition ...
Response.redirect() - Web APIs
Web › API › Response › redirect
the redirect() method of the response interface returns a response resulting in a redirect to the specified url. note: this is mainly relevant to the serviceworker api. a controlling service worker could intercept a page's request and redirect it as desired. this will actually lead to a real redirect if a service worker sends it upstream. syntax var response = response.redirect(url, status); parameters url the url that the new response is to originate from. status optional an optional status code for the response (e.g., 302.) return value a response object. exceptions exception explanation rangeerror the specified status is not a redirect status. typeerror the specified url is invalid. example responseobj.redirect('https://www.exa...
... from. status optional an optional status code for the response (e.g., 302.) return value a response object. exceptions exception explanation rangeerror the specified status is not a redirect status. typeerror the specified url is invalid. example responseobj.redirect('https://www.example.com', 302); specifications specification status comment fetchthe definition of 'redirect()' in that specification. living standard ...
Response.type - Web APIs
Web › API › Response › type
nse interface contains the type of the response. it can be one of the following: basic: normal, same origin response, with all headers exposed except “set-cookie” and “set-cookie2″. cors: response was received from a valid cross-origin request. certain headers and the body may be accessed. error: network error. no useful information describing the error is available. the response’s status is 0, headers are empty and immutable. this is the type for a response obtained from response.error(). opaque: response for “no-cors” request to cross-origin resource. severely restricted. opaqueredirect: the fetch request was made with redirect: "manual". the response's status is 0, headers are empty, body is null and trailer is empty. note: an "error" response never really gets exposed...
...the response type to the console. var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.type); // returns basic by default response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'type' in that specification. living standard initial definition ...
Response - Web APIs
Web › API › Response
object being returned as the result of another api operation—for example, a service worker fetchevent.respondwith, or a simple windoworworkerglobalscope.fetch(). constructor response() creates a new response object. properties response.headers read only the headers object associated with the response. response.ok read only a boolean indicating whether the response was successful (status in the range 200–299) or not. response.redirected read only indicates whether or not the response is the result of a redirect (that is, its url list has more than one entry). response.status read only the status code of the response. (this will be 200 for a success). response.statustext read only the status message corresponding to the status code. (e.g., ok for 200). response.trailer...
... living standard initial definition ...
SecurityPolicyViolationEvent - Web APIs
urce that caused the violation, usually the first 40 characters. this will only be populated if the resource is an inline script, event handler, or style — external resources causing a violation will not generate a sample. securitypolicyviolationevent.sourcefileread only a usvstring representing the uri of the document or worker in which the violation was found. securitypolicyviolationevent.statuscoderead only a number representing the http status code of the document or worker in which the violation occurred. securitypolicyviolationevent.violateddirectiveread only a domstring representing the directive whose enforcement uncovered the violation. examples document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); console.log(e.violateddirective); ...
...worker in which the violation occurred. securitypolicyviolationevent.violateddirectiveread only a domstring representing the directive whose enforcement uncovered the violation. examples document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); console.log(e.violateddirective); console.log(e.originalpolicy); }); specifications specification status comment content security policy level 2the definition of 'securitypolicyviolationevent' in that specification. recommendation initial definition. content security policy level 3the definition of 'securitypolicyviolationevent' in that specification. working draft ...
ServiceWorkerRegistration.pushManager - Web APIs
syntax var pushmanager = serviceworkerregistration.pushmanager; value a pushmanager object. examples this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb, send it to any open // windows, display a notification, etc. ...
...it using, // for example, an xmlhttprequest. }, function(error) { // during development it often helps to log errors to the // console. in a production environment it might make sense to // also report information about errors back to the // application server. console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification. working draft initial definition. ...
ServiceWorkerRegistration - Web APIs
r is first called.) serviceworkerregistration.navigationpreload read only returns the instance of navigationpreloadmanager associated with the current service worker registration. serviceworkerregistration.pushmanager read only returns a reference to the pushmanager interface for managing push subscriptions including subscribing, getting an active subscription, and accessing push permission status. serviceworkerregistration.sync read only returns a reference to the syncmanager interface, which manages background synchronization processes. serviceworkerregistration.index read only returns a reference to the contentindex interface, for managing indexed content for offline viewing. unimplemented properties serviceworkerregistration.periodicsync read only returns a reference...
... working draft initial definition. push apithe definition of 'pushmanager' in that specification. working draft adds the pushmanager property. notifications api living standard adds the shownotification() method and the getnotifications() method. web ...
SpeechRecognition.continuous - Web APIs
the continuous property of the speechrecognition interface controls whether continuous results are returned for each recognition, or only a single result. it defaults to single results (false.) syntax var mycontinuous = myspeechrecognition.continuous; myspeechrecognition.continuous = true; value a boolean representing the current speechrecognition's continuous status. true means continuous, and false means not continuous (single result each time.) examples this code is excerpted from our speech color changer example. var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | mag...
... draft ...
TouchEvent - Web APIs
hen the touch event was fired. touchevent.targettouchesread only a touchlist of all the touch objects that are both currently in contact with the touch surface and were also started on the same element that is the target of the event. touchevent.touches read only a touchlist of all the touch objects representing all current points of contact with the surface, regardless of target or changed status. touchevent.rotation read only change in rotation (in degrees) since the event's beginning. positive values indicate clockwise rotation; negative values indicate anticlockwise rotation. initial value: 0.0 touchevent.scale read only distance between two digits since the event's beginning. expressed as a floating-point multiple of the initial distance between the digits at the beginning o...
...l event handler for the touchstart event. globaleventhandlers.ontouchend a global event handler for the touchend event. globaleventhandlers.ontouchmove a global event handler for the touchmove event. globaleventhandlers.ontouchcancel a global event handler for the touchcancel event. example see the example on the main touch events article. specifications specification status comment touch events – level 2the definition of 'touchevent' in that specification. draft added ontouchstart, ontouchend, ontouchmove, ontouchend global attribute handlers touch eventsthe definition of 'touchevent' in that specification. recommendation initial definition. ...
Using Touch Events - Web APIs
ecific target element (rather than the entire document or nodes higher up in the document tree). add touchmove, touchend and touchcancel event handlers within the touchstart. the target touch element or node should be large enough to accommodate a finger touch. if the target area is too small, touching it could result in firing other events for adjacent elements. implementation and deployment status the touch events browser compatibility data indicates touch event support among mobile browsers is relatively broad, with desktop browser support lagging although additional implementations are in progress. some new features regarding a touch point's touch area - the area of contact between the user and the touch surface - are in the process of being standardized. the new features include the x...
...a finger, pen/stylus or mouse. see the pointer events mdn article. the pointer event model can simplify an application's input processing since a pointer represents input from any input device. additionally, the pointer event types are very similar to mouse event types (for example, pointerdown pointerup) thus code to handle pointer events closely matches mouse handling code. the implementation status of pointer events in browsers is relatively high with chrome, firefox, ie11 and edge having complete implementations. examples and demos the following documents describe how to use touch events and include example code: touch events overview implement custom gestures introduction to touch events in javascript add touch screen support to your website (the easy way) touch event demonstrat...
USBDevice.clearHalt() - Web APIs
see the for details. syntax var promise = usbdevice.clearhalt(direction, endpointnumber) parameters direction indicates whether the devices input or output should be cleared. valid values are 'in' or 'out'. endpointnumber indicates the number of the endpoint to clear. ...
... be passed to a usb device and how it is passed is particular and unique to each device. while (true) { let result = await data.transferin(1, 6); if (result.data && result.data.bytelength === 6) { console.log('channel 1: ' + result.data.getuint16(0)); console.log('channel 2: ' + result.data.getuint16(2)); console.log('channel 5: ' + result.data.getuint16(4)); } if (result.status === 'stall') { console.warn('endpoint stalled. clearing.'); await device.clearhalt('in', 1); } } specifications specification status comment webusbthe definition of 'clearhalt()' in that specification. draft initial definition. ...
USBDevice.controlTransferIn() - Web APIs
syntax var promise = usbdevice.controltransferin(setup, length) parameters setup an object that sets options for . 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". ...
...endpoint", or "other". request: a vendor-specific command. value: vender-specific request parameters. index: the interface number of the recipient. length the maximum number of bytes to read from the device. the actual data is in the usbintransferresult in the resolved promise. return value promise that resolves with a usbintransferresult. specifications specification status comment webusbthe definition of 'controltransferin()' in that specification. draft initial definition. ...
USBDevice.controlTransferOut() - Web APIs
syntax var promise = usbdevice.controltransferout(setup, data) parameters setup an object that sets options for . 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". recipient: specifices the target of the transfer on the device, one of "device", "interface", "endpoint", or "other". ...
...index: the interface number of the recipient. data a typedarray containing the data that will be transfered to the device. not all commands require data; some commands can send data just through the value parameter. check with your device to see what the specific request requires. return value a promise that resolves with a usbouttransferresult. specifications specification status comment webusbthe definition of 'controltransferout()' in that specification. draft initial definition. ...
USBDevice - Web APIs
Web › API › USBDevice
ice.vendorid read only the official usg.org-assigned vendor id. methods usbdevice.claiminterface() returns a promise that resolves when the requested interface is claimed for exclusive access. usbdevice.clearhalt() returns a promise that resolves when a halt condition is cleared. usbdevice.controltransferin() returns a promise that resolves with a usbtransferinresult when a command or status operation has been transmitted to the usb device. usbdevice.controltransferout() returns a promise that resolves with a usbtransferoutresult when a command or status operation has been transmitted from the usb device. usbdevice.close() returns a promise that resolves when all open interfaces are released and the device session has ended. usbdevice.isochronoustransferin() returns a promise t...
...a promise that resolves when the specified configuration is selected. usbdevice.transferin() returns a promise that resolves with a usbtransferinresult when bulk or interrupt data is received from the usb device. usbdevice.transferout() returns a promise that resolves with a usbtransferoutresult when bulk or interrupt data is sent to the usb device. specifications specification status comment webusbthe definition of 'usbdevice' in that specification. draft initial definition. ...
USBInTransferResult - Web APIs
the usbintransferresult interface of the webusb api provides the result from a call to the transferin() and controltransferin() methods of the usbdevice interface. it represents the result from requesting a transfer of data from the usb device to the usb host. constructor usbintransferresult.usbintransferresult() creates a new usbintransferresult object with the provided status and data fields. properties usbintransferresult.dataread only returns a dataview object containing the data received from the usb device, if any. usbintransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful. "stall" - the device indicated an error by generating a stall condition on the endpoint. a stall on the control endpoint does not ...
...successful. "stall" - the device indicated an error by generating a stall condition on the endpoint. a stall on the control endpoint does not need to be cleared. a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferin() can be called again. "babble" - the device responded with more data than was expected. specifications specification status comment webusbthe definition of 'usbintransferresult' in that specification. draft initial definition. ...
USBIsochronousOutTransferPacket - Web APIs
the usbisochronousouttransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferout() method of the usbdevice interface. 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. constructor usbisochronousouttransferpacket.usbisochronousouttransferpacket() creates a new usbisochronousouttransferpacket object with the provided status and byteswritten fields. properties usbisochronousouttransferpacket.byteswrittenread only returns the number of bytes from the packet that were sent to the device. usbisochronousouttransferpacket.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful. "stall" - t...
...f bytes from the packet that were sent to the device. usbisochronousouttransferpacket.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful. "stall" - the device indicated an error by generating a stall condition on the endpoint. a stall on an isochronous endpoint does not need to be cleared. specifications specification status comment webusbthe definition of 'usbisochronousouttransferpacket' in that specification. draft initial definition. ...
USBOutTransferResult - Web APIs
the usbouttransferresult interface of the webusb api provides the result from a call to the transferout() and controltransferout() methods of the usbdevice interface. it represents the result from requesting a transfer of data from the usb host to the usb device. constructor usbouttransferresult.usbouttransferresult() creates a new usbouttransferresult object with the provided status and byteswritten fields. 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. "stall" - the device indicated an error by generating a stall condition on the endpoint. a stall on a bulk...
...device. usbouttransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful. "stall" - the device indicated an error by generating a stall condition on the endpoint. a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferout() can be called again. specifications specification status comment webusbthe definition of 'usbouttransferresult' in that specification. draft initial definition. ...
WebGL2RenderingContext.clientWaitSync() - Web APIs
webglsync object on which to wait on. flags a glbitfield specifying a bitwise combination of flags controlling the flushing behavior. may be gl.sync_flush_commands_bit. timeout a glint64 specifying a timeout (in nanoseconds) for which to wait for the sync object to become signaled. must not be larger than gl.max_client_wait_timeout_webgl. return value a glenum indicating the sync object's status. gl.already_signaled: indicates that the sync object was signaled when this method was called. gl.timeout_expired: indicates that the timeout time passed and that the sync object did not become signaled. gl.condition_satisfied: indicates that the sync object was signaled before the timeout expired. gl.wait_failed: indicates that an error occurred during the execution. examples var sync =...
...ect was signaled when this method was called. gl.timeout_expired: indicates that the timeout time passed and that the sync object did not become signaled. gl.condition_satisfied: indicates that the sync object was signaled before the timeout expired. gl.wait_failed: indicates that an error occurred during the execution. examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); var status = gl.clientwaitsync(sync, 0, 0); specifications specification status comment webgl 2.0the definition of 'clientwaitsync' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glclientwaitsync' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getSyncParameter() - Web APIs
the webgl2renderingcontext.getsyncparameter() method of the webgl 2 api returns parameter information of a webglsync object. syntax any gl.getsyncparameter(sync, pname); parameters sync a webglsync object. pname a glenum specifying which information to return. possible values: gl.object_type: returns a glenum indicating the type of the sync object (always gl.sync_fence). gl.sync_status: returns a glenum indicating the status of the sync object (gl.signaled or gl.unsignaled). gl.sync_condition: returns a glenum indicating the sync objects' condition (always gl.sync_gpu_commands_complete). gl.sync_flags: returns a glenum indicating the flags with which the sync object was created (always 0 as no flags are supported). return value depends on the pname parameter, either ...
...indicating the sync objects' condition (always gl.sync_gpu_commands_complete). gl.sync_flags: returns a glenum indicating the flags with which the sync object was created (always 0 as no flags are supported). return value depends on the pname parameter, either a glenum or a glbitfield. examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.getsyncparameter(sync, gl.sync_status); specifications specification status comment webgl 2.0the definition of 'getsyncparameter' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetsynciv' in that specification. standard man page of the (similar) opengl api. ...
WebGLProgram - Web APIs
call the gl context's createprogram() function. after attaching the shader programs using attachshader(), you link them into a usable program. this is shown in the code below. var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program. \n\n' + info; } see webglshader for information on creating the vertexshader and fragmentshader in the above example. examples using the program the steps to actually do some work with the program involve telling the gpu to use the program, bind the appropriate data and configuration options, and final...
... recommendation initial definition. ...
WebGLRenderingContext.getProgramParameter() - Web APIs
the webglrenderingcontext.getprogramparameter() method of the webgl api returns information about the given program. syntax any gl.getprogramparameter(program, pname); parameters program a webglprogram to get parameter information from. pname a glenum specifying the information to query. possible values: gl.delete_status: returns a glboolean indicating whether or not the program is flagged for deletion. gl.link_status: returns a glboolean indicating whether or not the last link operation was successful. gl.validate_status: returns a glboolean indicating whether or not the last validation operation was successful. gl.attached_shaders: returns a glint indicating the number of attached shaders to a program. gl.active_attributes: returns a glint indicating the number of active...
...s. gl.transform_feedback_varyings: returns a glint indicating the number of varying variables to capture in transform feedback mode. gl.active_uniform_blocks: returns a glint indicating the number of uniform blocks containing active uniforms. return value returns the requested program information (as specified with pname). examples gl.getprogramparameter(program, gl.delete_status); specifications specification status comment webgl 1.0the definition of 'getprogramparameter' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetprogramiv' in that specification. standard man page of the (similar) opengl api. webgl 2.0the definition of 'getprogramparameter' in that specification.
WebGLRenderingContext.getShaderParameter() - Web APIs
the webglrenderingcontext.getshaderparameter() method of the webgl api returns information about the given shader. syntax any gl.getshaderparameter(shader, pname); parameters shader a webglshader to get parameter information from. pname a glenum specifying the information to query. possible values: gl.delete_status: returns a glboolean indicating whether or not the shader is flagged for deletion. gl.compile_status: returns a glboolean indicating whether or not the last shader compilation was successful. gl.shader_type: returns a glenum indicating whether the shader is a vertex shader (gl.vertex_shader) or fragment shader (gl.fragment_shader) object. return value returns the requested shader information (as specified with pname). examples gl.getshaderparameter(shader, ...
...whether or not the last shader compilation was successful. gl.shader_type: returns a glenum indicating whether the shader is a vertex shader (gl.vertex_shader) or fragment shader (gl.fragment_shader) object. return value returns the requested shader information (as specified with pname). examples gl.getshaderparameter(shader, gl.shader_type); specifications specification status comment webgl 1.0the definition of 'getshaderparameter' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetshaderiv' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext - Web APIs
ct. webglrenderingcontext.deletebuffer() deletes a webglbuffer object. webglrenderingcontext.getbufferparameter() returns information about the buffer. webglrenderingcontext.isbuffer() returns a boolean indicating if the passed buffer is valid. framebuffers webglrenderingcontext.bindframebuffer() binds a webglframebuffer object to a given target. webglrenderingcontext.checkframebufferstatus() returns the status of the framebuffer. webglrenderingcontext.createframebuffer() creates a webglframebuffer object. webglrenderingcontext.deleteframebuffer() deletes a webglframebuffer object. webglrenderingcontext.framebufferrenderbuffer() attaches a webglrenderingbuffer object to a webglframebuffer object. webglrenderingcontext.framebuffertexture2d() attaches a textures image to a we...
... recommendation initial definition ...
WebGLShader - Web APIs
shader. at this point the webglshader is still not in a usable form and must still be attached to a webglprogram. function createshader (gl, sourcecode, type) { // compiles either a shader of type gl.vertex_shader or gl.fragment_shader var shader = gl.createshader( type ); gl.shadersource( shader, sourcecode ); gl.compileshader( shader ); if ( !gl.getshaderparameter(shader, gl.compile_status) ) { var info = gl.getshaderinfolog( shader ); throw 'could not compile webgl program. \n\n' + info; } return shader; } see webglprogram for information on attaching the shaders. examples creating a vertex shader note that there are many other strategies for writing and accessing shader source code strings. these example are for illustration purposes only. var vertexshadersource...
... recommendation initial definition. ...
A basic 2D WebGL animation example - Web APIs
the shader program and returns the shader program after it's been built and linked. function buildshaderprogram(shaderinfo) { let program = gl.createprogram(); shaderinfo.foreach(function(desc) { let shader = compileshader(desc.id, desc.type); if (shader) { gl.attachshader(program, shader); } }); gl.linkprogram(program) if (!gl.getprogramparameter(program, gl.link_status)) { console.log("error linking shader program:"); console.log(gl.getprograminfolog(program)); } return program; } first, gl.createprogram() is called to create a new, empty, glsl program. then, for each shader in the specified list of shaders, we call a compileshader() function to compile it, passing into it the id and type of the shader function to build. each of those objects inc...
...rned to the caller. compiling an individual shader the compileshader() function, below, is called by buildshaderprogram() to compile a single shader. function compileshader(id, type) { let code = document.getelementbyid(id).firstchild.nodevalue; let shader = gl.createshader(type); gl.shadersource(shader, code); gl.compileshader(shader); if (!gl.getshaderparameter(shader, gl.compile_status)) { console.log(`error compiling ${type === gl.vertex_shader ? "vertex" : "fragment"} shader:`); console.log(gl.getshaderinfolog(shader)); } return shader; } the code is fetched from the html document by obtaining the value of the text node contained within the <script> element with the specified id. then a new shader of the specified type is created using gl.createshader(). the sou...
Using DTMF with WebRTC - Web APIs
ll being simply linked up inline as it is here. html the html for this example is very basic; there are only three elements of importance: an <audio> element to play the audio received by the rtcpeerconnection being "called." a <button> element to trigger creating and connecting the two rtcpeerconnection objects, then sending the dtmf tones. a <div> to receive and display log text to show status information. <p>this example demonstrates the use of dtmf in webrtc. note that this example is "cheating" by generating both peers in one code stream, rather than having each be a truly separate entity.</p> <audio id="audio" autoplay controls></audio><br/> <button name="dial" id="dial">dial</button> <div class="log"></div> javascript let's take a look at the javascript cod...
... an array of the streams the track is a member of (one track can be part of many streams). we take the first stream and attach it to the <audio> element. the addstream event includes a stream property specifying a single stream added to the track. we simply attach it to the <audio> element. logging a simple log() function is used throughout the code to append html to a <div> box for displaying status and errors to the user. function log(msg) { logelement.innerhtml += msg + "<br/>"; } result you can try this example here. when you click the "dial" button, you should see a series of logging messages output, then the dialing will begin. if your browser plays the tones audibly as part of its user experience, you should hear them as they're transmitted. once transmission of the tones is co...
WebRTC API - Web APIs
ven chapter names). most streams consist of at least one audio track and likely also a video track, and can be used to send and receive both live media or stored media information (such as a streamed movie). you can also use the connection between two peers to exchange arbitrary binary data using the rtcdatachannel interface. this can be used for back-channel information, metadata exchange, game status packets, file transfers, or even as a primary channel for data transfer. more details and links to relevant guides and tutorials needed webrtc reference because webrtc provides interfaces that work together to accomplish a variety of tasks, we have divided up the reference by category. please see the sidebar for an alphabetical list. connection setup and management these interfaces, dictiona...
... media capture and streams candidate recommendation the initial definition of the object conveying the stream of media content. media capture from dom elements working draft the initial definition on how to obtain str...
Writing WebSocket servers - Web APIs
e message may never be displayed (browsers do not display it). if the server doesn't understand that version of websockets, it should send a sec-websocket-version header back that contains the version(s) it does understand. in the example above, it indicates version 13 of the websocket protocol. the most interesting header here is sec-websocket-key. let's look at that next. note: regular http status codes can be used only before the handshake. after the handshake succeeds, you have to use a different set of codes (defined in section 7.4 of the spec). server handshake response when the server receives the handshake request, it should send back a special response that indicates that the protocol will be changing from http to websocket. that header looks something like the following (remembe...
...cepts a websockets connection but interprets the data as a http request. so if the key was "dghlihnhbxbszsbub25jzq==", the sec-websocket-accept header's value is "s3pplmbitxaq9kygzzhzrbk+xoo=". once the server sends these headers, the handshake is complete and you can start swapping data! note: the server can send other headers like set-cookie, or ask for authentication or redirects via other status codes, before sending the reply handshake. keeping track of clients this doesn't directly relate to the websocket protocol, but it's worth mentioning here: your server must keep track of clients' sockets so you don't keep handshaking again with clients who have already completed the handshake. the same client ip address can try to connect multiple times. however, the server can deny them if th...
Window - Web APIs
Web › API › Window
. window.sessionstorage returns a reference to the session storage object used to store data that may only be accessed by the origin that created it. window.sidebar read only returns a reference to the window object of the sidebar. window.speechsynthesis read only returns a speechsynthesis object, which is the entry point into using web speech api speech synthesis functionality. window.status gets/sets the text in the statusbar at the bottom of the browser. window.statusbar read only returns the statusbar object, whose visibility can be toggled in the window. window.toolbar read only returns the toolbar object, whose visibility can be toggled in the window. window.top read only returns a reference to the topmost window in the window hierarchy. this property is read only. wi...
...'s origin, serialized as a string. (this does not yet appear to be implemented in any browser.) deprecated properties window.content and window._content read only returns a reference to the content element in the current window. since firefox 57 (initially nightly-only), both versions are only available from chrome (privileged) code, and not available to the web anymore. window.defaultstatus gets/sets the status bar text for the given window. window.dialogarguments read only gets the arguments passed to the window (if it's a dialog box) at the time window.showmodaldialog() was called. this is an nsiarray. window.directories synonym of window.personalbar window.globalstorage multiple storage objects that were used for storing data across multiple pages. window.mozan...
WorkerNavigator - Web APIs
tionread only provides a networkinformation object containing information about the network connection of a device. workernavigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object. workernavigator.permissions read only returns a permissions object that can be used to query and update permission status of apis covered by the permissions api. navigator.storageread only returns a storagemanager interface for managing persistance permissions and estimating available storage. inherited properties navigatorid.appcodename read only always returns 'mozilla', in any browser. this property is kept only for compatibility purposes. navigatorid.appname read only returns the official name o...
...value. navigatorid.product read only always returns 'gecko', on any browser. this property is kept only for compatibility purposes. navigatorid.useragentread only returns the user agent string for the current browser. methods the workernavigator interface implements methods from the navigatorid, navigatorlanguage and navigatoronline interfaces. specifications specification status comment html living standardthe definition of 'workernavigator' in that specification. living standard ...
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. return value undefined example this example begins loading content from the mdn home page, then due to some condition, aborts the transfer by calling abort(). ...
...undefined example this example begins loading content from the mdn home page, then due to some condition, aborts the transfer by calling abort(). 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.readyState - Web APIs
the xmlhttprequest.readystate property returns the state an xmlhttprequest client is in. an xhr client exists in one of the following states: value state description 0 unsent client has been created. open() not called yet. 1 opened open() has been called. 2 headers_received send() has been called, and headers and status are available. 3 loading downloading; responsetext holds partial data. 4 done the operation is complete. unsent the xmlhttprequest client has been created, but the open() method hasn't been called yet. opened open() method has been invoked. during this state, the request headers can be set using the setrequestheader() method and the send() method can be called which will initia...
...t', xhr.readystate); // readystate will be 0 xhr.open('get', '/api', true); console.log('opened', xhr.readystate); // readystate will be 1 xhr.onprogress = function () { console.log('loading', xhr.readystate); // readystate will be 3 }; xhr.onload = function () { console.log('done', xhr.readystate); // readystate will be 4 }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XRPermissionDescriptor - Web APIs
erforming the permission request for an application that requires the local-floor reference space in an immersive-vr environment. if the permissions api is found to be available (by checking to see if navigator.permissions is defined), its query() method is called, specifying the permission descriptor we've established, xrpermissiondesc. when the returned promise resolves, we check the returned status. if permission has been granted, we call a function setupxr() that handles preparing the webxr environment for use. if permission is conditional based on prompting, we call a function promptandsetupxr() that would handle asking for permission before enabling and starting up the environment. and for any other returned state—which is almost certainly denied, which is the only other option as of t...
... working draft initial definition. ...
XRWebGLLayer.framebuffer - Web APIs
erattachmentparameter() on an opaque framebuffer results in the webgl error invalid_operation (0x0502). opaque framebuffers are considered incomplete and are not available for rendering other than while executing the requestanimationframe() callback. attempting to clear, draw to, or read from the framebuffer results in a webgl invalid_framebuffer_operation error (0x0506). calling checkframebufferstatus() on the webgl context from outside the animation frame callback causes the webgl framebuffer_unsupported error (0x8cdd) to be reported. opaque framebuffers initialized with the depth property set to false will not have a depth buffer and will rely on the coordinates alone to determine distance. opaque framebuffers initialized without specifying a stencil will not have a stencil buffer. opaque...
...sparent black). the depth buffer's clear value is the number 1.0. the stencil buffer is filled with 0. examples this example gets the xrwebgllayer for a session and then passes its framebuffer into the webgl context's bindframebuffer() function. let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebuffer' in that specification. working draft initial definition. ...
ARIA live regions - Accessibility
pdate (via subtitles) to the live region: preferring specialized live region roles in the following well-known predefined cases it is better to use a specific provided "live region role": role description compatibility notes log chat, error, game or other type of log to maximize compatibility, add a redundant aria-live="polite" when using this role. status a status bar or area of the screen that provides an updated status of some kind. screen reader users have a special command to read the current status. to maximize compatibility, add a redundant aria-live="polite" when using this role. alert error or warning message that flashes on the screen. alerts are particularly important for client side validation notices to users. (tbd: l...
... = event.target.value; break; default: return; } }; without aria-atomic="true" the screenreader announces only the changed value of year. with aria-atomic="true", the screenreader announces "the set year is: changedvalue" advanced use case: roster a chat site would like to display a list of users currently logged in. display a list of users where a user's log-in and log-out status will be reflected dynamically (without a page reload). <ul id="roster" aria-live="polite" aria-relevant="additions removals"> <!-- use javascript to add remove users here--> </ul> breakdown of aria live properties: aria-live="polite" indicates that the screen reader should wait until the user is idle before presenting updates to the user. this is the most commonly used value, as interrupti...
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. ...
...aluemax attributes. if the progress value is indeterminate, the developer should omit the aria-valuenow attribute. as the task progresses, the aria-valuenow value has to be updated dynamically to indicate this progress to assistive technology products. if the progressbar is describing the loading progress of a particular region of a page, the author should use aria-describedby to point to the status, and set the aria-busy attribute to true on the region until it is finished loading. it is not possible for the user to alter the value of a progressbar because it is always readonly. note: assistive technologies generally will render the value of aria-valuenow as a percent of the range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified. it is best to set th...
ARIA: application role - Accessibility
hould be localized. keyboard interactions keyboard interaction is completely under the web author's control and can be anything associated with the particular widget being implemented. in a slides application, for example, a widget could be created that uses the arrow keys to position elements on the slide, and uses audio feedback via an aria live region to communicate the position and overlap status with other objects. focus is being managed via aria-activedescendant. the tab , space and enter keys, as well as escape , must be handled by the application. the one exception is if focus is set to a standard widget inside the application that supports keyboard navigation from the browser, for example an input element. required javascript features keypress used to handle keyboard input and ...
...ation role can unintentionally take away access from information on a web page, so be very mindful of using it. think hard on if you actually need it and cannot just use a set of other, known, widgets to accomplish the same task. if used, the application role should be added to the lowest common container possible, not on the <body> element, for example. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'application' in that specification. recommendation precedence order applying the application role will cause this and all of the descendant elements of this element to be treated like application content, not web content. any reading mechanisms assistive technologies may have for web content will not apply.
ARIA: row role - Accessibility
ains child cells. these cells can be of different types, depending on whether they are column or row headers, or grid or regular cells. a row can contain a number of attributes clarifying the row's role, including aria-colindex, aria-level, aria-rowindex, and aria-selected. if the row is within a treegrid, rows can include the aria-expanded attribute, using the attribute to indicate the present status. this is not the case for an ordinary table or grid, in which the aria-expanded attribute is not present. to create an interactive widget that has a tabular structure, use the grid pattern instead. if the interaction provides for the selection state of individual cells, if left to right and top to botton navigation is provided, or if the user interface allows the rearranging of cell order or oth...
...owindex="24"> <td role="cell">term</td> <td role="cell">dt</td> </tr> </tbody> </table> above is the semantic way of writing a table. the aria roles are only necessary if the native semantics of the table, and therefore the table rows, are obliterated, such as via setting the display property to flex or grid. added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria row role' in that specification. recommendation wai-aria authoring practicesthe definition of 'aria row role' in that specification. working draft ...
display-mode - CSS: Cascading Style Sheets
ailable display area is used and no user agent chrome is shown. standalone standalone the application will look and feel like a standalone application. this can include the application having a different window, its own icon in the application launcher, etc. in this mode, the user agent will exclude ui elements for controlling navigation, but can include other ui elements such as a status bar. minimal-ui minimal-ui the application will look and feel like a standalone application, but will have a minimal set of ui elements for controlling navigation. the elements will vary by browser. browser browser the application opens in a conventional browser tab or new window, depending on the browser and platform. (none) examples @media all and (displ...
...minimal set of ui elements for controlling navigation. the elements will vary by browser. browser browser the application opens in a conventional browser tab or new window, depending on the browser and platform. (none) examples @media all and (display-mode: fullscreen) { body { margin: 0; border: 5px solid black; } } specifications specification status comment web app manifestthe definition of 'display-mode' in that specification. working draft initial definition. ...
Pseudo-classes - CSS: Cascading Style Sheets
xample, :hover can be used to change a button's color when the user's pointer hovers over it. /* any button over which the user's pointer is hovering */ button:hover { color: blue; } pseudo-classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator (:visited, for example), the status of its content (like :checked on certain form elements), or the position of the mouse (like :hover, which lets you know if the mouse is over an element or not). note: in contrast to pseudo-classes, pseudo-elements can be used to style a specific part of an element. syntax selector:pseudo-class { property: value; } like regular classes, you can chain together as many pseudo-classes as you...
... html living standard living standard defines when particular selectors match html elements. selectors level 4 working draft defined :any-link, :blank, :local-link, :scope, :drop, :current, :past, :future, :placeholder-shown, :user-invalid, :nth-col(), :nth-last-col(), :is() and :where()...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
refox 63. separator firefox removed in firefox 64. spinner firefox removed in firefox 64. spinner-downbutton firefox removed in firefox 64. spinner-textfield firefox removed in firefox 64. spinner-upbutton firefox removed in firefox 64. splitter firefox removed in firefox 64. statusbar firefox removed in firefox 64. statusbarpanel firefox removed in firefox 64. tab firefox removed in firefox 64 tabpanel firefox removed in firefox 64. tabpanels firefox removed in firefox 64 tab-scroll-arrow-back firefox removed in firefox 64. tab-scroll-arrow-forward firefo...
... working draft initial definition. ...
cursor - CSS: Cascading Style Sheets
Web › CSS › cursor
your browser: category css value example description general auto the ua will determine the cursor to display based on the current context. e.g., equivalent to text when hovering text. default the platform-dependent default cursor. typically an arrow. none no cursor is rendered. links & status context-menu a context menu is available. help help information is available. pointer the cursor is a pointer that indicates a link. typically an image of a pointing hand. progress the program is busy in the background, but the user can still interact with the interface (in contrast to wait). wait the...
... recommendation addition of several keywords and the positioning syntax for url(). css level 2 (revision 1)the definition of 'cursor' in that specification. recommendation initial definition. ...
Mouse gesture events - Developer guides
en the user begins performing a "pinch" gesture, by using two fingers as the corners of a rectangle and moving them either closer together or farther apart. this is typically used to zoom in and out on content (this is the default behavior in firefox, for example). mozmagnifygestureupdate the mozmagnifygestureupdate event is sent periodically while processing a magnify gesture, to provide updated status information. the event's delta value represents the amount by which the gesture has moved since the mozmagnifygesturestart or mozmagnifygestureupdate event. note: this event is sent whenever the movement of the user's fingers exceeds the number of pixels indicated by the browser.gesture.pinch.threshold preference. mozmagnifygesture the mozmagnifygesture event is sent when the user completes a "...
...otategesturestart event is sent when the user begins performing a rotate gesture, by placing two fingers on the trackpad and rotating them around the center of the trackpad. firefox uses this gesture to move backward and forward through the tabs in the current window. mozrotategestureupdate the mozrotategestureupdate event is sent periodically while processing a rotate gesture, to provide updated status information. the event's delta value represents the amount by which the gesture has moved since the mozrotategesturestart or mozrotategestureupdate event. note: this event is sent whenever the movement of the user's fingers exceeds the number of pixels indicated by the browser.gesture.pinch.threshold preference. mozrotategesture the mozrotategesture event is sent when the user completes a rotat...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
Web › HTML › Element › details
the html details element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. a summary or label can be provided using the <summary> element. a disclosure widget is typically presented onscreen using a small triangle which rotates (or twists) to indicate open/closed status, with a label next to the triangle. if the first child of the <details> element is a <summary>, the contents of the <summary> element are used as the label for the disclosure widget. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. note: the common use of a triangle which rota...
... activating the tab expands and opens it to reveal its contents. html <details> <summary>system requirements</summary> <p>requires a computer running an operating system. the computer must have some memory and ideally some kind of long-term storage. an input device as well as some form of output device is recommended.</p> </details> result specifications specification status comment html living standardthe definition of '<details>' in that specification. living standard html 5.1the definition of '<details>' in that specification. recommendation initial definition ...
<input type="search"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › search
a extension, supported by firefox for android, which provides a hint as to what sort of action will be taken if the user presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and send. the browser decides, using this hint, what label to put on the enter key. results the results attribute—supported only by safari—is a numeric value that lets you override the maximum number of entries to be displayed in the <input> element's natively-provided drop-down m...
... living standard initial definition html 5.1the definition of '<input type="search">' in that specification. recommendation initial definition ...
<input type="tel"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › tel
a extension, supported by firefox for android, which provides a hint as to what sort of action will be taken if the user presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and send. the browser decides, using this hint, what label to put on the enter key. using tel inputs telephone numbers are a very commonly collected type of data on the web. when creating any kind of registration or e-commerce site, for example, you will likely need to ask the user for a...
...o make. div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; color: #8b0000; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; color: #009000; } specifications specification status comment html living standardthe definition of '<input type="tel">' in that specification. living standard initial definition html 5.1the definition of '<input type="tel">' in that specification. recommendation initial definition ...
<input type="text"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › text
a extension, supported by firefox for android, which provides a hint as to what sort of action will be taken if the user presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and send. the browser decides, using this hint, what label to put on the enter key. using text inputs <input> elements of type text create basic, single-line inputs. you should use them anywhere you want the user to enter a single-line value and there isn't a more specific input type av...
... living standard initial definition html 5.1the definition of '<input type="text">' in that specification. recommendation initial definition ...
<input type="url"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › url
a extension, supported by firefox for android, which provides a hint as to what sort of action will be taken if the user presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and send. the browser decides, using this hint, what label to put on the enter key. using url inputs when you create a url input with the proper type value, url, you get automatic validation that the entered text is at least in the correct form to potentially be a legitimate url. this c...
...rking properly, check your browser's console; there may be helpful error messages there to aid you in solving the problem. examples there's not much else to say about url type inputs; check the pattern validation and using url inputs sections for numerous examples. you can also find our pattern validation example on github (see it running live also). specifications specification status comment html living standardthe definition of '<input type="url">' in that specification. living standard initial definition html 5.1the definition of '<input type="url">' in that specification. recommendation initial definition urlthe definition of 'url syntax' in that specification. living standard living standard ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
Web › HTML › Element › input
a extension, supported by firefox for android, which provides a hint as to what sort of action will be taken if the user presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and send. the browser decides, using this hint, what label to put on the enter key. orient results the results attribute—supported only by safari—is a numeric value that lets you override the maximum number of entries to be displayed in the <input> element's natively-provided ...
... living standard html media capturethe definition of 'capture attribute' in that specification. recommendation adds the capture attribute html5the definition of '<input>' in that specification. recommendation html 4.01 specificationthe definition of '<form>'...
<output>: The Output element - HTML: Hypertext Markup Language
Web › HTML › Element › output
r the outcome of a user action. content categories flow content, phrasing content, listed, labelable, resettable form-associated element, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role status permitted aria roles any dom interface htmloutputelement attributes this element includes the global attributes. for a space-separated list of other elements’ ids, indicating that those elements contributed input values to (or otherwise affected) the calculation. form the <form> element to associate the output with (its form owner). the value of this attrib...
...d="a" name="a" value="10" /> = <output name="result" for="a b">60</output> </form> accessibility concerns many browsers implement this element as an aria-live region. assistive technology will thereby announce the results of ui interactions posted inside it without requiring that focus is switched away from the controls that produce those results. specifications specification status comment html living standardthe definition of '<output>' in that specification. living standard html5the definition of '<output>' in that specification. recommendation ...
<section>: The Generic Section element - HTML: Hypertext Markup Language
Web › HTML › Element › section
epts flow content. note that a <section> element must not be a descendant of an <address> element. implicit aria role region if the element has an accessible name, otherwise no corresponding role permitted aria roles alert, alertdialog, application, banner, complementary, contentinfo, dialog, document, feed, log, main, marquee, navigation, none, note, presentation, search, status, tabpanel dom interface htmlelement attributes this element only includes the global attributes. usage notes each <section> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <section> element. if it makes sense to separately syndicate the content of a <section> element, use an <article> element instead. do not use the <section> ...
...c container; this is what <div> is for, especially when the sectioning is only for styling purposes. a rule of thumb is that a section should logically appear in the outline of a document. example before <div> <h1>heading</h1> <p>bunch of awesome content</p> </div> after <section> <h1>heading</h1> <p>bunch of awesome content</p> </section> specifications specification status comment html living standardthe definition of '<section>' in that specification. living standard html 5.1the definition of '<section>' in that specification. recommendation html5the definition of '<section>' in that specification. recommendation ...
Using the application cache - HTML: Hypertext Markup Language
ces but a browser restart may also be required. in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: c:\users\<username>\appdata\local\mozilla\firefox\profiles\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/profiles/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cache device" heading). the offline cache can be cleared for each site separately using the "remove..." button in tools -> options -> advanced -> network -> offline data. prior to firefox 11, neither tools -> clear recent history nor tools -> options -> advanced -> network -> offline data -> clear now cleared the o...
...ng the swapcache() method. obsolete the application cache group is now obsolete. testing for updates to the cache manifest you can programmatically test to see if an application has an updated cache manifest file, using javascript. since a cache manifest file may have been updated before a script attaches event listeners to test for updates, scripts should always test window.applicationcache.status. function onupdateready() { console.log('found new version!'); } window.applicationcache.addeventlistener('updateready', onupdateready); if(window.applicationcache.status === window.applicationcache.updateready) { onupdateready(); } to manually start testing for a new manifest file, you can use window.applicationcache.update(). gotchas never access cached files by using traditional get ...
HTTP caching - HTTP
Web › HTTP › Caching
and a full response is downloaded each and every time. cache-control: no-store cache but revalidate a cache will send the request to the origin server for validation before releasing a cached copy. cache-control: no-cache private and public caches the "public" directive indicates that the response may be cached by any cache. this can be useful if pages with http authentication, or response status codes that aren't normally cacheable, should now be cached. on the other hand, "private" indicates that the response is intended for a single user only and must not be stored by a shared cache. a private browser cache may store the response in this case. cache-control: private cache-control: public expiration the most important directive here is "max-age=<seconds>" which is the maximum amoun...
...ive is relative to the time of the request. for the files in the application that will not change, you can usually add aggressive caching. this includes static files such as images, css files and javascript files, for example. for more details, see also the freshness section below. cache-control: max-age=31536000 validation when using the "must-revalidate" directive, the cache must verify the status of the stale resources before using it and expired ones should not be used. for more details, see the validation section below. cache-control: must-revalidate the pragma header pragma is a http/1.0 header, it 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,...
Content-Security-Policy-Report-Only - HTTP
which the violation occurred. effective-directive the directive whose enforcement caused the violation. original-policy the original policy as specified by the content-security-policy-report-only http header. referrer the referrer of the document in which the violation occurred. script-sample the first 40 characters of the inline script, event handler, or style that caused the violation. status-code the http status code of the resource on which the global object was instantiated. violated-directive the name of the policy section that was violated. sample violation report let's consider a page located at http://example.com/signup.html. it uses the following policy, disallowing everything but stylesheets from cdn.example.com. content-security-policy-report-only: default-src 'none'...
... violating resource in blocked-uri. this is not always the case. for example, when the signup.html would attempt to load css from http://anothercdn.example.com/stylesheet.css, the browser would not include the full path but only the origin (http://anothercdn.example.com). this is done to prevent leaking sensitive information about cross-origin resources. specifications specification status comment content security policy level 3 working draft no changes. content security policy level 2 recommendation initial definition. ...
Expect - HTTP
Web › HTTP › Headers › Expect
header indicates expectations that need to be fulfilled by the server in order to properly handle the request. the only expectation defined in the specification is expect: 100-continue, to which the server shall respond with: 100 if the information contained in the header is sufficient to cause an immediate success, 417 (expectation failed) if it cannot meet the expectation; or any other 4xx status otherwise. for example, the server may reject a request if its content-length is too large. no common browsers send the expect header, but some other clients such as curl do so by default. header type request header forbidden header name yes syntax no other expectations except "100-continue" are specified currently. expect: 100-continue directives 100-con...
...ader and waits for the server to respond before sending the message body. put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and send the message body, or it will send a 417 (expectation failed) status if any of the expectations cannot be met. specifications specification title rfc 7231, section 5.1.1: expect hypertext transfer protocol (http/1.1): semantics and content ...
Upgrade - HTTP
Web › HTTP › Headers › Upgrade
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). if the server decides to upgrade the connection, it must: send back a 101 switching protocols response status with an upgrade header that specifies the protocol(s) being switched to. for example: http/1.1 101 switching protocols upgrade: foo/2 connection: upgrade send a response to the original request using the new protocol (the server may only switch to a protocol with which it can complete the original request). a server may also send the header as part of a 426 upgrade required response, to...
...separated). the protocols are listed in order of descending preference. ...
Warning - HTTP
Web › HTTP › Headers › Warning
more than one warning header may appear in a response. ...
... response messages. header type general header forbidden header name no syntax warning: <warn-code> <warn-agent> <warn-text> [<warn-date>] directives <warn-code> a three-digit warning number. the first digit indicates whether the warning is required to be deleted from a stored response after validation. 1xx warn-codes describe the freshness or validation status of the response and will be deleted by a cache after deletion. 2xx warn-codes describe some aspect of the representation that is not rectified by a validation and won't be deleted by a cache after validation unless a full response is sent. <warn-agent> the name or pseudonym of the server or software adding the warning header (might be "-" when the agent is unknown). <warn-text...
Redirections in HTTP - HTTP
a http redirect, for this operation. redirects accomplish numerous goals: temporary redirects during site maintenance or downtime permanent redirects to preserve existing links/bookmarks after changing the site's urls, progress pages when uploading a file, etc. principle in http, redirection is triggered by a server sending a special redirect response to a request. redirect responses have status codes that start with 3, and a location header holding the url to redirect to. when browsers receive a redirect, they immediately load the new url provided in the location header. besides the small performance hit of an additional round-trip, users rarely notice the redirection. there are several types of redirects, sorted into three categories: permanent redirections temporary redirectio...
...ps://example.com/some-page will be redirected to https://www.example.com/some-page) redirectmatch does the same, but takes a regular expression to define a collection of affected urls: redirectmatch ^/images/(.*)$ https://images.example.com/$1 all documents in the images/ directory will redirect to a different domain. if you don't want a temporary redirect, an extra parameter (either the http status code to use or the permanent keyword) can be used to set up a different redirect: redirect permanent / https://www.example.com # …acts the same as: redirect 301 / https://www.example.com the mod_rewrite module can also create redirects. it is more flexible, but a bit more complex. nginx in nginx, you create a specific server block for the content you want to redirect: server { listen 80;...
HTTP resources and specifications - HTTP
http was first specified in the early 1990s. designed with extensibility in mind, it has seen numerous additions over the years; this lead to its specification being scattered through numerous specification documents (in the midst of experimental abandoned extensions). this page lists relevant resources about http. ...
...ate management mechanism defines cookies proposed standard draft spec cookie prefixes ietf draft draft spec same-site cookies ietf draft draft spec deprecate modification of 'secure' cookies from non-secure origins ietf draft rfc 2145 use and interpretation of http version numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirect) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 uniform resource identifier (uri): generic syntax internet standard rfc ...
100 Continue - HTTP
Web › HTTP › Status › 100
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. ...
... 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. ...
200 OK - HTTP
Web › HTTP › Status › 200
the http 200 ok success status response code indicates that the request has succeeded. a 200 response is cacheable by default. the meaning of a success depends on the http request method: get: the resource has been fetched and is transmitted in the message body. head: the entity headers are in the message body. post: the resource describing the result of the action is transmitted in the message body. trace: the message body contains the request message as received by the server. the successful result of a put or a delete is often not a 200 ok but a 204 no content (or a 201 created when the resource is uploaded for the first time). ...
...the message body. head: the entity headers are in the message body. post: the resource describing the result of the action is transmitted in the message body. ...
201 Created - HTTP
Web › HTTP › Status › 201
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. ...
...response code indicates that the request has succeeded and has led to the creation of a resource. ...
202 Accepted - HTTP
Web › HTTP › Status › 202
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. ...
...ot have started yet. the request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. ...
203 Non-Authoritative Information - HTTP
Web › HTTP › Status › 203
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 . the 203 response is similar to the value 214, meaning transformation applied, of the warning header code, which has the additional advantage of being applicable to responses with any status code. ...
...thoritative 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 . the 203 response is similar to the value 214, meaning transformation applied, of the warning header code, which has the additional advantage of being applicable to responses with any status code. ...
204 No Content - HTTP
Web › HTTP › Status › 204
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. a 204 response is cacheable by default. an etag header is included in such a response. 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. if the resource is created, 201 created is returned instead. if the page should be changed to the newly updated page, the 200 should be used instead. ...
... a 204 response is cacheable by default. an etag header is included in such a response. ...
300 Multiple Choices - HTTP
Web › HTTP › Status › 300
the http 300 multiple choices redirect status response code indicates that the request has more than one possible responses. the user-agent or the user should choose one of them. as there is no standardized way of choosing one of the responses, this response code is very rarely used. if the server has a preferred choice, it should generate a location header. ...
... the http 300 multiple choices redirect status response code indicates that the request has more than one possible responses. the user-agent or the user should choose one of them. as there is no standardized way of choosing one of the responses, this response code is very rarely used. if the server has a preferred choice, it should generate a location header. ...
302 Found - HTTP
Web › HTTP › Status › 302
a browser redirects to this page but search engines don't update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is not sent to the new url). even if the specification requires the method (and the body) not to be altered when the redirection is performed, not all user-agents conform here - you can still find this type of bugged software out there. ...
...a response for get or head methods and to use 307 temporary redirect instead, as the method change is explicitly prohibited in that case. ...
303 See Other - HTTP
Web › HTTP › Status › 303
the hypertext transfer protocol (http) 303 see other redirect status response code indicates that the redirects don't link to the newly uploaded resources, but to another page (such as a confirmation page or an upload progress page). this response code is usually sent back as a result of put or post. the method used to display this redirected page is always get. ...
... the hypertext transfer protocol (http) 303 see other redirect status response code indicates that the redirects don't link to the newly uploaded resources, but to another page (such as a confirmation page or an upload progress page). this response code is usually sent back as a result of put or post. the method used to display this redirected page is always get. ...
307 Temporary Redirect - HTTP
Web › HTTP › Status › 307
the method and the body of the original request are reused to perform the redirected request. in the cases where you want the method used to be changed to get, use 303 see other instead. this is useful when you want to give an answer to a put method that is not the uploaded resources, but a confirmation message (like "you successfully uploaded xyz"). 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. ...
... xyz"). 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. ...
400 Bad Request - HTTP
Web › HTTP › Status › 400
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. ...
... 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. ...
401 Unauthorized - HTTP
Web › HTTP › Status › 401
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. this status is sent with a www-authenticate header that contains information on how to authorize correctly. this status is similar to 403, but in this case, authentication is possible. ...
... 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. this status is sent with a www-authenticate header that contains information on how to authorize correctly. this status is similar to 403, but in this case, authentication is possible. ...
402 Payment Required - HTTP
Web › HTTP › Status › 402
the http 402 payment required is a nonstandard client error status response code that is reserved for future use. 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. however, no standard use convention exists and different entities use it in different contexts. ...
... reserved for future use. sometimes, this code indicates that the request can not be processed until the client makes a payment. ...
403 Forbidden - HTTP
Web › HTTP › Status › 403
the http 403 forbidden client error status response code indicates that the server understood the request but refuses to authorize it. this status is similar to 401, but in this case, re-authenticating will make no difference. the access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource. ...
... the http 403 forbidden client error status response code indicates that the server understood the request but refuses to authorize it. this status is similar to 401, but in this case, re-authenticating will make no difference. the access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource. ...
405 Method Not Allowed - HTTP
Web › HTTP › Status › 405
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. the server must generate an allow header field in a 405 response containing a list of the target resource's currently supported methods. ...
... 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. the server must generate an allow header field in a 405 response containing a list of the target resource's currently supported methods. ...
406 Not Acceptable - HTTP
Web › HTTP › Status › 406
accept-encoding accept-language in practice, this error is very rarely used. instead of responding using this error code, which would be cryptic for the end user and difficult to fix, servers ignore the relevant header and serve an actual page to the user. ...
...c for the end user and difficult to fix, servers ignore the relevant header and serve an actual page to the user. it is assumed that even if the user won't be completely happy, they will prefer this to an error code. ...
407 Proxy Authentication Required - HTTP
Web › HTTP › Status › 407
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. this status is sent with a proxy-authenticate header that contains information on how to authorize correctly. ...
... 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. this status is sent with a proxy-authenticate header that contains information on how to authorize correctly. ...
408 Request Timeout - HTTP
Web › HTTP › Status › 408
the hypertext transfer protocol (http) 408 request timeout response status code means that the server would like to shut down this unused connection. it is sent on an idle connection by some servers, even without any previous request by the client. a server should send the "close" connection header field in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. this response is used much more since some browsers, like chrome, firefox 27+, and ie9, use http pre-connection mechanisms to speed up surfing. note: some servers merely shut down the connection without sending this message. ...
...rver should send the "close" connection header field in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. ...
409 Conflict - HTTP
Web › HTTP › Status › 409
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. for example, you may get a 409 response when uploading a file which is older than the one already on the server resulting in a version control conflict. ...
... 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. for example, you may get a 409 response when uploading a file which is older than the one already on the server resulting in a version control conflict. ...
410 Gone - HTTP
Web › HTTP › Status › 410
the hypertext transfer protocol (http) 410 gone client error response code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. ...
... the hypertext transfer protocol (http) 410 gone client error response code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. ...
413 Payload Too Large - HTTP
Web › HTTP › Status › 413
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. ...
... 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. ...
414 URI Too Long - HTTP
Web › HTTP › Status › 414
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. ...
...interpret. ...
422 Unprocessable Entity - HTTP
Web › HTTP › Status › 422
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. ...
... 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. ...
425 Too Early - HTTP
Web › HTTP › Status › 425
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. ...
... 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. ...
451 Unavailable For Legal Reasons - HTTP
Web › HTTP › Status › 451
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. status 451 unavailable for legal reasons example this example response is taken from the ietf rfc (see below) and contains a reference to monty python's life of brian. note: the link header might also contain a rel="blocked-by" relation identifying the entity and implementing blockage, not any other entity mandating it. any attempt to identify the entity ultimately responsible for the resource being unavailable belongs in the response body, not in the rel="blocked-by" link. this includes the name of the person or organization that made a legal...
...</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 obstacles ...
500 Internal Server Error - HTTP
Web › HTTP › Status › 500
ertext 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. this error response is a generic "catch-all" response. ...
...rver encountered an unexpected condition that prevented it from fulfilling the request. this error response is a generic "catch-all" response. usually, this indicates the server cannot find a better 5xx error code to response. ...
501 Not Implemented - HTTP
Web › HTTP › Status › 501
501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource. the only methods that servers are required to support (and therefore that must not return 501) are get and head. ...
...rt (and therefore that must not return 501) are get and head. if the server does recognize the method, but intentionally does not support it, the appropriate response is 405 method not allowed. ...
503 Service Unavailable - HTTP
Web › HTTP › Status › 503
r maintenance or that is overloaded. this response should be used for temporary conditions and the retry-after http header should, if possible, contain the estimated time for the recovery of the service. ...
...nditions and the retry-after http header should, if possible, contain the estimated time for the recovery of the service. note: together with this response, a user-friendly page explaining the problem should be sent. ...
505 HTTP Version Not Supported - HTTP
Web › HTTP › Status › 505
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. ...
... 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. ...
506 Variant Also Negotiates - HTTP
Web › HTTP › Status › 506
the hypertext transfer protocol (http) 506 variant also negotiates response status code may be given in the context of transparent content negotiation (see rfc 2295). this protocol enables a client to retrieve the best variant of a given resource, where the server supports multiple variants. the variant also negotiates status code indicates an internal server configuration error in which the chosen variant is itself configured to engage in content negotiation, so is not a proper negotiation endpoint. ...
...context of transparent content negotiation (see rfc 2295). this protocol enables a client to retrieve the best variant of a given resource, where the server supports multiple variants. the variant also negotiates status code indicates an internal server configuration error in which the chosen variant is itself configured to engage in content negotiation, so is not a proper negotiation endpoint. ...
507 Insufficient Storage - HTTP
Web › HTTP › Status › 507
the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request. ...
... the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918). 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
Web › HTTP › Status › 508
the hypertext transfer protocol (http) 508 loop detected response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol. it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity". this status indicates that the entire operation failed. ...
... the hypertext transfer protocol (http) 508 loop detected response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol. it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity". this status indicates that the entire operation failed. ...
510 Not Extended - HTTP
Web › HTTP › Status › 510
the hypertext transfer protocol (http) 510 not extended response status code is sent in the context of the http extension framework, defined in rfc 2774. in that specification a client may send a request that contains an extension declaration, that describes the extension to be used. if the server receives such a request, but any described extensions are not supported for the request, then the server responds with the 510 status code. ...
...0 not extended response status code is sent in the context of the http extension framework, defined in rfc 2774. in that specification a client may send a request that contains an extension declaration, that describes the extension to be used. if the server receives such a request, but any described extensions are not supported for the request, then the server responds with the 510 status code. ...
Promise.allSettled() - JavaScript
either by successfully being fulfilled or by being rejected. at that time, the returned promise's handler is passed as input an array containing the outcome of each promise in the original set of promises. however, if and only if an empty iterable is passed as an argument, promise.allsettled() returns a promise object that has already been resolved as an empty array. for each outcome object, a status string is present. if the status is fulfilled, then a value is present. if the status is rejected, then a reason is present. the value (or reason) reflects what value each promise was fulfilled (or rejected) with. examples using promise.allsettled promise.allsettled([ promise.resolve(33), new promise(resolve => settimeout(() => resolve(66), 0)), 99, promise.reject(new error('an error')...
...value is present. if the status is rejected, then a reason is present. the value (or reason) reflects what value each promise was fulfilled (or rejected) with. examples using promise.allsettled promise.allsettled([ promise.resolve(33), new promise(resolve => settimeout(() => resolve(66), 0)), 99, promise.reject(new error('an error')) ]) .then(values => console.log(values)); // [ // {status: "fulfilled", value: 33}, // {status: "fulfilled", value: 66}, // {status: "fulfilled", value: 99}, // {status: "rejected", reason: error: an error} // ] specifications specification ecmascript (ecma-262)the definition of 'promise.allsettled' in that specification. ...
Promise.any() - JavaScript
romise in promise.any was resolved" displaying the first image loaded in this example, we have a function that fetches an image and returns a blob. we use promise.any() to fetch a couple of images and display the first one available (i.e. whose promise has resolved). ...
...ny was resolved" displaying the first image loaded in this example, we have a function that fetches an image and returns a blob. we use promise.any() to fetch a couple of images and display the first one available (i.e. whose promise has resolved). ...
display - Web app manifests
ailable display area is used and no user agent chrome is shown. standalone standalone the application will look and feel like a standalone application. this can include the application having a different window, its own icon in the application launcher, etc. in this mode, the user agent will exclude ui elements for controlling navigation, but can include other ui elements such as a status bar. minimal-ui minimal-ui the application will look and feel like a standalone application, but will have a minimal set of ui elements for controlling navigation. the elements will vary by browser. browser browser the application opens in a conventional browser tab or new window, depending on the browser and platform. this is the default. (none) example "...
...ok and feel like a standalone application, but will have a minimal set of ui elements for controlling navigation. the elements will vary by browser. browser browser the application opens in a conventional browser tab or new window, depending on the browser and platform. this is the default. (none) example "display": "standalone" specification specification status comment feedback web app manifestthe definition of 'display' in that specification. working draft initial definition. web app manifest working group drafts ...
<maction> - MathML
the mathml <maction> element provides a possibility to bind actions to (sub-) expressions. the action itself is specified by the actiontype attribute, which accepts several values. to specify which child elements are addressed by the action, you can make use of the selection attribute. attributes actiontype the action which specifies what happens for this element. possible values are: statusline: if there is a click on the expression or the reader moves the pointer over it, the message is sent to the browser's status line. the syntax is: <maction actiontype="statusline"> expression message </maction>. toggle: when there is a click on the subexpression, the rendering alternates the display of selected subexpressions. therefore each click increments the selection value. the syntax ...
... recommendation current specification mathml 2.0the definition of 'maction' in that specification. recommendation initial specification ...
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
s an app needs to handle: getting the vapid public key, registering, and then sending notifications. you can see the variables from the index.js file being used: payload, delay and ttl. ...
...+ 'register', function(req, res) { res.sendstatus(201); }); app.post(route + 'sendnotification', function(req, res) { const subscription = req.body.subscription; const payload = req.body.payload; const options = { ttl: req.body.ttl }; settimeout(function() { webpush.sendnotification(subscription, payload, options) .then(function() { res.sendstatus(201); }) .catch(function(error) { console.log(error); res.sendstatus(500); }); }, req.body.delay * 1000); }); }; service-worker.js the last file we will look at is the service worker: self.addeventlistener('push', function(event) { const payload = event.data ? event.data.text() : 'no payload'; event.waituntil( self.registration.shownotifi...
Certificate Transparency - Web security
he specification states that compliant servers must provide a number of these scts to tls clients when they connect. this can be accomplished via a number of different mechanisms: x.509v3 certificate extension which embeds signed certificate timestamps directly into the leaf certificate a tls extension of type signed_certificate_timestamp sent during the handshake ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist with one or more scts with the x.509 certificate extension, the included scts are decided by the issuing ca. there should be no need for web servers to be modified if this mechanism is used. with the latter methods, servers will need to be updated to send the required data. the advantage is that the server operator can custo...
...fari and other servers to trust server certificates. ...
HTML Imports - Web Components
obsolete since google chrome 73 this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. firefox will not ship html imports in its current form. see this status update for more information. until there is a consensus on the standard or alternative mechanisms are worked out, you can use a polyfill such as google's webcomponents.js. ...
...e mechanisms are worked out, you can use a polyfill such as google's webcomponents.js. html imports is intended to be the packaging mechanism for web components, but you can also use html imports by itself. you import an html file by using a <link> tag in an html document like this: <link rel="import" href="myfile.html"> the import link type is new. specification specification status comment html imports working draft initial definition. ...
Window: userproximity event - Archive of obsolete content
working draft ...
private-browsing - Archive of obsolete content
the user enters private browsing by opening a new private browser window. when they do this, any existing non-private windows are kept open, so the user will typically have both private and non-private windows open at the same time. ...
core/promise - Archive of obsolete content
abc = group(aasync, basync, casync).then(function(items) { return items[0] + items[1] + items[2]; }); all the all function is provided to consume an array of promises and return a promise that will be accepted upon the acceptance of all the promises in the initial array. this can be used to perform an action that requires values from several promises, like getting user information and server status, for example: const { all } = require('sdk/core/promise'); all([getuser, getserverstatus]).then(function (result) { return result[0] + result[1] }); if one of the promises in the array is rejected, the rejection handler handles the first failed promise and remaining promises remain unfulfilled. const { all } = require('sdk/core/promise'); all([aasync, failasync, basync]).then(function (resul...
Creating annotations - Archive of obsolete content
ned to onattach. the handler is passed a worker object. each worker represents a channel of communication between the add-on code and any content scripts running in that particular page context. for a more detailed discussion of the way page-mod uses workers, see the page-mod documentation. in the attach handler we do three things: send the content script a message with the current activation status add the worker to an array called selectors so we can send it messages later on assign a message handler for messages from this worker. if the message is show we will just log the content for the time being. if the message is detach we remove the worker from the selectors array. at the top of the file import the page-mod module and declare an array for the workers: var pagemod = require('sdk...
Extension Etiquette - Archive of obsolete content
dd-on manager). if possible, create a menu item in the menu where it is most applicable; for instance, a bookmark sharing extension should be called from the bookmarks menu. to maintain the default theme, avoid the use of an icon next to the menu items. other ui elements in general, toolbar items are very useful to end users because they can be removed or added to various toolbars as necessary. status bar items should only be added for extensions that need constant monitoring, such as ad blocking, page ranking, or cookie management. likewise, use context menu items sparingly — only for tasks that are done frequently or on specific elements of a web page. focus don't steal focus. it's not your extension's job to take focus from the web content. if the user loads a website and they ask for f...
Install Manifests - Archive of obsolete content
rdf dynamically, such as using php or cgi: %req_version% the version of the request. currently 1 %item_id% the id of the add-on being updated %item_version% the version of the add-on being updated %item_maxappversion% the maxversion of the targetapplication object corresponding to the current application for the add-on being updated. %item_status% comma separated list of the add-ons operating status in the application. contains at the least either userenabled or userdisabled plus any number of incompatible, blocklisted or softblocked. %app_id% the id of the current application %app_version% the version of the application to check for updates for %current_app_version% the version of the current applic...
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
ting 2: css code sample body { color: black; background-color: white; } p { margin-bottom: 1em; text-indent: 1em; } javascript: the world's most misunderstood language javascript is a scripting language first developed in the 1990s, at which time it was created as a way to add dynamic features to web pages. because it was often used at first to display pop-up windows, marching text in status bars, or in other ways that made web pages less useful to users, the language acquired a reputation as having little practical use and lacking in functionality. also, because a series of security holes were discovered in javascript and the compatible technology jscript, there was an initial reluctance to use javascript at all. nevertheless, the rise of web services like google maps, which used ...
Adding Events and Commands - Archive of obsolete content
ode here... --> <menuitem id="xulschoolhello-hello-menu-item" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.helloitem.accesskey;" command="xulschoolhello-hello-command" /> commands allow you to keep your javascript calls in a single place, avoiding code repetition and possible bugs. your ui can easily scale this way. you can create an extension that adds toolbar buttons, statusbar buttons and menu items, all with equivalent behavior, and without having to repeat lots of xul code in the process. commands and broadcasters also facilitate working with complex form windows and dialogs. you should always keep them in mind when adding the event-driven code for your extension. « previousnext » this tutorial was kindly donated to mozilla by appcoast. ...
Adding menus and submenus - Archive of obsolete content
. menu types checkbox menu items you can make a menuitem "checkable" to allow the user to enable/disable options using the menu. we use two attributes for this: type and checked. the type attribute must be set to "checkbox". you can set the checked attribute to "true" to check it by default. the item's checked state changes when the user clicks on it. an example of one such item is the view > status bar item in the main firefox menu. radio menu items if you need to have a set of menuitem elements where only one of them has to be checked at any given moment, you should set the type to "radio". the name attribute is used to identify the items that belong to the radio group. <menupopup oncommand="xulschoolchrome.hw.greetingdialog.greeting(event);"> <menuitem type="radio" name="xulschoolhel...
Connecting to Remote Content - Archive of obsolete content
ok into the xml and json communication mechanisms. 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. we create this instance using xpcom instead of the usual way (new xmlhttprequest()) because this way works...
Intercepting Page Loads - Archive of obsolete content
all listeners, as not doing it has the potential of causing memory leaks. there are a couple of things left to do: implementing the progress listener methods, and figuring out what notify_all is about. for that, we recommend that you first read the documentation on nsiwebprogresslistener and the nsiwebprogress.constants (webprogress notify constants). in a nutshell, there are a lot of state and status changes going on when a page loads, and the notify constants allow you to filter out the events you don't need to listen to. picking the right filter not only simplifies your code, but also reduces the performance impact your extension will have in regular navigation. here are a couple of common use cases and the ways to implement them with web progress listeners: if you want simple detection...
The Box Model - Archive of obsolete content
ok into the box model, css style rules and computed style views. look into the computed width and height values, and how the paddings and margins affect the dimensions of xul nodes. modify the hello world extension so that it changes the appearance of firefox drastically using only css. play with changing the dimensions and appearance of buttons, changing the background color of the toolbars and status bars, font styles, sizes, etc. note that this is not really what you would expect from an extension, it's more like a theme. however, it's very interesting and useful to see how you can manipulate the appearance of firefox so easily. if you're not familiar with css, you should read this css getting started guide and other online resources before continuing with this tutorial. « previousnext...
chargingchange - Archive of obsolete content
ation battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be read from the batterymanager object received from the navigator.getbattery method. property type description batterymanager.charging boolean the system's battery charging status. returns true if the battery is charging, if the state of the system's battery is not determinable, or if no battery is attached to the system. returns false if the battery is discharging. read only. example navigator.getbattery().then(function(battery) { console.log("battery charging? " + (battery.charging ? "yes" : "no")); battery.addeventlistener('chargingchange', function() { ...
List of Former Mozilla-Based Applications - Archive of obsolete content
old article available about how borland embedded mozilla in kylix 2 mango im client ...
List of Mozilla-Based Applications - Archive of obsolete content
xul daim image tool xul explorer development tool xulrunner application xuljet javascript framework uses xulrunner xulmine game standalone version yahoo! ...
Localizing an extension - Archive of obsolete content
mples on extension writing by adding localization support to our stock watcher extension. performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript files themselves. if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension download the sample you can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension. download the sample localizing strings in xul files create the needed locale files each xul file that comprises the user interface for your ex...
Finding the file to modify - Archive of obsolete content
anguage specifically designed for describing application interfaces. it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers). each window and dialog box in mozilla is defined by a single xul file (in some cases other xul files called overlays contribute portions of another window's structure). to add a tinderbox status icon to mozilla, we need to find the xul file that defines the structure of the browser window. the best way to find a xul file for a window is to use the dom inspector. the dom inspector is a tool bundled with mozilla that allows you to examine the dom of web pages and xul windows. to access it, go to the "tools" menu, select the "web development" submenu, then select the "dom inspector" item. ...
Tinderbox - Archive of obsolete content
it consists of a set of client machines that continuously build and test mozilla and report their results back to a server that makes those results available via a web page. the tool enables mozilla.org to be immediately notified of changes to the code that prevent mozilla from compiling and running (or compromise performance and footprint) so they can get someone to fix the problem or reverse the changes. mozilla engineers regularly check tinderbox before changing the code because changes are prohibited while the codebase is broken. ...
Dehydra Frequently Asked Questions - Archive of obsolete content
ons where did the name dehydra come from? initially dehydra was written as an easy way to look for patterns in control flow graphs (cfgs). images of those graphs reminded me of the multiheaded hydra monster. thus de-hydra can be thought of as a decapitating tool for slaying cfgs. currently dehydra does not provide the cfg functionality, this functionality is now provided by treehydra. what is the status of gcc 4.5 support? development version of dehydra should work with gcc 4.5 on any c++ codebase. if you encounter bugs or crashes, report them. where does one report dehydra bugs? use this link to file bugs. for crashes reports attach a minimized input file. use either a source files that rely on standard headers or a compressed .ii file (pass -save-temps to gcc to get .ii files). where can i fin...
Download Manager preferences - Archive of obsolete content
fault value is true. browser.download.manager.showwhenstarting a boolean value that indicates whether or not to show the downloads window when a download begins. the default value is true. browser.download.manager.usewindow note: in gecko 1.9.1 in bug 439495 a boolean value indicating whether or not to use the downloads window (true) or display download status in the status bar (false) in the browser window. default value is true. browser.download.usedownloaddir a boolean value that indicates whether or not the user's preference is to automatically save files into the download directory. if this value is false, the user is asked what to do. in thunderbird and seamonkey the default is false. in other applications the default is t...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
ndow context. nsdocumentopeninfo::prepare is passed the channel to open. it calls getinterface on the window context to get and save that context's nsiuricontentlistener. openchannel returns to openuri which just opens the channel, setting the nsdocumentopeninfo as the stream listener. 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. 204 or 205 responses). then it calls nsdocumentopeninfo::dispatchcontent nsdocumentopeninfo::dispatchcontent starts doing the real dirty work. first it checks whether the channel has "content-disposition: attachment" set. if so, it skips trying to find an internal viewer and goes right over to looking for a...
JavaScript Client API - Archive of obsolete content
(don't forget that you'll need to import weave. so the top of your file should include:) const cu = components.utils; // etc... cu.import("resource://services-sync/main.js"); installing your classes into sync you can register your engine in an "weave:service:ready" observer using the weave.engines.register(fooengine) function. however, "weave:service:ready" is...
Firefox Sync - Archive of obsolete content
an http api for client-server interaction storage formats used by the the clients cryptographic model for encrypting client data the definitive source for these specifications is http://docs.services.mozilla.com/. running a server it is possible to run your own sync server instance. full instructions are available at http://docs.services.mozilla.com/howtos/run-sync.html. getting involved and status for information on the current development status of sync including how to get involved, see https://wiki.mozilla.org/services/sync. related info javascript client api (useful for interacting with sync from mozilla applications, including developing extensions against sync) syncing custom preferences (useful for extension developers) code snippets (demonstrates common actions with the javascr...
slideBar - Archive of obsolete content
they allow quick access to a wide range of both temporary and permanent information at the side of your browser window. when a slidebar feature is selected, its contents will be revealed from behind the current web page. ...
UI - Archive of obsolete content
browser slidebar ui mechanism for displaying jetpack content in a slide-out animated vertical column toolbar including entries and access elements into the toolbar panel a movable, expandable, and custom styled content element to display jetpack content tabs adding events and interacting with browser tabs and their contained documents statusbar low-level functions and basic calls notifications a system for alerting users via provided ui mechanisms selection interacting with user-selected content window mitigates and eases interactions between different browser windows ...
jspage - Archive of obsolete content
e",issuccess:null,emulation:true,urlencoded:true,encoding:"utf-8",evalscripts:false,evalresponse:false,nocache:false},initialize:function(a){this.xhr=new browser.request(); this.setoptions(a);this.options.issuccess=this.options.issuccess||this.issuccess;this.headers=new hash(this.options.headers);},onstatechange:function(){if(this.xhr.readystate!=4||!this.running){return; }this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.issuccess.call(this,this.status)){this.response={text:this.xhr.responsetext,xml:this.xhr.responsexml}; this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}},issuccess:function(){return((this.status>=200)&&(this.status<300)); },proce...
Bundles - Archive of obsolete content
webapp" title="prism demo"> when the extension finds such a <link> tag, it will notify the user. the user can then decide to install the webapp. how-to here is a simple way to build a basic web application bundle: create file called webapp.ini that contains something like: [parameters] id=unique-app-id@unique-author-id.whatever name=webapp name uri=http://[the-url-what-you-want-to-connect-to]/ status=yes location=no sidebar=no navigation=no zip the file to [whatever].webapp double-click the webapp bundle or use prism -webapp [path-to-webapp] structure a bundle can contain the following files. any other files in the .webapp file will be ignored. after the .webapp file is executed the first time, these files will be unzipped and "cached" to a local directory structure. / webapp.ini webapp.
Extensions - Archive of obsolete content
ation> <!– prism –> <description> <em:id>prism@developer.mozilla.org</em:id> <em:minversion>0.8</em:minversion> <em:maxversion>1.0.0.*</em:maxversion> </description> </em:targetapplication> in addition to the install manifest changes, you may want to expose your extension into the prism ui. prism does have a few ui elements, such as a toolbox, toolbar, menubar, popup menus, statusbar and a container for the browser. you can use these ui elements to merge in your extension ui. see the prism main window xul file for the actual structure: webrunner.xulporting an existing extension since there aren't many extensions designed explicitly for prism, you may need to port your favorite extensions. this usually means extracting and editing the install.rdf file to add prism as a targ...
HostWindow - Archive of obsolete content
played, the splitter can be used to change the width or quickly collapse it. the splitter itself cannot be hidden as it is the only ui to show a collapsed sidebar. when not displayed the entire sidebar area, including the splitter are hidden. note: the sidebar is currently not supported. we are considering whether to support a sidebar in future versions of prism and welcome input on this subject. status - area of the statusbar that displays the loading status message and a "percent complete" progress bar, as well as the "gear" menu that provides access to prism commands such as displaying the error console. to display the status bar, the statusbar option in webapp.ini must be set to true. command menu - a popup menu showing several prism-specific commands. ...
Proxy UI - Archive of obsolete content
socks version is selected by radio buttons: ( ) socks v4 ( ) socks v5 "no proxy for:" discussed in detail elsewhere... but should be noted that if you cut and paste from ie, the semi-colons are automatically converted to commas when you save changes (ff, tb, sm). automatic proxy configuration url supports a url (which is checked via urifixup) and a reload button. offline|online "plug" location status bar on the right side. right-click a menu is displayed that has the following items: online (proxy: none) online (proxy: auto discover) online (proxy: auto url) online (proxy: manual) --- proxy configuration... <h7 name="details">details</h7> the menu should display the current proxy mode with a dot. the modes that can have an empty configuration (auto url and manual) will be disabled if the pref...
Frequently Asked Questions - Archive of obsolete content
why does mozilla show source code/gibberish instead of svg? there are two possible reasons for this: a simple mistake in the svg file, or a misconfigured server. if there's a grey area at the top of the source with the text "this xml file does not appear to have any style information associated with it" then the problem is with the svg file. to be valid the root <svg> tag in svg files must have at least the following two "namespace bindings". ...
File object - Archive of obsolete content
iving a script access to the file object is exactly equivalent to giving the script access to the unix shell or dos command interpreter. filesystem access is implemented with nspr i/o functions, and as such shares many semantics. pipelines are implemented with the popen() system call. there is currently no support for p2open()-like semantics. here is the original proposal for this object, and a status update from december 1998: http://www.mozilla.org/js/js-file-object.html created by the file constructor: new file(); new file(filename); parameters filename name of the file we want to work with. directories and pipelines are considered special files. pipelines either begin or end with the pipe (|) symbol. description filenames are specified as strings that have an implementation defi...
Tamarin Roadmap - Archive of obsolete content
the tamarin roadmap is intended to provide visibility into planned features and release dates. the roadmap is a living document representing current best thinking and is subject to change. comments or questions are welcome and encouraged via the tamarin-devel mailing list. ...
XML in Mozilla - Archive of obsolete content
parser/htmlparser/. the newsgroup to discuss xml in mozilla depends a bit on the nature of the question. for example, dom related questions should probably be discussed in the mozilla.dev.tech.dom newsgroup, while style issues should be discussed on mozilla.dev.tech.css and so on. the catch-all newsgroup for xml discussion is mozilla.dev.tech.xml. ...
XPJS Components Proposal - Archive of obsolete content
draft 1.0 what are xpjs components? xpjs components is a (cheesy) name for a system to support xpcom components written in javascript. now, you might ask: "isn't that what xpconnect does?" and i would answer that xpconnect is necessary, but not sufficient to the task. ...
oncommandupdate - Archive of obsolete content
...
Attribute (XUL) - Archive of obsolete content
imary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname tooltip tooltiptext tooltiptextnew top type uri useraction validate value var visuallyselected wait-cursor width windowtype wrap wraparound ...
commandupdate - Archive of obsolete content
general info specification xul interface event bubbles no cancelable no target element default action none. properties property type description target read only eventtarget the event target (the topmost target in the dom tree). type read only domstring the type of event. ...
findbar - Archive of obsolete content
key for the "match case" checkbox in the findbar. properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width browser type: browser element lets you set and get the browser in which the findbar is located. findmode type: integer read only. the find mode in use. possible values are: find_normal (0): normal find find_typeahead (1): typeahead find find_links (2): link find methods inherited methods addeventlistener(), appendchild(), blur,...
Methods - Archive of obsolete content
lementsbyattributens getformattedstring gethtmleditor getindexoffirstvisiblerow getindexofitem getitematindex getnextitem getnotificationbox getnotificationwithvalue getnumberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openp...
accessibleType - Archive of obsolete content
xullistitem 100c xulmenubar 100d xulmenuitem 100e xulmenupopup 100f xulmenuseparator 1010 xulpane 1011 xulprogressmeter 1012 xulscale 1013 xulstatusbar 1014 xulradiobutton 1015 xulradiogroup 1016 xultab 1017 xultabbox 1018 xultabs 1019 xultext 101a xultextbox 101b xulthumb 101c ...
Property - Archive of obsolete content
hbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selectedcount selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype sessioncount sessionhistory showcommentcolumn showpopup size smoothscroll spinbuttons src state statusbar statustext stringbundle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling tabpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top treeboxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound ...
Providing Command-Line Options - Archive of obsolete content
onst chrome_uri = "chrome://myapp/content/"; /** * utility functions */ /** * opens a chrome window. * @param achromeurispec a string specifying the uri of the window to open. ...
Style classes - Archive of obsolete content
Archive › Mozilla › XUL › Style
« xul reference home alert-icon chromeclass-toolbar error-icon groove header indent listcell-iconic listitem-iconic menuitem-iconic menuitem-non-iconic message-icon monospace plain question-icon small-margin statusbarpanel-iconic statusbarpanel-iconic-text statusbarpanel-menu-iconic text-link thin tree-splitter treecol-image ...
Content Panels - Archive of obsolete content
browser tries to get the topmost window, it will get the outer xul window. this would be suitable for a child xul panel that is part of your application, but this isn't what you want for a browser that loads a web page. instead, you would want to restrict the web page to only getting access to the web page content. you might note that a mozilla browser window has xul content for the toolbars and statusbar and so forth with a tabbrowser forming the main area. this inner area displays a web page, but the web page cannot access the xul around it. this is because it uses the second type of browser, specified by setting the type attribute to the value content. this prevents the content from traversing up to the xul window. an example: <browser src="http://www.mozilla.org" type="content" flex="1" /> ...
Focus and Selection - Archive of obsolete content
" tabindex="3"/> the focus event the focus event is used to respond when the focus is given to an element. the blur event is used to respond when the focus is removed from an element. you can respond to focus changes by adding an onfocus or onblur attribute on an element. they work just like their html counterparts. you might use these event handlers to highlight the element or display text on a status bar. the following example can be used to apply a function to handle a focus event. example 2 : source view <script> function displayfocus(){ var elem=document.getelementbyid('sbar'); elem.setattribute('value','enter your phone number.'); } </script> <textbox id="tbox1"/> <textbox id="tbox2" onfocus="displayfocus();"/> <description id="sbar" value=""/> the focus event, when it occurs, wil...
More Event Handlers - Archive of obsolete content
a mouse button is pressed, even if it hasn't been released yet. mouseup called when a mouse button is released on an element. mouseover called when the mouse pointer is moved onto an element. you could use this to highlight the element, however css provides a way to do this automatically so you shouldn't do it with an event. you might, however, want to display some help text on a status bar. mousemove called when the mouse pointer is moved while over an element. the event may be called many times as the user moves the mouse so you should avoid performing lengthy tasks from this handler. mouseout called when the mouse pointer is moved off of an element. you might then unhighlight the element or remove status text. there are also a set of drag related events, whic...
Open and Save Dialogs - Archive of obsolete content
icolon-seperated list of file masks. you can add more masks or fewer masks as needed. you can call appendfilter as many times as necessary to add additional filters. the order you add them determines their priority. typically, the first one added is selected by default. getting the selected file finally, you can show the dialog by calling the show() function. it takes no arguments but returns a status code that indicates what the user selected. note that the function does not return until the user has selected a file. the function returns one of three constants: returnok - the user selected a file and pressed ok. the file the user selected will be stored in the file picker's file property. returncancel - the user pressed cancel. returnreplace - in the save mode, this return value identifi...
Skinning XUL Files by Hand - Archive of obsolete content
. finally, mozilla provides some special extensions to the cascading style sheets specification that allow even more control over the way that xul is skinned within the browser. on to the actual global.css file: after some comments, the css file contains basic style information for the <window> and <dialog> elements. after these, the global skin defines styles for some of the xul widgets: statusbar, statusbarpanel and so on. most widgets have their styles defined in separate css files in the same directory that the global.css file. note that much of the style attributes in these rules have to do with borders, font information, color, margin, native appearance. in general, these are the types of styles that should be defined only in the global skin of an application, since these are the ...
Stacks and Decks - Archive of obsolete content
of elements may be stacked up in a stack. the orient property has little meaning on a stack as children are laid out above each other rather than from side to side. the size of the stack is determined by its largest child, but you can use the css properties width, height, min-width and other related properties on both the stack and its children. the stack element might be used for cases where a status indicator needs to be added over an existing element. for example, a progress bar might be created using a bar and a label overlaid on top of it. shadowing with stacks one convenient use of the stack element however is that you could emulate a number of css properties with it. for example, you could create an effect similar to the text-shadow property with the following: example 1 : source vie...
Updating Commands - Archive of obsolete content
command="godocommand('cmd_paste');"/> <button label="paste" command="cmd_paste"/> the example above will implement a paste button. it is attached to the command which will invoke the command on the necessary controller when called. the code above is all you need to implement the functionality of the paste command in your application. the only other thing you need to do is ensure that the enabled status of the paste command, and therefore the button, is updated at the right time, which is described below. command updaters a command updater is a feature of the commandset element which allows it to update commands when certain events happen. you will need to think about when a command is valid and when it is not. in addition, you will need to consider when the state could change and when the comma...
Using Remote XUL - Archive of obsolete content
=guided" /> <menuitem label="bugzilla" value="https://www.mozilla.org/bugs/" /> <menuitem label="bug writing" value="https://www.mozilla.org/quality/bug-writing-guidelines.html" /> </menupopup> </menu> <menu label="tools"> <menupopup> <menuitem label="view source" value="https://lxr.mozilla.org/seamonkey/" /> <menuitem label="tree status" value="https://tinderbox.mozilla.org/showbuilds.cgi?tree=seamonkey" /> <menuitem label="new checkins" value="https://bonsai.mozilla.org/cvsquery.cgi?treeid=default&amp;..." /> <menuitem label="submit a bug" value="https://bugzilla.mozilla.org/" /> </menupopup> </menu> <button label="faq" value="https://www.mozilla.org/faq.html" /> <bu...
XUL element attributes - Archive of obsolete content
o be sorted. the key should be the full uri of the rdf resource to sort by, for example 'http://home.netscape.com/nc-rdf#name'. place this attribute on the same element as the datasources attribute. use sortresource2 to specify a secondary sort key. sortresource2 type: uri the value of this attribute is the uri of an rdf predicate that serves as a secondary key for sorted content. statustext type: string used to set the text that appears on the status bar when the user moves the mouse over the element. mozilla doesn't adjust the status bar automatically however. this attribute serves only as a place to keep the text. in firefox, this text is automatically placed in the statusbar for menuitems on the menu bar. style type: css inline style css style rules to be applied...
XUL controls - Archive of obsolete content
toolbarbutton label="reload"/> more information about the toolbarbutton element. toolbarbutton reference related elements: toolbar <toolbarbutton type="menu"> a button that is displayed on a toolbar with a drop down menu attached to it. <toolbarbutton type="menu" label="show"> <menupopup> <menuitem label="toolbars"/> <menuitem label="status bar"/> </menupopup> </toolbarbutton> more information about this type of menu toolbarbutton element. toolbarbutton reference related elements: menupopup menuitem toolbar <toolbarbutton type="menu-button"> a button on a toolbar that that has a separate arrow button with a menu attached to it. unlike with the 'menu' type, a separate action may be p...
command - Archive of obsolete content
eceive them. see bug 1173061 for details. ...
content - Archive of obsolete content
if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag. for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren...
dialogheader - Archive of obsolete content
text to appear in the title bar of the window. ...
elements - Archive of obsolete content
listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcorner separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treesep...
iframe - Archive of obsolete content
contentdocument type: document this read-only property contains the document object in the element. contentwindow type: todo use the contentwindow.wrappedjsobjec...
image - Archive of obsolete content
Archive › Mozilla › XUL › image
src type: url gets and sets the value of the src attribute. ...
key - Archive of obsolete content
Archive › Mozilla › XUL › key
nt or left out entirely for the bubbling phase. ...
listcell - Archive of obsolete content
an gets and sets the value of the disabled attribute. ...
menuitem - Archive of obsolete content
d and set using the textbox.value and menulist.value syntax. ...
notificationbox - Archive of obsolete content
this property is read-only. allnotifications type: nodelist nodelist of all notifications. this property is read-only. notificationshidden type: boolean indicating whethe...
param - Archive of obsolete content
Archive › Mozilla › XUL › param
string string literal, the default value properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
rule - Archive of obsolete content
Archive › Mozilla › XUL › rule
y match rdf nodes with a parse type of integer. ...
scrollbar - Archive of obsolete content
down keys are pressed. the default value is 10. ...
splitter - Archive of obsolete content
mmediately after the splitter is collapsed. ...
stringbundle - Archive of obsolete content
this is an object which implements nsilocale. src type: url gets and sets the value of the src attribute. stringbundle type: nsistringbundle r...
tabpanels - Archive of obsolete content
selectedindex type: integer returns the index of the currently selected item. you may select an item by assigning its index to this property. by assigning -1 to this property, all...
toolbox - Archive of obsolete content
customtoolbarcount firefox only type: integer the number of custom toolbars currently within the toolbox. externaltoolbars type: array of elements an array of external ...
treecell - Archive of obsolete content
affect the contents displayed to the user. ...
treecol - Archive of obsolete content
indicating the type of accessibility object for the element. ...
treeitem - Archive of obsolete content
source. elements outside will appear only once. ...
window - Archive of obsolete content
vigator:view-source - the view source windows properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(),...
wizard - Archive of obsolete content
tons along the bottom, and also handles navigation between the pages. each page should be constructed using a wizardpage. the pages are displayed in the order that they are placed in the wizard, unless you use the next and pageid attributes on the pages to change the sequence. the wizard will rendered in a manner suitable for the user's selected theme and platform. in newer versions of mozilla, a statusbar may be placed directly inside the wizard element which will be shared among all pages. more information is available in the xul tutorial. attributes firstpage, lastpage, pagestep, title, windowtype properties canadvance, canrewind, currentpage, onfirstpage, onlastpage, pagecount, pageindex, pagestep, title, wizardpages methods advance, cancel, extra1, extra2, getbutton, getpageb...
wizardpage - Archive of obsolete content
that appears first in the wizard child list. ...
Debugging a XULRunner Application - Archive of obsolete content
a component to a xulrunner application, change the buildid in application.ini. function toopenwindowbytype is not defined if you get an error that "function toopenwindowbytype is not defined" you may add the following function to your scripts (doesn't seem to be in the venkman overlay): function toopenwindowbytype(intype, uri) { var winopts = "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar"; window.open(uri, "_blank", winopts); } i can't see my pages, functions ... if your pages are not in the loaded script window, uncheck the menu item "debug\exclude browser files" and find them in open windows tab when opening a js file in venkman, the code is unformatted and i get the following error in the jsconsole... security error: content at x-jsd:source?location=chrome%3a%2f...
XULRunner Hall of Fame - Archive of obsolete content
sion for firefox, thunderbird, seamonkey, songbird, komodo etc. sqlite manager is also available as a xulrunner application. surebo browselorer a new, simple yet highly functional and customizable web browser, based on xulrunner 22. websecurify web application security testing environment. source yoono desktop win/mac application to get all your friend updates, update your status and share stuff easily across facebook, myspace, twitter, and more - all at once! simplify your online social life. zotero reference manager with firefox, chrome, and safari integration. both firefox extension and xulrunner-based standalone application available. source applications based on xulrunner 1.9 or earlier buzzbird xul-based desktop twitter client. github bluegriff...
XUL Explorer - Archive of obsolete content
idator and the error console are both available to help debug problems. the help menu provides access to xul information on mdc. there is even simple “keyword” help lookup for xul elements. roadmap features: the preview pane can be toggled with the editor. previewing in a popup window is still available. option to automatically update the preview as the editor changes. indicator in the statusbar shows errors. double-click to display error console. option to specify the snippet used to load the editor on startup. option to include a user snippet file. the snippets are merged with the built-in snippets at startup. double-click or drag-and-drop to insert a snippet file > new allows user to pick any “template” snippet, as well as blank. simple xul checker can be used to ‘valida...
application/http-index-format specification - Archive of obsolete content
t be url encoded. content-length base 10 digits representing the size of the file in bytes. only digits are legal. last-modified rfc 1123 date format url encoded. content-type mime content type. whitespace and 8-bit characters must be url-encoded. the mime-type for a directory can be given as application/http-index-format. file-type one of the following keywords to represent a special status for a file: file directory symbolic-link sym-file (a symbolic link to a file) sym-directory (a symbolic link to a directory) permissions unix type file permission syntax. 3 slots either 'r', 'w', 'x', or '-' representing, in order, read, write, or execute permissions. a '-' indicates that the particular permission is not set. example "rw-" means read and write permission, but not execute...
calIFileType - Archive of obsolete content
summary the califiletype interface provides information about a specific file type. califiletype is used in caliimporter and caliexporter to determine which file types are supported for import/export. status: unfrozen. defined in calendar/base/public/caliimportexport.idl interface code [scriptable, uuid(efef8333-e995-4f45-bdf7-bfcabbd9793e)] interface califiletype : nsisupports { readonly attribute astring defaultextension; readonly attribute astring extensionfilter; readonly attribute astring description; }; attributes defaultextension the default extension that should be associated with files of this type. extensionfilter the extension filter to use in the filepicker's filter list. separate multiple extensions with semicolon and space. description the description to show to the ...
Mozilla release FAQ - Archive of obsolete content
nding portions, and see if that fixes things. if not, post to netscape.public.mozilla.builds problems of this sort are currently most likely to happen in nspr, as it still uses the classic build system. it's doubtful that this will happen in the main tree. /usr/include/stdlib.h:196: previous declaration of `seed48' see section 3.7 nothing looks much like an error, except something returned error status your compiler has a switch (probably) that prints everything it's doing (i.e. programs spawned), which might help you find out what arguments it's passing to ld, or whatever, and thus perhaps enlighten you as to the problem. on gcc, try gcc -v (rest of command line). how long will mozilla take to build? a long time, but this will depend quite a bit on your system. ram will probably be the bottlen...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
ng in the october 3rd nightly build of ff 2.0. places in firefox 3 discussion regarding places (a new system for storing bookmarks, histroy and other page info) in firefox 3. a wiki has been set up aswell as weekly meetings, and a face-to-face meeting will be scheduled at a later date. everyone and his goldfish thinks bug 300198 should be fixed an as-of-yet unreplied to complaint regarding the status of bug 300198 remaining wontfix. meetings none this week. authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 22 - september 29, 2006 announcements lightning and sunbird 0.3 rc1 test day! clint announced the lightning and sunbird 0.3 rc1 test day oct.3 to oct. 4. updated l10n status for sunbird 0.3 release according to simon paquet, we now have a full l10n comparison on the trunk between en-us and all locales with a calendar localization. details are available for calendar only and for calendar and core. discussions no discussions available this week. meetings sept. 27 status meeting cancelled most of the mozilla calendar participants were unavailable during sept. 27, the meeting was cancelled and rescheduled for a later date. sept 20 brief status meeting the meeting consisted entirely of the status and details of sunbird 0.3. th...
2006-10-06 - Archive of obsolete content
ng in the october 3rd nightly build of ff 2.0. places in firefox 3 discussion regarding places (a new system for storing bookmarks, histroy and other page info) in firefox 3. a wiki has been set up aswell as weekly meetings, and a face-to-face meeting will be scheduled at a later date. everyone and his goldfish thinks bug 300198 should be fixed an as-of-yet unreplied to complaint regarding the status of bug 300198 remaining wontfix. meetings none this week. authors sara minchella (sara) dave manley (senemanley) back to summary list ...
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-11-04 - Archive of obsolete content
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-12-01 - Archive of obsolete content
ng out how blur() works... question regarding how to access the functionality that arises when window.blur() is called. ff2 not responding to click on link concerns regarding ff 2.0 not responding to button or link clicks until the button or link is clicked a second time. dual screen browsing discussion regarding browsing across dual screens and simplifying the process. suggestion for status bar suggestion that a new status bar be implemented that would have a hover>appear style of operation similar to the mac "menu". meetings none this week. authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-03 - Archive of obsolete content
l popup duration should depends on number of messages and examples of this idea is provided. ...
2006-11-10 - Archive of obsolete content
s been filed as bug 360118. thunderbird doesn't seem to have an option to set the client domain name (elho/helo). this is already addressed in bug 244030. ...
2006-11-17 - Archive of obsolete content
ion is provided by jay lee should there be an additional options for account configuration that just delete the messages from the server whenever they are deleted in tb? some discussion is posted. however, david bienvenu stated that the options already exist in tb 2.0, just that it is a hidden. code review requested for smtp swticher no comment is made. meetings calendar project weekly status meeting - 2006/11/15 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/02 16:30 utc (meeting notes) ...
2006-11-10 - Archive of obsolete content
the following options: ./configure --enable-application=browser --prefix=$prefix --enable-extensions=default,spatialnavigation then he tried running "make" and received the following error: /usr/bin/ld: testtarray.o(.text+0x2237): unresolvable relocation against symbol `nstarray_base::semptyhdr' /usr/bin/ld: final link failed: nonrepresentable section on output collect2: ld returned 1 exit status gmake[3]: *** [testtarray] error 1 gmake[3]: leaving directory `/usr/mozilla2/src/mozilla/xpcom/tests' gmake[2]: *** [libs] error 2 gmake[2]: leaving directory `/usr/mozilla2/src/mozilla/xpcom' gmake[1]: *** [tier_2] error 2 gmake[1]: leaving directory `/usr/mozilla2/src/mozilla' make: *** [default] error 2 he is not sure what is wrong with his build, and is asking for help on how to resolve th...
Extentsions FAQ - Archive of obsolete content
return to mozilla-dev-extensions faq friday, september 22 - 29, 2006 (↑ top) how to write an xpcom component in c++ that can communicate to a com component? write an xpcom component in c++ - it will talk to the com component and will be accessible to js code via xpconnect. how to customizes toolbar button to coexist in a toolbar palette and status bar? option #3 install status buttons 1.0 <https://addons.mozilla.org/firefox/1272/> "lets you put toolbar buttons at either end of the status-bar. just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." option #4 install toolbar control <http://webdesigns.ms11.net/chromeditp.html> asking for help with getting an extension to process windows messages. use wm_copydat...
2006-10-06 - Archive of obsolete content
u need to update your localization if you want your locale to ship with lightning 0.3 or sunbird 0.3. mozillatranslator 5.13 rfes new version of mozillatranslator will be relaesed in a few weeks. calendar localization update rc1 for sunbird 0.3 is out now and ready for testing. l10n locked down - ff2 rc2 code freeze 9/29/2006 at 9am pdt the l10n repository is locked down. discussions status update fx2 status update for firefox 2. meetings none for this week. authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-10-20 - Archive of obsolete content
t mozilla.dev.builds. firefox rc 3 is there, staging servers, too firefox rc3 build is located here. community was encouraged to do testing. discussions how to file a legal approval for a dictionary? discussion about how to file a legal approval for a dictionary. there is no xpi file instructions on how to find xpi files. meetings sign off deadline is this thursday there was a status meeting on tuesday, october 17, 2006. sign off deadline was on thursday, october 19, 2006. meeting minutes is located here. authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-10-13 - Archive of obsolete content
s. sunbird and lighting 0.3 sunbird and lighting 0.3 were released on october 11 discussions release process discussion discussion from last week regarding speeding up and automation of the release process continued. firefox feature brainstorming you can help suggest features for firefox 3 here meetings project meeting a project meeting was held on oct. 9. (meeting notes) bon echo status meeting a bon echo status meeting was held on oct. 10 (meeting notes) gecko 1.9/gran paradiso status meeting a gecko 1.9/gran paradiso status meeting was held on oct. 11 (notes) ...
2006-10-20 - Archive of obsolete content
aiser gave some background on the boxes. decommissioning sparky on friday preed wants to get rid of sparky (a linux build box) and wants to know if there are reasons wy not to do it. feature brainstorming + firefox 3 dria posted a link to the firefox feature brainstorming list (open to everyone). discussion of what is the best format for the list and how to use it best. meetings bon echo status meeting bon echo status meeting: october 17th, 2006 **at noon pdt**. meeting notes gecko status meeting october 19 (*thursday*) gecko 1.9 status meeting. agenda project status meeting project meeting was held on oct 16 2006. meeting notes ...
2006-10-27 - Archive of obsolete content
announcements firefox 2.0 available firefox 2.0 is now available for download. visit http://www.getfirefox.com/ discussions firefox 3 feature prioritizing rudi gens pointed out that hundreds of edits have been done to the firefox 3 feature brainstorming page. he suggests that some prioritizing be done. meetings gecko 1.9/gran paradiso status meeting gecko 1.9/gran paradiso status meeting: october 25th, 2006 - 11am pdt. meeting notes gecko 1.9 bug triage meeting gecko 1.9 bug triage meeting - 3pm pdt final bon echo status meeting the final bon echo status meeting happened on october 24th, 2006. meeting notes ...
2006-11-17 - Archive of obsolete content
ays that the machine that does autoconf went down during a power outage. preed and it are working on it. discussion from 50 to 100 locales continuation of the discussion of how to make l10n easier and increase the number of locals with which mozilla products ship. version numbering changes continuation of the discussion about preed's announcement of version number changes meetings project status meeting (notes) ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.platform - october 21st to october 27th 2006 announcements no announcments this week. traffic status of xpcom cycle collector graydon hoare provides the xpcom patch which experiments with implementing a general-purpose garbage-cycle collector for xpcom. meetings no meetings this week ...
Browser-side plug-in API - Archive of obsolete content
ream 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_UserAgent - Archive of obsolete content
. returns a pointer to a buffer that contains the user agent field of the browser. ...
NPStream - Archive of obsolete content
ameter to npn_geturlnotify or npn_posturlnotify. for other streams, notifydata is null. headers the response headers from the host. this field is only available if the np version is greater than or equal to npvers_has_response_headers. this field is used only for http and is null for other types of streams. the plug-in should copy this data before making use of it. the headers include the http status line and all headers, verbatim as received from the server. lines are terminated by newline characters ("\n"), and the headers are terminated by a newline followed by null ("\n\0"). description the browser allocates and initializes the npstream object and passes it to the plug-in in as a parameter to npp_newstream or npn_newstream. the browser cannot delete the object until after it calls npp_de...
NPWindow - Archive of obsolete content
the plug-in relative to the page (and thus relative to the origin of the drawable). should not be modified by the plug-in. height, width the height and width of the plug-in area. should not be modified by the plug-in. cliprect clipping rectangle of the plug-in; the origin is the top left corner of the drawable or window. clipping to the cliprect prevents the plug-in from overwriting the status bar, scroll bars, and other page elements when partially scrolled off the screen. mac os: cliprect is the rectangle in port coordinates to which the plug-in should clip its drawing. ws_info unix: contains information about the plug-in's unix window environment; points to an npsetwindowcallbackstruct. type npwindowtype value that specifies whether the npwindow instance represents a windo...
NPAPI plugin reference - Archive of obsolete content
ers. this call is used to inform the browser of variable information controlled by the plugin. npn_setvalueforurl allows a plugin to change the stored information associated with a url, in particular its cookies. (while the api theoretically allows the preferred proxy for a given url to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) npn_status lets a plug-in display a message on the browser's status line. npn_useragent returns the browser's user agent field. this can be used to handle variations in different browsers (or versions thereof) when implementing your plug-in. npn_utf8fromidentifier returns the utf-8 string corresponding to the given string identifier. npn_version lets plugins obtain version information, both of the pl...
Module - Archive of obsolete content
rss module list rss modules are microformats injected into an rss document through the use of xml namespaces. they are ways of extending rss. below is a list of the popular rss modules. ...
Proposal - Archive of obsolete content
xpect any software to support them.) but some of them could become standards in the future. note: those in the list below that are marked "in development" should not be implemented. "in development" means that they are still working on it and trying to come up with a draft. those labeled with "draft exists" can be implemented, but be warned that they could radically change. name description status easy news topics easy news topics (ent) is intended to be a very simple standard for describing how topic information can be introduced into an rss2.0 news feed. draft exists icbm let's you add latitude and longitude info to an item. spec exists itunes rss itunes extension modules used for ipradio/podcasting. spec exists media rss rss extension module used for iptv and ipradio/podcasting.
0.90 - Archive of obsolete content
Archive › RSS › Version › 0.90
<title>mozilla dot org</title> <link>http://www.mozilla.org</link> <description>the mozilla organization web site</description> </channel> <image> <title>mozilla</title> <url>http://www.mozilla.org/images/moz.gif</url> <link>http://www.mozilla.org</link> </image> <item> <title>new status updates</title> <link>http://www.mozilla.org/status/</link> </item> <item> <title>bugzilla reorganized</title> <link>http://www.mozilla.org/bugs/</link> </item> <item> <title>mozilla party, 2.0!</title> <link>http://www.mozilla.org/party/1999/</link> </item> <item> <title>uni...
Version - Archive of obsolete content
w, although rss 1.0 seems to be out of place, it is actually in the correct place chronologically. note: there are 3 different versions of rss 0.91. netscape's rss 0.91 (revision 1), netscape's rss 0.91 revision 3 and userland's rss 0.91. note: rss 0.93 and rss 0.94 were only ever released as "drafts" and never became "final" and thus were not meant to actually be used. ...
.htaccess ( hypertext access ) - Archive of obsolete content
ess files less. common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible. it's a fast and efficient way of redirecting traffic, because the redirect happens before the pages are served. redirects can be made on a temporary basis or permanently by supplying the status codes. redirect 301 / http://example.com/ # redirect the traffic to the directory to example.com , permanent redirect redirect 302 / http://example.com/ # redirect the traffic to the directory to example.com , temporary redirect blocking : htaccess also facilitates blocking traffic based on ip and ip range, also, use to block bad bots, rippers, and referrers; often used to restric...
Introduction to Public-Key Cryptography - Archive of obsolete content
t. another approach involves publishing a certificate revocation list (crl)-that is, a list of revoked certificates-to the directory at regular intervals and checking the list as part of the authentication process. for some organizations, it may be preferable to check directly with the issuing ca each time a certificate is presented for authentication. this procedure is sometimes called real-time status checking. registration authorities interactions between entities identified by certificates (sometimes called end entities) and cas are an essential part of certificate management. these interactions include operations such as registration for certification, certificate retrieval, certificate renewal, certificate revocation, and key backup and recovery. in general, a ca must be able to authenti...
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
that it can be used in additional mozilla applications. we'll build upon the stock watcher extension created in earlier articles in this series, updating it so it can also be used in thunderbird and sunbird (previous versions worked only in firefox). if you haven't already created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension download the sample you can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension. download the sample updating the install manifest the first step is to revise the extension's install manifest to ...
azimuth - Archive of obsolete content
Archive › Web › CSS › azimuth
ds: moves the sound counter-clockwise by 20 degrees, relative to the current angle. rightwards: moves the sound clockwise by 20 degrees, relative to the current angle. examples h1 { azimuth: 30deg; } td.a { azimuth: far-right; } /* 60deg */ #12 { azimuth: behind far-right; } /* 120deg */ p.comment { azimuth: behind; } /* 180deg */ specifications specification status comment css level 2 (revision 1)the definition of 'azimuth' in that specification. recommendation initial definition. ...
display-inside - Archive of obsolete content
s to block. block the element lays out its contents using block layout. table the element lays out its contents using table layout. flex the element lays out its contents using flex layout. grid the element lays out its contents using grid layout. ruby the element lays out its contents using ruby layout. formal syntax syntax not found in db! specifications specification status comment css display module level 3the definition of 'display-inside' in that specification. candidate recommendation initial specification browser compatibility not supported in any browser. ...
display-outside - Archive of obsolete content
x and its children to be table-cell boxes. layout-specific leaf types these display types require their parent to be of a particular display type, but can accept any display-inside value. for example, a table-caption box must have a table parent, but can establish any kind of formatting context for its children. formal syntax syntax not found in db! specifications specification status comment css display module level 3the definition of 'display-outside' in that specification. candidate recommendation initial definition ...
ArrayBuffer.transfer() - Archive of obsolete content
fer)) throw new typeerror('source must be an instance of arraybuffer'); if (length <= source.bytelength) return source.slice(0, length); var sourceview = new uint8array(source), destview = new uint8array(new arraybuffer(length)); destview.set(sourceview); return destview.buffer; }; } specifications specification status comment arraybuffer.prototype.transfer proposal draft stage 2 draft ...
New in JavaScript - Archive of obsolete content
this chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox. ecmascript versions language resources learn more about the ecmascript standards on which the javascript language is based on. ecmascript 5 support implementation status for the current standard ecma-262 edition 5.1 in mozilla-based engines and products. ecmascript 2015 support implementation status for the draft ecma-262 edition 6 (es2015) in mozilla-based engines and products. ecmascript next support implementation status for upcoming ecma-262 features as per the yearly (es2016/es2017/es2018/...) release schedule in mozilla-based engines and products. javascript versions deprecated ( ). the explicit versioning and...
Archived JavaScript Reference - Archive of obsolete content
e the function a legacy generator, the function body should contain at least one yield expression.microsoft javascript extensionsmicrosoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard javascript apis.new in javascriptthis chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.number.tointeger()the number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.object.getnotifier()the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
. to put that in perspective, i remember when the fish cam page first appeared and word of it circulated around the internet. you could see the actual fish in the mythical netscape headquarters, any time of the day or night! (assuming the lights were on.) it was cool, it was funny, it was pretty amazing. it's also a weird feeling when someone asks you to work on something that has near-legendary status in your mind. it's like a scuba enthusiast getting to join jacques cousteau on a dive, even down to the required time travel. i dove right in and decided to have some fun with with the redesign, which is why i rather like the final result. to share the joy, i herein present a look into just one piece of the redesign, and how i accomplished certain effects using simple html and some css. marking ...
Building Mozilla XForms - Archive of obsolete content
the extensions live in separate repositories. before you can start building the xforms extension, you should check your mozilla build environment by doing a regular firefox build. have a look at the build instructions for detailed information for your platform. ...
XForms Custom Controls - Archive of obsolete content
kground information so that you'll be able to get a good start. to really grasp the following information, a good understanding of xforms, xbl, javascript and css is needed. xpcom knowledge will certainly not hurt. but even if you are only comfortable with a couple of these technologies, we hope that the possibilities outlined below will inspire you to learn more where you need to. implementation status the framework we use in the mozilla xforms processor is very much a "work in progress". please keep in mind that just about everything we mention here may change to some degree as we continue to work on it. work has just started in the w3c xforms working group to investigate the custom control issue, so eventually (hopefully?) there will be an "official" and common way to customize your form's us...
Troubleshooting XForms Forms - Archive of obsolete content
than the form is loaded from, make sure that you have allowed cross-domain submission for that specific "form domain". read here for more information. 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. in order to fix this, go to the noscript options dialog (right-click on the 's' icon on the status bar and select 'options...') and select the advanced tab. 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. alternatively, for a long term fix you can enter an exception pattern in the anti...
Mozilla XForms User Interface - Archive of obsolete content
x 3.0 (gecko 1.9). there are several possible reasons for this restriction. the first is that the changes required for such controls could not be safely made to firefox 1.5 or firefox 2.0. the second is that the control is introduced in xforms 1.1 and we don't feel adding the enhancement would be prudent until the 1.1 spec is more stable. for instance, when the spec reaches 'recommendation'-level status. if you see xhtml/xul then it means the control is available when xforms is hosted in either xhtml or xul. similarly, if you see xhtml only or xul only, then it means the control is available only in that host language. attribute sets this section describes attributes that are often used on xforms elements. these attributes are combined into following logical groups. ui common the ui common attri...
XForms - Archive of obsolete content
n, while supporting a significant subset of the xforms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010. the last official release has been done for firefox 3.6 and is available for download on addons.mozilla.org. for more details about the future of the mozilla xforms extension see this blog post. documentation implementation status implementation status of the mozilla xforms extension building get started with building your own xforms extensions from source. troubleshooting tips for xforms a small collection of tips for troubleshooting common problems with xforms forms. mozilla xforms specials explains where, and how, mozilla xforms deviates or extends the xforms 1.0 specificati...
Window: devicelight event - Archive of obsolete content
x. min read only double (float) the minimum value in the range the sensor detects (if available, 0 otherwise). max read only double (float) the maximum value in the range the sensor detects (if available, 0 otherwise). examples window.addeventlistener('devicelight', function(event) { console.log(event.value); }); specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification. candidate recommendation removed from specification ...
RDF in Mozilla FAQ - Archive of obsolete content
tasource's progress. the following code illustrates its usage: // this is the object that will observe the rdf/xml load's progress var observer = { onbeginload: function(asink) {}, oninterrupt: function(asink) {}, onresume: function(asink) {}, onendload: function(asink) { asink.removexmlsinkobserver(this); alert("done!"); }, onerror: function(asink, astatus, aerrormsg) { alert("error! " + aerrormsg); } }; // get the rdf service var rdf = components .classes["@mozilla.org/rdf/rdf-service;1"] .getservice(components.interfaces.nsirdfservice); // get the datasource. var ds = rdf.getdatasource("http://www.mozilla.org/some-rdf-file.rdf"); // now see if it's loaded or not... var remote = ds.queryinterface(components.interfaces.nsirdfremotedatas...
WebVR — Virtual Reality for the Web - Game development
ices connected to a computer and headset position/orientation/velocity/acceleration information, and converting that into useful data you can use in your games and other applications. note: there are of course other apis useful for creating games, for example the gamepad api for control inputs, and the device orientation api for handling display orientation on mobile. browser support and spec status currently browser support for the webvr api is still experimental — it works in nightly builds of firefox and experimental builds of chrome (mozilla and google teamed up to work on the implementation together), but sooner rather than later we'll see it in regular builds. the webvr spec is in editor's draft status which means it is still subject to change. the development is led by vladimir vu...
Desktop mouse and keyboard controls - Game development
space to shoot'; } else { movetext = 'tap and hold to move'; shoottext = 'tap to shoot'; } if the game is running on desktop the cursor and w a s d keys message will be shown — if not, then the mobile touch controls message will be. to skip the how to play screen, we can listen for any key being pressed and move on: this.input.keyboard.ondowncallback = function() { if(this.statestatus == 'intro') { this.hideintro(); } }; this hides the intro and starts the actual game, without us having to set up another new key control just for this. pause and game over screens to make the game fully playable with keyboard it should be possible to go back to the main menu, continue playing, or restart the game from the pause and game over screens. it can be done exactly the sam...
Unconventional controls - Game development
v id="output"></div> just before the closing </body> tag for outputting diagnostic information. we will need a few helper variables for our code to work — one for the purpose of calculating the degrees from radians, two for holding the horizontal and vertical amount of degrees our hand is leaning above the controller, one for the threshold of that lean, and one for the state of our hand's grab status. we next add these lines after all the event listeners for keyboard and mouse, but before the draw method: var todegrees = 1 / (math.pi / 180); var horizontaldegree = 0; var verticaldegree = 0; var degreethreshold = 30; var grabstrength = 0; right after that we use the leap's loop method to get the information held in the hand variable on every frame: leap.loop({ hand: function(hand) { ...
WebRTC data channels - Game development
eo communications; however, it also offers peer-to-peer data channels. this article explains more about this, and shows you how to use libraries to implement data channels in your game. what is a data channel? a webrtc data channel lets you send text or binary data over an active connection to a peer. in the context of a game, this lets players send data to each other, whether text chat or game status information. data channels come in two flavors. reliable channels guarantee that messages you send arrive at the other peer and in the same order in which they're sent. this is analogous to a tcp socket. unreliable channels make no such guarantees; messages aren't guaranteed to arrive in any particular order and, in fact, aren't guaranteed to arrive at all. this is analogous to a udp socket. w...
2D maze game with device orientation - Game development
ls. we can use the wallcollision function to add any functionality we want like playing the bounce sound and implementing the vibration api. adding the sound among the preloaded assets there was an audio track (in various formats for browser compatibility), which we can use now. it has to be defined in the create() function first: this.bouncesound = this.game.add.audio('audio-bounce'); if the status of the audio is true (so the sounds in the game are enabled), we can play it in the wallcollision function: if(this.audiostatus) { this.bouncesound.play(); } that's all — loading and playing the sounds is easy with phaser. implementing the vibration api when collision detection works as expected let's add some special effects with the help from the vibration api. the best way to use ...
ALPN - MDN Web Docs Glossary: Definitions of Web-related terms
...
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge crud on wikipedia ...
Forbidden response header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden response header name is an http header name (either `set-cookie` or `set-cookie2`) that cannot be modified programmatically. specifications specification status comment fetchthe definition of 'forbidden-response-header-name' in that specification. living standard ...
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
the http network protocol. 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. http/2 does not modify the application semantics of http in any way. all the core concepts found in http 1.1, such as http methods, status codes, uris, and header fields, remain in place. instead, http/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides application complexity within the new framing layer. as a result, all existing applications can be delivered without modification. ...
STUN - MDN Web Docs Glossary: Definitions of Web-related terms
stun (session traversal utilities for nat) is an auxiliary protocol for transmitting data around a nat (network address translator). stun returns the ip address, port, and connectivity status of a networked computer behind a nat. learn more general knowledge stun on wikipedia webrtc protocols technical reference specification ...
Site - MDN Web Docs Glossary: Definitions of Web-related terms
site because the registrable domain of mozilla.org is the same http://example.com:8080 https://example.com same site because scheme and port are not relevant examples of different site https://developer.mozilla.org/docs/ https://example.com not same site because the registrable domain of the two urls differs specifications specification status comment url living standard initial definition ...
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
a transition is a set of actions to execute when a condition is fulfilled or an event received. in a state diagram, circles represent each possible state and arrows represent transitions between states. looking at the final state, you can discern something about the series of inputs leading to that state. ...
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
web standards are rules established by international standards bodies and defining how how the web works (and sometimes controlling the internet as well). several standards bodies are responsible for defining different aspects of the web, and all the standards must coordinate to keep the web maximally usable and accessible. web standards also must evolve to improve the current status and adapt to new circumstances. this non-exhaustive list gives you an idea of which standards websites and network systems must conform to: ietf (internet engineering task force): internet standards (std), which among other things govern set-up and use of uris, http, and mime w3c: specifications for markup language (e.g., html), style definitions (i.e., css), dom, accessibility iana (internet assigned...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
l': responsetype = 'responsexml'; break; default: alert('xinclude element contains an invalid "parse" attribute value'); return false; break; } request.send(null); if((request.status === 200 || request.status === 0) && request[responsetype] !== null) { response = request[responsetype]; if (responsetype === 'responsexml') { // apply xpointer (only xpath1() subset is supported) var responsenodes; if (xpointer) { var...
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
living standard learn more see same-origin policy for more information. ...
About Scriptable Interfaces - Interfaces
most of the information of this document is based on http://www.mozilla.org/scriptable/ and creating xpcom components scriptable interfaces interfaces allow xpcom components to expose their functionality to the outside world while hiding the inner details of the component implementation. interfaces are written in an interface description language. when we label an interface as scriptable, we're saying that components exporting this interface can be referenced (through this interface) from scripts (e.g javascript), and that we can write new components implementing the interface using script languages. ...
WAI-ARIA basics - Learn web development
other properties such as aria-labelledby if you want to designate a non-<label> element as a label or label multiple form inputs with the same label, and aria-describedby, if you want to associate other information with a form input and have it read out as well. see webaim's advanced form labeling article for more details. there are many other useful properties and states too, for indicating the status of form elements. for example, aria-disabled="true" can be used to indicate that a form field is disabled. many browsers will just skip past disabled form fields, and they won't even be read out by screenreaders, but in some cases they will be perceived, so it is a good idea to include this attribute to let the screenreader know that a disabled input is in fact disabled. if the disabled state of...
Supporting older browsers - Learn web development
s property. for example, take a look at the page for grid-template-columns. at the bottom of this page is a table, which lists major browsers along with the version they began supporting this property. another popular way to find out about how well a feature is supported is the can i use website. this site lists the majority of web platform features with information about their browser support status. you can view usage statistics by location — useful if you work on a site that has users mostly for a specific area of the world. you can even link your google analytics account to get analysis based on your user data. understanding the technology your users have, and the support for things you might want to use puts you in a good place to make all of your decisions and to know how best to sup...
What is CSS? - Learn web development
he code has been written to turn the instruction in our css file into something that can be output to the screen. we'll look at this process more in the lesson how css works. it is unusual for all browsers to implement a feature at the same time, and so there is usually a gap where you can use some part of css in some browsers and not in others. for this reason, being able to check implementation status is useful. on each property page on mdn you can see the status of the property you are interested in, so you can tell if you will be able to use it on a website. what follows is the compat data chart for the css font-family property. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-fa...
How do you upload your files to a web server? - Learn web development
a): let's examine what you're seeing: on the center left pane, you see your local files. navigate into the directory where you store your website (e.g. mdn). on the center right pane, you see remote files. we are logged into our distant ftp root (in this case, users/demozilla) you can ignore the bottom and top panes for now. respectively, these are a log of messages showing the connection status between your computer and the sftp server, and a live log of every interaction between your sftp client and the server. uploading to the server our example host instructions told us "to publish on the web, put your files into the public/htdocs directory." you need to navigate to the specified directory in your right pane. this directory is effectively the root of your website — where your in...
HTML forms in legacy browsers - Learn web development
sources that can be amazingly helpful: browser vendor documentation mozilla: you're in the right place, just browse mdn microsoft: internet explorer standards support documentation webkit: because there are several different editions of this engine, things are a little trickier. the webkit blog and planet webkit aggregate the best articles by webkit core developers. chrome platform status site is also important. as well as the apple web site. make things simple because html forms involves complex interaction, there is one rule of thumb: keep it simple, also known as the "kiss principal". there are so many cases where we want forms that are "nicer" or "with advanced functionality", but building efficient html forms is not a question of design or technology. rather, it's ...
UI pseudo-classes - Learn web development
onal { border: 1px solid silver; } the required controls would have a black border, and the optional control will have a silver border, like so: you can also try submitting the form without filling it in, to see the client-side validation error messages browsers give you by default. the above form isn't bad, but it isn't great either. for a start, we are signalling required versus optional status using color alone, which isn't great for colorblind people. second, the standard convention on the web for required status is an asterisk (*), or the word "required" being associated with the controls in question. in the next section, we'll look at a better example of indicating required fields using :required, which also digs into using generated content. note: you'll probably not find yourse...
Fetching data from the server - Learn web development
ful. you will basically need to use the same pattern as you saw earlier in the xhr-basic.html example. you will, however, need to add the error handling we showed you in the fetch version of the can store: the response is found in request.response after the load event has fired, not in a promise then(). about the best equivalent to fetch's response.ok in xhr is to check whether request.status is equal to 200, or if request.readystate is equal to 4. the properties for getting the status and status message are the same, but they are found on the request (xhr) object, not the response object. note: if you have trouble with this, feel free to check your code against the finished version on github (see the source here, and also see it running live). summary this article shows...
Rendering a list of Vue components - Learn web development
between the <li> tags will have access to the item value in addition to the other component attributes. this means we can pass the fields of our item objects to our todoitem component — just remember to use the v-bind syntax. this is really useful, as we want our todo items to display their label properties as their label, not a static label of "my todo item". in addition, we want their checked status to reflect their done properties, not always be set to done="false". update the label="my todo item" attribute to :label="item.label", and the :done="false" attribute to :done="item.done", as seen in context below: <ul> <li v-for="item in todoitems" :key="item.id"> <to-do-item :label="item.label" :done="item.done"></to-do-item> </li> </ul> now when you look at your running a...
Understanding client-side JavaScript frameworks - Learn web development
p features, which we'll go on to in subsequent articles. 3. dynamic behavior in svelte: working with variables and props now that we have our markup and styles ready we can start developing the required features for our svelte to-do list app. in this article we'll be using variables and props to make our app dynamic, allowing us to add and delete todos, mark them as complete, and filter them by status. 4. componentizing our svelte app the central objective of this article is to look at how to break our app into manageable components and share information between them. we'll componentize our app, then add more functionality to allow users to update existing components. 5. advanced svelte: reactivity, lifecycle, accessibility in this article we will add the app's final features and further c...
Implementing feature detection - Learn web development
ea of how modernizr works for css features. if you look at the dom inspector of your browser's developer tools, you'll see that modernizr has updated your <html> class value like so: <html class="js no-htmlimports sizes flash transferables applicationcache blobconstructor blob-constructor cookies cors ...and loads more values!> it now contains a large number of classes that indicate the support status of different technology features. as an example, if the browser didn't support flexbox at all, <html> would be given a class name of no-flexbox. if it did support modern flexbox, it would get a class name of flexbox. if you search through the class list, you'll also see others relating to flexbox, like: flexboxlegacy for the old flexbox spec (2009). flexboxtweener for 2011 in between syntax s...
Git and GitHub - Learn web development
ster version when they are done with it. vcses provide tools to meet the above needs. git is an example of a vcs, and github is a web site + infrastructure that provides a git server plus a number of really useful tools for working with git repositories individually or in teams, such as reporting issues with the code, reviewing tools, project management features such as assigning tasks and task statuses, and more. note: git is actually a distributed version control system, meaning that a complete copy of the repository containing the codebase is made on your computer (and everyone else's). you make changes to your own copy, and then push those changes back up to the server, where an administrator will decide whether to merge your changes with the master copy. looking to become a front-e...
Deploying our app - Learn web development
ommitting changes to github this section will get you over the line to storing your code in a git repository, but it is a far cry from a git tutorial. there’s many great tutorials and books available, and our git and github page is a good place to start. we initialized our working directory as a git working directory earlier on. a quick way to verify this is to run the following command: git status you should get a status report of what files are being tracked, what files are staged, and so on — all terms that are part of the git grammar. if you get the error fatal: not a git repository returned, then the working directory is not a git working directory and you’ll need to initialise git using git init. now we have three tasks ahead of us: add any changes we’ve made to the stage (...
Accessibility Features in Firefox
re. caret browsing allows you to move through web content one letter a time. you can even select web content and copy it to the clipboard. -- all with the keyboard detailed advanced javascript control: mozilla gives you the ability to fine tune what javascript is allowed to do while you browse. for example, you can disable functions that websites use to move or resize windows, or to remove your status bar, to disable right-click contextual menus, change the status bar text, etc. you can furthermore control javascript capabilities to remove scrollbars, toolbars or system buttons like minimize, close and maximize by editing the about:config related properties or by editing accordingly the user.js file as explained in this "disable other javascript window features" document. moving back and forw...
CSUN Firefox Materials
it's a quick download, occupies very little disk space, and has a clean, no-nonsense interface." - pc magazine firefox 1.5 is a fast, free, standards compliant web browser which is rapidly gaining recognition for its fresh, streamlined approach to browsing the web. in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software. websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage. ...
Embedding API for Accessibility
arpref("alert.audio.plugin_content_waiting", pathtosoundfile); setcharpref("alert.audio.video_waiting", pathtosoundfile); setcharpref("alert.audio.audio_waiting", pathtosoundfile); setcharpref("alert.audio.timed_event_waiting", pathtosoundfile); /* these alerts will also be mirrored visually, either on the status bar or elsewhere */ no background images setboolpref("browser.accept.background_images", acceptbackgroundimages); no blinking text setboolpref("browser.blink_allowed", acceptblinktext); no animations ...
Mozilla's Section 508 Compliance
nveyed by the image must also be available in text. complete. we expose this information to assistive technology via microsoft active accessibility (msaa) (windows) and accessibility toolkit (atk) (linux/unix). incomplete. no development efforts have made made to utilize cocoa or carbon accessibility apis. (e) when bitmap images are used to identify controls, status indicators, or other programmatic elements, the meaning assigned to those images shall be consistent throughout an application's performance. complete. requirement windows linux/unix mac os (f) textual information shall be provided through operating system functions for displaying text. the minimum information that shall ...
Accessible Toolkit Checklist
require these labels to be created/associated with each widget, not as a separate static text with no tie to the widget. the msaa support needs to know what label goes with what widget. msaa support: expose window with role_dialog, unless it's already the standard dialog window class #32770. if you don't, some screen readers won't automatically read the dialog when it receives focus. expose status bars with role_statusbar, unless they already use the standard window class msctls_statusbar32. make sure that parent-child relationships are exposed correctly in each window's msaa tree general msaa support focus events handling event callbacks, which requires a unique id for each non-windowed child of every widget that can be focused or have any other event associated...
Application cache implementation overview
cache, further steps are not executed. the channel remembers the nsiapplicationcache object. nsiapplicationcache is then queried a client id (= the manifest url + a unique time stamp). then, nsicacheservice is asked to open nsicachesession with store_offline policy and the given client id. entry is queried using that session. nshttpchannel::onofflinecacheentryavailable is then invoked. when aentrystatus is a success code, entry has been found and we are loading it from the cache. loadedfromapplicationcache flag is now set true on the channel. when aentrystatus is a failure code, entry has not been found, but the url is falling under one of the network or fallback namespaces. when matching fallback namespace, the associated fallback entry for it is remembered. the load then continues from the net...
What to do and what not to do in Bugzilla
where a bug belongs, don't touch it! for example, don't move bugs into the js engine component unless you really know they are js engine bugs, and don't leave bugs in the js engine component if you know that the malfunction being described is a dom problem. bug flags mozilla drivers use flags to identify bugs blocking a release. you may only use the blocking? flag to nominate bugs for blocking status. the use of the blocking- flag and the blocking+ flag is prohibited. continued abuse will result in revocation of your bugzilla privileges. mass changes mass changes (changes to more than one bug simultaneously) are discouraged. don't do it! ...
Bugzilla
...
Building SpiderMonkey with UBSan
...
Debugging Frame Reflow
cpp. it provides the following information for each frame at the start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a count number. when the frame's reflow is finished the following information is displayed : reflow metric (desired) width, height max. element width maximum width frame status overflow area getting the log make sure that your build is a debug build (in short you need ac_add_options --enable-debug in your .mozconfig file). create a text file (for instance reflow_rules.txt). enter this line in the text file * 1 this should look like: point the gecko_display_reflow_rules_file environment variable to the path of the reflow_rules.txt file. run ...
Debugging on Windows
ymbols" appended to the cache directory configured in visual studio. downloading all symbols can take a long time; you can replace c:\windows\syswow64\ with the name of a single .dll to download symbols only for the specific libraries you are trying to debug. unfortunately, it's hard to know which symbols to download without having vs hang and seeing the "downloading symbols for <library>" status at the bottom left of the main window. problems post-mortem debugging on windows 7 sp1 x64? if you attempt to use ns_debugbreak etc to perform post-mortem debugging on a 64bit windows 7, but as soon as you try and continue debugging the program crashes with an access violation, you may be hitting a windows bug relating to avx support. for more details, including a work-around see this blog pos...
Makefile - variables
t, windows moz_xpctools moz_xul moz_x11 test variable description enable_tests boolean value that should wrapper all unit tests to allow disabling on demand[1]. python_unit_tests list of python scripts to check exit status for make check xpc_shell_tests no_xpcshell_manifest_check inhibit validating manifest files when running xpcshell tests. compiler variable description gnu_cc defined if the gnu gcc compiler is available. module_optimize_flags additional flags for enabling o...
Old Thunderbird build
ndows run: ./mozilla/mach build path/to/dir this is the tricky bit, since you need to specify the directory that installs the files, which may be a parent directory of the changed file's directory. for all other changes run the full rebuild: ./mozilla/mach build problems building? have you: check comm-central on treeherder for known failures at the time you pulled the code. the current status of the trunk can also be checked at https://treestatus.mozilla.org/ if the trunk is broken (i.e. closed), you may wish to consider building one of the branches (to pull the source code from a branch, just replace the url to the repository in the hg clone instruction). on windows: check that the mapi header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are ...
Simple Instantbird build
ne. so firstly complete the instructions for your os and then continue following these build instructions. windows build prerequisites gnu/linux build prerequisites mac os x build prerequisites tip: after completing setup for your os, and before you get the source, you can opt to add the progressextension to your mercurial.ini (for windows) or .hgrc (for *nix / mac) file. this will provide status feedback during the lengthy clone / download process. see: configure mercurial .hgrc file for progress extension. get the source note: on windows, you won't be able to build the instantbird source code if it's under a directory with spaces in the path (e.g., don't use "documents and settings"). you can pick any other location, such as a new directory c:\instantbird-src. note: parts of the buil...
Simple Thunderbird build
fy the directory that installs the files, which may be a parent directory of the changed file's directory. for example, to just rebuild the lightning calendar extension: ./mach build comm/calendar/lightning for all other changes run the full rebuild: ./mach build problems building? have you: check comm-central on treeherder for known failures at the time you pulled the code. the current status of the trunk can also be checked at https://treestatus.mozilla.org/ if the trunk is broken (i.e. closed), you may wish to consider building one of the branches (to pull the source code from a branch, just replace the url to the repository in the hg clone instruction). check to make sure that the path in which you placed the source code has no spaces, and is not too long. searched th...
Updating NSPR or NSS in mozilla-central
might not be aware that nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if nspr or nss must be upgraded to a new static tag, follow this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a blank line) to force a rebuild of nspr: mozilla/nsprpub/config/prdepend.h or nss: mozilla/security/nss/coreconf/coreconf.d...
Developer guide
n for mozilla code searching. indexes js as well as c++, includes blame capabilities. in active development. mozilla build vm a virtualbox compatible virtual machine configured with all the software needed to build and work on firefox. taskcluster taskcluster is the task execution framework that supports mozilla's continuous integration and release processes. treeherder treeherder shows the status of the tree (whether or not it currently builds successfully). check this before checking in and out, to be sure you're working with a working tree. perfherder perfherder is used to aggregate the results of automated performance tests against the tree. crash tracking information about the socorro crash reporting system. callgraph a tool to help perform static analysis of the mozilla code b...
Firefox and the "about" protocol
the array m...
Using the Browser API
Mozilla › Gecko › Chrome › API › Browser API › Using
ng, and we change the button to a cross to indicate "stop". when the mozbrowserloadend event fires, the latest page request has finished loading, and at this point we want to change the icon back to the reload icon (in this case we are just using a capital "r"). notice that this is also where we call the canmovebwd() and canmovefwd() functions we discussed earlier — it makes sense to update the status of the back and forward buttons after each page reload. in addition, the background of the controls ui bar is changed to the background color of the site that has just loaded, to provide a more integrated experience — this can be read out of the event object's e.detail.backgroundcolor value. when the front page of https://developer.mozilla.org is loaded, for example, the e.detail.backgroundcol...
Getting Started with Chat
t the aspects of the specified channel given the correct password /msg chanserv register #channel password topic registers a channel given the correct password and sets the topic for more information about chanserv go here. firebot firebot is a bot which assists with mozilla related activities on irc. for instance, firebot automatically posts messages to #developers about the status of automated tests. the following are some helpful commands which can be used by firebot: bug ###### when a bug number is mentioned in a message, firebot automatically displays the link and summary from bugzilla for that bug. /msg firebot uuid displays a unique identifier. this is useful when creating interfaces for add-on development. /msg firebot cid display...
HTTP Cache
all consumers release the reference: the entry may now be purged (removed) from memory when found expired or least used on overrun of the memory pool limit when this is a disk cache entry, its cached data chunks are released from memory and only meta data is kept intermediate memory caching of frequently used metadata (a.k.a. disk cache memory pool) this is a description of this feature status that is currently only a patch in bug 986179. current behavior is simpler and causes a serious memory consumption regression (bug 975367). for the disk cache entries we keep some of the most recent and most used cache entries' meta data in memory for immediate zero-thread-loop opening. the default size of this meta data memory pool is only 250kb and is controlled by a new browser.cache.disk.met...
How to add a build-time test
psrcs, simple_programs, run_test_program. xpcshell tests here are the simple guidelines for adding an xpcshell test to the build system. for now, enclose your test-related code (in the makefile) with ifdef enable_tests run the test program from the "check" target in the makefile. (example to run the testcookie program) in the test program: if the test fails, exit with a non-zero status and/or print the string "fail" to stdout if the test passes, exit with a zero status and don't print the string "fail" (bonus points for printing "pass" :) ) write the test so that you expect it to pass on all platforms, since if the test fails, the tree will go orange (once we've set this up - see bug 352240 for status). for example, to add an xpcshell test to a module, do the fo...
JavaScript Tips
tsbytagname(atag).length > 0. prefer to use localname rather than tagname. xul elements have many of the attributes mapped to properties. this was done for a reason, so use them! the properties are: align allowevents contextmenu datasources dir flex height id left maxheight maxwidth minheight minwidth observes orient pack persist ref statustext top tooltip tooltiptext width xul also maps the ordinal attribute but this defaults to "1" if it is not present. xul also maps the class attribute, but unfortunately class is a reserved identifier, so the property is named classname. (the property could have been implemented as ["class"'] but that just looks silly.) xul also maps the hidden and collapsed attributes to prop...
Addon
void datadirectorycallback( in string path, in error error ) parameters path a string representation of the addon's data directory. error if an error has occured, an error object relevant to the error, othereise null. req...
UpdateCheckListener
updatechecklisteners are passed the results of update checks performed by the addonupdatechecker. method overview void onupdatecheckcomplete(in updateinfo results[]) void onupdatecheckerror(in integer status) methods onupdatecheckcomplete() called when the update check completed successfully. void onupdatecheckcomplete( in updateinfo results[] ) parameters results an array of updateinfo objects representing the available add-on versions onupdatecheckerror() called when the update check fails. void onupdatecheckerror( in integer status ) parameters status a value representing the type of failure; see the range of possible values. ...
AsyncShutdown.jsm
their data to disk, before writing its own data. since the data is saved to the profile, this must be completed during phase profilebeforechange. asyncshutdown.profilebeforechange.addblocker( "add-on manager: shutting down", function condition() { let promise = ... // do whatever must be done before the end of phase profilebeforechange return promise; }, function info() { let status = ... // collect any information that may be useful for debugging shutdown issues with this blocker return status; } }); in this example, at some point during phase profilebeforechange, function condition will be called. phase profilebeforechange is guaranteed to not terminate until promise is either resolved or rejected. if, for some reason, promise is never resolved/rejected, firefox...
FxAccountsProfileClient.jsm
file.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 ...
Log.jsm
.addappender(new log.dumpappender(new log.basicformatter())); // log some messages log.error("oh noes!! something bad happened!"); log.debug("details about bad thing only useful during debugging", {someinfo: "nothing"}); log.warn("here is an error", new error("ouch")); logger levels fatal severe errors that cause premature termination. expect these to be immediately visible on a status console. error other runtime errors or unexpected conditions. expect these to be immediately visible on a status console. warn use of deprecated apis, poor use of api, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". expect these to be immediately visible on a status console. info interesting runtime eve...
OS.File.Info
dificationdate the date at which the file was last modified, as a javascript date object. platform-specific attributes unix unixowner a number holding the identifier of the unix owner of this file. unixgroup a number holding the identifier of the unix group of this file. unixmode a number holding the unix access rights to this file. unixlaststatuschangedate date. this is the date of the latest write/renaming/mode change/... where ... is any write/set of inode information (such as owner, group, link count, mode, etc). windows winbirthdate a date representing the time at which the file was created. may not be exact on all file systems. winattributes hidden boolean ...
Promise
m code, without calling the then() method. to help with debugging, only when inspecting a promise object manually, you can see more information as special properties that are inaccessible from code (this, at present, is implemented by randomizing the property name, for the lack of more sophisticated language or debugger support). these code-inaccessible, inspectable properties are: {{private:status}}: 0 for pending, 1 for fulfilled, or 2 for rejected. {{private:value}}: fulfillment value or rejection reason, for fulfilled or rejected promises only. {{private:handlers}}: array of objects holding references to functions registered by the then() method, for pending promises only. examples see the examples page. handling errors and common pitfalls you should report unhandled errors, un...
Bootstrapping a new locale
hg clone ssh://hg@bitbucket.org/mozillal10n/ab-cd/ $ hg push ssh://hg@bitbucket.org/mozillal10n/ab-cd/ as you begin to move through your translations, you should "commit" the changes locally and "push" your work to this experimental respository. for instance, if you have finished translating all the .dtd and .property files in your ~/ab-cd/browser/ directory, then you should $ cd ~/ab-cd/ $ hg status $ hg commit -m "translated browser/" $ hg push http://bitbucket.org/mozillal10n/ab-cd/ note that due to the distributed nature of hg, hg commit saves the changes locally, i.e. in the hg repository on your computer. you can see the history of commits with hg log. after doing hg commit, you still need to send the changes to bitbucket. this is why you need to do hg push, which sends the already ma...
SVN for Localizers
command from the command-line: svn diff this command produces output with every change made to each file. it's a bit hard to read, but you can also create a diff file (aka a diff patch) use svn diff > /path/to/output/file.diff to save the output to a file. note that path/to/output is meant to indicate the directory on your computer where you wish to store the diff file. you can also run svn status to check the list of modified files (they'll display a m before the name) you're about to commit. once you're satisfied with changes, commit them to the appropriate mozilla svn repository by entering the following command: svn commit -m "minor modifications for firefox [version #] beta page for [your locale]" the svn commit command will commit your changes directly to the mozilla svn repo...
Uplifting a localization from Central to Aurora
two changesets without a branch. so yes, you need to merge those two. hg merge if this just passes, you want to commit, and you probably want to use a commit message like "merging central and aurora". you can safely push this to l10n-central already, in particular if you don't plan to do further updates on aurora. you don't want to push this to aurora before there's been the notification that the status of aurora has been lifted up to beta. if hg merge starts asking you questions, you have a merge conflict. that indicates that the same string has different translations on l10n-central and aurora, and you really want to make sure that your aurora clone doesn't have quality issues. in particular, did you land all the fixes for your work on both central and aurora? because mercurial suggests that y...
MathML3Testsuite
when the markup is intentionally errorous, the correct behavior is not defined by the recommendation and hence the tests are considered passed if there is no fatal error (crash, etc). this exception also holds for obsolete features (such as macro, mode etc) or for other undefined behaviors (attribute href for example). ...
Various MathML Tests
x 2 + 4 * x + p q = 0 , with this <mfrac> hanging here d * t ( i + j n ) + p y * q p x * b x + a + c d in the middle of a lot of running text to try to explain what this means to those who care to read. testing mathml <merror>, <mtext>: this is a text in mtext this is a text in merror testing <maction>: click to toggle between expressions, and watch the status line onmouseover/onmouseout: statusline#first expression first expression statusline#second expression second expression statusline#and so on... and so on.. click the expression below to see several definitions of pi: π = 3.14159265358... π = 2i ⁢ log 1-i 1+i π = 2 . 2 2 . 2 2 + 2 . 2 2 + 2 + 2 ... π 4 = 1 2 + 12 2 + 32 ...
Mozilla MathML Project
the mozilla mathml project is mozilla's project to build and enhance mathml support within firefox and other mozilla-based applications. for a quick overview, see the slides for the innovation fairs at mozilla summit 2013. updates status of each tag result of the mathml 3 testsuite unofficial nightly builds with mathml patches applied (maintained by bill gianopoulos) more updates and archived content community view mozilla forums... mailing list newsgroup rss feed irc channel wiki used by contributors - check out the latest developments and help us improving mathml in mozilla. links installing fonts for mozilla's mathml engine mathml version 3.0 - w3c recommendation, 21 october 2010 w3c mathml test suite - designed to check the implementation of each element one...
Using the viewport meta tag to control layout on mobile browsers
zes for mobile and tablet devices if you want to know what mobile and tablet devices have which viewport widths, there is a comprehensive list of mobile and tablet viewport sizes here. this gives information such as viewport width on portrait and landscape orientation as well as physical screen size, operating system and the pixel density of the device. specifications specification status comment css device adaptationthe definition of '<meta name="viewport">' in that specification. working draft non-normatively describes the viewport meta element there is clearly demand for the viewport meta tag, since it is supported by most popular mobile browsers and used by thousands of web sites. it would be good to have a true standard for web pages to control vi...
Mozilla Web Developer FAQ
se they don’t want tooltips to appear. (again, making things harder for people who don’t see the image.) there is another attribute that mozilla shows as a tooltip: title. in fact, the html 4.01 specification suggests that the title attribute may be displayed as a tooltip. however, this particular display method is not required and some other browsers show the title attribute in the browser status bar, for example. at this point some people feel compelled to post a “but ie…” rant in the newsgroups or in bugzilla. please note that mac ie 5 behaves in the same way as mozilla when it comes to the alt and title attributes. windows ie also shows the title attribute in a tooltip. does mozilla support downloadable fonts? downloadable fonts in truetype and opentype formats (.ttf and .otf)...
Gecko Profiler FAQ
cess to large hashtables when doing a hashtable lookup can incur a page fault in many cases, and while the specific reason behind each one of those page faults may be different, the general conclusion from that observation would be something about the overall efficiency of your memory access patterns. typically we wouldn’t be optimizing away a single page fault anyway. what is the status of i/o detection, on any thread? the gecko profiler has a “mainthreadio” feature which will cause markers for main thread io to be inserted into the profile. however, the profiler add-on currently doesn’t have a checkbox to enable this feature. are the timer probes synchronized, or random/independent? (i'd guess they're independent). when profiling hundred(s) of t...
Performance
u and memory. powermetrics (mac-only) powermetrics is a command-line utility that gathers and displays a wide range of global and per-process measurements, including cpu usage, gpu usage, and various wakeups frequencies. timerfirings logging (all platforms) timerfirings logging is a built-in logging mechanism that prints data on every time fired. activity monitor, battery status menu and top (mac-only) the battery status menu, activity monitor and top are three related mac tools that have major flaws but often consulted by users, and so are worth understanding. intel power gadget (windows, mac, linux) intel power gadget provides real-time graphs for package and processor rapl estimates. it also provides an api through which those estimates can be obtained.
accessibility.tabfocus
the preference accessibility.tabfocus controls what elements receive focus when the user presses the tab key. note: on mac os x, if this preference is not set, the full keyboard access setting in system preferences > keyboard is honored. type:integer default value: 7 (windows and linux); 2 (mac os x) exists by default: no application support:gecko 1.7 status: active introduction: bugs: bug 140612 values 1 give focus only to text fields (default on mac osx) 2 give focus to all form elements except text fields. 4 give focus only to links and linked images. other you can add these values to combine their functionality. the value 7 (give focus to all elements) is the default on windows and linux. ...
browser.altClickSave
the preference browser.altclicksave controls whether clicking a link while holding the alt key starts the download of that link. type:boolean default value: false exists by default: yes application support:firefox 13.0 status: active; last updated 2012-03-19 introduction: pushed to nightly on 2012-03-02 bugs: bug 713052 values true clicking a link while holding the alt key starts the download of that link. false (default) no action triggered (see bug 736985). ...
browser.dom.window.dump.file
browser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if browser.dom.window.dump.enabled is set to true. changes require an application restart. type:string default value:none exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-03-18 introduction: pushed to nightly on 2009-04-24 bugs: bug 489938 values the value holds the file system path for the file in which the content of the window.dump() calls get written, e.g. c:\dump.txt . it will be created if it doesn't exist yet. the line breaks have to be in the argument of the dump function, else successive dump calls will get logged into the same line. related browser.do...
browser.download.lastDir.savePerSite
browser.download.lastdir.savepersite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base. if set to true, the data is stored as content preference. type:boolean default value:true exists by default: no application support:firefox 11.0 status: active; last updated 2012-02-15 introduction: pushed to nightly on 2011-12-11 bugs: bug 702748 values true (default) the last used directory for the website (host) serving the file for download will be preselected in the file picker. if no download directory for the current website has been stored, browser.download.lastdir will be used. false the last used directory for any download (stored in browser.download.lastdir) will be the preselected dire...
browser.pagethumbnails.capturing_disabled
the preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation. type:boolean default value:true exists by default: no application support: firefox 14.0 status: active; last updated 2012-09-17 introduction: pushed to nightly on 2012-04-13 bugs: bug 726347 values false the application creates screenshots of visited web pages. true (default) the application doesn't create screenshots of visited web pages. ...
browser.search.context.loadInBackground
browser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background. type:boolean default value:false exists by default: yes application support: firefox 13.0 status: active; last updated 2012-02-17 introduction: pushed to nightly on 2012-02-15 bugs: bug 727131 values true new tab with search results will be opened in the background, focus stays on the current tab. false (default) new tab with search results will be opened in the foreground. ...
browser.urlbar.formatting.enabled
the preference browser.urlbar.formatting.enabled controls whether the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey. type:boolean default value: true exists by default: yes application support:firefox 6.0 status: active; last updated 2012-04-03 introduction: pushed to nightly on 2011-05-03 bugs: bug 451833 values true (default) the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey. false all parts of the url are given the same color: black. ...
browser.urlbar.trimURLs
the preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden. type:boolean default value: true exists by default: yes application support:firefox 7.0 status: active; last updated 2012-04-03 introduction: pushed to nightly on 2011-06-23 bugs: bug 665580 values true (default) if the active url is exactly the domain name, the trailing slash (/) behind the top level domain will be hidden. if the address starts with http:// and neither starts with a ftp. subdomain nor contains @ (usually for ftp login information), the http:// prefix will be hidden. examples: https://www.example.org/ becomes https://www.example.org, http://www.example.org/foobar becomes www.examp...
dom.event.clipboardevents.enabled
.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected. the emitting of the oncopy, oncut and onpaste events are controlled by this preference. type:boolean default value:true exists by default: no application support: gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) status: active; last updated 2012-02-15 introduction: pushed to nightly on 2012-02-14 bugs: bug 542938 values true (default) the oncopy, oncut and onpaste events are enabled for web content. false the oncopy, oncut and onpaste events are disabled for web content. ...
javascript.options.showInConsole
the preference javascript.options.showinconsole controls whether errors or warnings in chrome code are shown in the error console. type:boolean default value: false (true in debug builds) exists by default: yes application support:firefox 1.0 status: active introduction:2002-02-26 bugs: bug 125181 bug 337875 values false only errors and warnings from content code are shown. true (default) errors and warnings from both chrome and content are shown in the error console. note: since the web console was introduced in firefox 4 specifically for debugging content, the default value for this preference has changed to true as of gecko 2.0. ...
mail.tabs.drawInTitlebar
starting in thunderbird 17.0, the tabs are drawn in the title bar. the old behavior can be restored by setting the preference mail.tabs.drawintitlebar to false. type:boolean default value: true exists by default: yes application support:thunderbird 17.0 status: active; last updated 2012-09-17 introduction: pushed to daily on 2012-08-08 bugs: bug 771816 values true (default) the tabs are drawn in the title bar of the mail program. false the tabs are drawn in a separate tab bar, and the title bar shows the title of the current tab (e.g. the subject of the currently selected mail). ...
nglayout.debug.disable xul fastload
the preference nglayout.debug.disable_xul_fastload controls whether or not xul fastload is used. never set nglayout.debug.disable_xul_fastload to true in a production environment; it exists solely to aid in debugging. in particular, add-ons should never change this preference.. type:boolean default value: false (true in debug builds) exists by default: yes application support:? status: active introduction:? bugs: values false (default) xul fastload is used. true xul fastload is disabled. ...
reader.parse-on-load.force-enabled
the preference reader.parse-on-load.force-enabled controls if the reader mode used in firefox mobile should be enabled independent of the memory available in the device. by default, the reader mode in firefox mobile is only enabled if the memory is greater than 384mb. type:boolean default value: false exists by default: yes application support:firefox mobile 23.0 status: active; last updated 2013-05-11 introduction: pushed to nightly on 2013-05-06 bugs: bug 867875 values true reader mode is enabled independent of memory available. false (default) reader mode is only enabled if memory available exceeds a threshold (currenlty 384mb). ...
ui.SpellCheckerUnderline
ui.spellcheckerunderline holds the colour which is used to underline words not recognized by the spellchecker. type:string default value:#ff0000 exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2009-04-03 bugs: bug 338209 values a color code like #ff0000 for red. ...
ui.SpellCheckerUnderlineStyle
ui.spellcheckerunderlinestyle holds the style which is used to underline words not recognized by the spellchecker. type:integer default value:5 exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-02-22 introduction: pushed to nightly on 2009-04-03 bugs: bug 338209 values the values are defined in nsstyleconsts.h. 0 no underlining 1 dotted 2 dashed 3 single solid line 4 two solid lines 5 (default) wavy ...
ui.alertNotificationOrigin
ui.alertnotificationorigin controls the position and direction from which popup notifications invoked by nsialertsservice are sliding in. ...
ui.textSelectBackground
ui.textselectbackground saves the color in which the background of a text selection in the user interface or in content will be styled. ...
ui.textSelectForeground
ui.textselectforeground saves the color in which the text of a text selection in the user interface or the content will be styled. ...
ui.tooltipDelay
ui.tooltipdelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip. type:integer default value:500 exists by default: no application support: gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2011-12-15 bugs: bug 204786 values integer (milliseconds, default: 500) the time for delay between the mouse stopping over the element and the tooltip appearing is stored in milliseconds and the default value is 500ms. ...
view_source.syntax_highlight
the preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted. type:boolean default value: true exists by default: yes application support:firefox 1.0 status: active introduction: bugs: bug 52154 values true (default) syntax hightlighting is enabled. false syntax hightlighting is disabled. ...
AsyncTestUtils extended framework
nd $label2, but that is not what we show to the user. removetag(atagkey) removes the given tag from all the messages in the set. see the addtag notes. setjunk(abejunk) sets the junk score for the messages in the set as junk (true) / not junk (false). this does not involves the bayesian classifier and does not do anything like moving the message to the junk folder. it does, however, send a junkstatuschanged notification via the nsimsgfoldernotificationservice's itemevent mechanism. set manipulation union(aotherset) take the union of this set and the provided other set and return the (new, not modified) result. you should stop using both the message set that you called this on and the other set that you passed in unless you are very careful. namely, if you use async_move_messages / async...
Nonblocking IO In NSPR
<tt>pr_would_block_error</tt> (a nonblocking socket). the tcp connection on that socket has been closed (end of stream). these two cases can be distinguished by <tt>pr_poll()</tt>. if <tt>pr_poll()</tt> reports that the socket is readable (i.e., <tt>pr_poll_read</tt> is set in <tt>out_flags</tt>), and <tt>pr_available()</tt> returns 0, this means that the socket connection is closed. current status implemented across all supported platforms. original document information author: wan-teh chang last updated date: october 30, 1997 ...
I/O Functions
accesses to the file to be accomplished by normal memory accesses. memory-mapped i/o functions are currently implemented for unix, linux, mac os x, and win32 only. pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous pipe function pr_createpipe polling functions this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special kind of file descriptor. the only i/o operation you can perform on a pollable event is to poll it with the pr_poll_read flag. you cannot read from or write to a pollable event. the purpose of a pollable event is to combine event waiting with i/o waiting in a single pr_poll call. pollable events are implemented using a pipe or a pair of tcp socke...
Introduction to NSPR
lutions are to turn off preemption (a runtime decision) or to preempt global threads only. interrupting threads nspr threads are interruptable, with some constraints and inconsistencies. to interrupt a thread, the caller of pr_interrupt must have the nspr reference to the target thread (prthread*). when the target is interrupted, it is rescheduled from the point at which it was blocked, with a status error indicating that it was interrupted. nspr recognizes only two areas where a thread may be interrupted: waiting on a condition variable and waiting on i/o. in the latter case, interruption does cancel the i/o operation. in neither case does being interrupted imply the demise of the thread. nspr thread synchronization thread synchronization has two aspects: locking and notification. locking ...
PL_HashTableRemove
...
PRCallOnceFN
defines the signature of the function a client must implement. syntax #include <prinit.h> typedef prstatus (pr_callback *prcalloncefn)(void); description the function is called to perform the initialization desired. the function is expected to return a prstatus indicating the outcome of the process. ...
PRCallOnceType
structure for tracking initialization. syntax #include <prinit.h> typedef struct prcalloncetype { printn initialized; print32 inprogress; prstatus status; } prcalloncetype; fields the structure has these fields: initialized if not zero, the initialization process has been completed. inprogress if not zero, the initialization process is currently being executed. calling threads that observe this status block until inprogress is zero. status an indication of the outcome of the initialization process. description the client is responsible for initializing the prcalloncetype structure to all zeros. this initialization must be accomplished before any threading issues exist. ...
PR_Access
how specifies which access permission to check for. use one of the following values: pr_access_read_ok. test for read permission. pr_access_write_ok. test for write permission. pr_access_exists. check existence of file. returns one of the following values: if the requested access is permitted, pr_success. ...
PR_Bind
addr a pointer to a prnetaddr object representing the address to which the socket will be bound. returns the function returns one of the following values: upon successful binding of an address to a socket, pr_success. if unsuccessful, pr_failure. further information can be obtained by calling pr_geterror. description when a new socket is created, it has no address bound to it. pr_bind assigns the specified address (also known as name) to the socket. ...
PR_CExitMonitor
returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. this may indicate that the address parameter is invalid or that the calling thread is not in the monitor. ...
PR_CNotify
the calling thread must be in the monitor defined by the value of the address. returns pr_success indicates that the calling thread is the holder of the mutex for the monitor referred to by the address parameter. pr_failure indicates that the monitor has not been entered by the calling thread. ...
PR_CNotifyAll
the calling thread must be in the monitor at the time pr_cnotifyall is called. returns pr_success indicates that the referenced monitor was located and the calling thread was in the monitor. ...
PR_CWait
timeout the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled. if you specify pr_interval_no_timeout, the function returns if and only if the object is notified. ...
PR_CallOnce
ensures that subsystem initialization occurs only once. syntax prstatus pr_callonce( prcalloncetype *once, prcalloncefn func); parameters pr_callonce has these parameters: once a pointer to an object of type prcalloncetype. initially (before any threading issues exist), the object must be initialized to all zeros. from that time on, the client should consider the object read-only (or even opaque) and allow the runtime to manipulate its content appropriately. func a pointer to the function the calling client has designed to perform the subsystem initialization. the function will be called once, at most, for each subsystem to be initialized. it should return a prstatus indicating the result of the initialization process. while the first thread executes this function, other threads...
PR_Cleanup
if the calling thread of this function is not the primordial thread, pr_failure. description pr_cleanup must be called by the primordial thread near the end of the main function. pr_cleanup attempts to synchronize the natural termination of the process. it does so by blocking the caller, if and only if it is the primordial thread, until all user threads have terminated. when the primordial thread returns from main, the process immediately and silently exits. ...
PR_Close
returns one of the following values: if file descriptor is closed successfully, pr_success. if the file descriptor is not closed successfully, pr_failure. description the file descriptor may represent a normal file, a socket, or an end point of a pipe. ...
PR_CloseDir
returns if successful, pr_success. if unsuccessful, pr_failure. the reason for the failure can be retrieved via pr_geterror. description when a prdir object is no longer needed, it must be closed and freed with a call to pr_closedir call. ...
PR_CloseFileMap
returns the function returns one of the following values: if the memory region is successfully unmapped, pr_success. if the memory region is not successfully unmapped, pr_failure. the error code can be retrieved via pr_geterror. ...
PR_CloseSharedMemory
closes a shared memory segment identified by name. syntax #include <prshm.h> nspr_api( prstatus ) pr_closesharedmemory( prsharedmemory *shm ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory. returns prstatus. ...
PR_Connect
addr a pointer to the address of the peer to which the socket is to be connected. timeout a value of type printervaltime specifying the time limit for completion of the connect operation. returns the function returns one of the following values: upon successful completion of connection setup, pr_success. if unsuccessful, pr_failure. further information can be obtained by calling pr_geterror. ...
PR_ConnectContinue
out_flags the out_flags field of the poll descriptor returned by pr_poll(). returns if the nonblocking connect has successfully completed, pr_connectcontinue returns pr_success. if pr_connectcontinue() returns pr_failure, call pr_geterror(): - pr_in_progress_error: the nonblocking connect is still in progress and has not completed yet. the caller should poll the file descriptor for the in_flags pr_poll_write|pr_poll_except and retry pr_connectcontinue later when pr_poll() returns. ...
PR_CreatePipe
on return, this parameter contains the file descriptor for the read end of the pipe. writepipe a pointer to a prfiledesc pointer. on return, this parameter contains the file descriptor for the write end of the pipe. returns the function returns one of these values: if the pipe is successfully created, pr_success. ...
PR_Delete
returns one of the following values: if file is deleted successfully, pr_success. if the file is not deleted, pr_failure. description pr_delete deletes a file with the specified pathname name. ...
PR_DeleteSharedMemory
deletes a shared memory segment identified by name. syntax #include <prshm.h> nspr_api( prstatus ) pr_deletesharedmemory( const char *name ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory. returns prstatus. ...
PR_DestroyPollableEvent
returns the function returns one of the following values: if successful, pr_success. ...
PR_DetachSharedMemory
unmaps a shared memory segment identified by name. syntax #include <prshm.h> nspr_api( prstatus ) pr_detachsharedmemory( prsharedmemory *shm, void *addr ); parameters the function has these parameters: shm the handle returned from pr_opensharedmemory. addr the address to which the shared memory segment is mapped. returns prstatus. ...
PR_ExitMonitor
the monitor object referenced must be one for which the calling thread currently holds the lock. returns the function returns one of the following values: if successful, pr_success. if unsuccessful (the calling thread has not entered the monitor), pr_failure. ...
PR_ExportFileMapAsString
creates a string identifying a prfilemap. syntax #include <prshma.h> nspr_api( prstatus ) pr_exportfilemapasstring( prfilemap *fm, prsize bufsize, char *buf ); define pr_filemap_string_bufsize 128 parameters the function has the following parameters: fm a pointer to the prfilemap to be represented as a string. bufsize sizeof(buf) buf a pointer to abuffer of length pr_filemap_string_bufsize. returns prstatus description creates an identifier, as a string, from a prfilemap object previously created with pr_openanonfilemap. ...
PR_GetFileInfo
info a pointer to a file information object (see prfileinfo). on output, pr_getfileinfo writes information about the given file to the file information object. returns one of the following values: if the file information is successfully obtained, pr_success. if the file information is not successfully obtained, pr_failure. ...
PR_GetFileInfo64
info a pointer to a 64-bit file information object (see prfileinfo64). on output, pr_getfileinfo64 writes information about the given file to the file information object. returns one of the following values: if the file information is successfully obtained, pr_success. if the file information is not successfully obtained, pr_failure. ...
PR_GetHostByAddr
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output. all of the pointers in the hostentry structure point to data saved in this buffer. this buffer is referenced by the runtime during a call to pr_enumeratehostent. bufsize number of bytes in the buf parameter. the buffer must be at least pr_netdb_buf_size bytes. hostentry this structure is allocated by the caller. ...
PR_GetHostByName
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output. all of the pointers in the hostentry structure point to data saved in this buffer. this buffer is referenced by the runtime during a call to pr_enumeratehostent. bufsize number of bytes in the buf parameter. the buffer must be at least pr_netdb_buf_size bytes. hostentry this structure is allocated by the caller. ...
PR_GetOpenFileInfo
info a pointer to a prfileinfo object. on output, information about the given file is written into the file information object. returns the function returns one of the following values: if file information is successfully obtained, pr_success. if file information is not successfully obtained, pr_failure. ...
PR_GetOpenFileInfo64
info a pointer to a prfileinfo64 object. on output, information about the given file is written into the file information object. returns the function returns one of the following values: if file information is successfully obtained, pr_success. if file information is not successfully obtained, pr_failure. description pr_getopenfileinfo64 is the 64-bit version of pr_getopenfileinfo. ...
PR_GetPeerName
addr on return, the address of the peer connected to the socket. returns if successful, pr_success. if unsuccessful, pr_failure. ...
PR_GetProtoByName
buffer a pointer to a scratch buffer for the runtime to return result. this buffer is allocated by the caller. bufsize number of bytes in the buffer parameter. the buffer must be at least pr_netdb_buf_size bytes. result on input, a pointer to a prprotoent structure. on output, this structure is filled in by the runtime if the function returns pr_success. ...
PR_GetProtoByNumber
buffer a pointer to a scratch buffer for the runtime to return result. this buffer is allocated by the caller. bufsize number of bytes in the buffer parameter. the buffer must be at least pr_netdb_buf_size bytes. result on input, a pointer to a prnetaddr structure. on output, this structure is filled in by the runtime if the function returns pr_success. ...
PR_GetSockName
addr on return, the address of the socket. returns if successful, pr_success. if unsuccessful, pr_failure. ...
PR_GetSocketOption
data a pointer to a structure of type prsocketoptiondata. on input, the option field of this structure must be set to indicate which socket option to retrieve for the socket represented by the fd parameter. on output, this structure contains the requested socket option data. returns if successful, pr_success. if unsuccessful, pr_failure. ...
PR ImportTCPSocket
/pprio.h" to stress the fact that this function depends on the internals of the nspr implementation. the caller needs to understand what nspr will do to the native file descriptor and make sure that nspr can use the native file descriptor successfully. for example, on posix systems, nspr will put the native file descriptor (an int) in non-blocking mode by calling fcntl to set the o_nonblock file status flag on the native file descriptor, and then nspr will call socket functions such as recv, send, and poll on the native file descriptor. the caller must not do anything to the native file descriptor before the pr_importtcpsocket call that will prevent the native file descriptor from working in non-blocking mode. warning in theory, code that uses pr_importtcpsocket may break when nspr's implemen...
PR_InitializeNetAddr
this must be pr_ipaddrnull, pr_ipaddrany, or pr_ipaddrloopback. port the port number to be assigned in the network address structure. the value is specified in host byte order. ...
PR_IntervalNow
ference between two times). pr_intervalnow() is both very efficient and nonblocking, so it is appropriate to use (for example) while holding a mutex. the most common use for pr_intervalnow() is to establish an epoch and test for the expiration of intervals. in this case, you typically call pr_intervalnow() in a sequence that looks like this: pruint32 interval = ... ; // milliseconds // ... ...
PR_JoinThread
returns the function returns one of the following values: if successful, pr_success if unsuccessful--for example, if no joinable thread can be found that corresponds to the specified target thread, or if the target thread is unjoinable--pr_failure. description pr_jointhread is used to synchronize the termination of a thread. ...
PR_Listen
backlog the maximum length of the queue of pending connections. returns the function returns one of the following values: upon successful completion of listen request, pr_success. if unsuccessful, pr_failure. further information can be obtained by calling pr_geterror. description pr_listen turns the specified socket into a rendezvous socket. ...
PR_MkDir
all the path components up to but not including the leaf component must already exist. mode the access permission bits of the file mode of the new directory if the file is created when pr_create_file is on. caveat: the mode parameter is currently applicable only on unix platforms. it may be applicable to other platforms in the future. possible values include the following: 00400. read by owner. 00200. write by owner. 00100. search by owner. ...
PR_NetAddrToString
string a buffer that will hold the converted string on output. size the size of the result buffer (string). returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. you can retrieve the reason for the failure by calling pr_geterror. ...
PR_NewThreadPrivateIndex
you use this index with pr_setthreadprivate and pr_getthreadprivate. destructor specifies a destructor function prthreadprivatedtor for the private data associated with the index. ...
PR_Notify
the monitor object referenced must be one for which the calling thread currently holds the lock. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. description notification of a monitor signals the change of state of some monitored data. the changing of that data and the notification must all be performed while in the monitor. ...
PR_NotifyAll
the monitor object referenced must be one for which the calling thread currently holds the lock. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. description a call to pr_notifyall causes all of the threads waiting on the monitor to be scheduled to be promoted to a ready state. if no threads are waiting, the operation is no-op. ...
PR_NotifyAllCondVar
if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable), pr_failure. description the calling thread must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition. ...
PR_NotifyCondVar
returns the function returns one of the following values: if successful, pr_success. if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable), pr_failure. description the calling thread must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition. notification of a condition variable signals a change of state in some monitored data. ...
PR_ProcessAttrSetInheritableFileMap
prepare filemap for export to my children processes via pr_createprocess. syntax #include <prshma.h> nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname ); parameters the function has the following parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess. fm pointer to a prfilemap structure to be passed to the child process. shmname pointer to the name for the prfilemap; used by child. returns prstatus description pr_processattrsetinheritablefilemap connects the prfilemap to prprocessattr with shmname. a subsequent call to pr_createprocess makes the prfilemap importable by the child process. note: this function is not implemented. ...
PR_ProcessExit
causes an immediate, nongraceful, forced termination of the process. syntax #include <prinit.h> void pr_processexit(printn status); parameter pr_processexit has one parameter: status the exit status code of the process. ...
PR_PushIOLayer
id a prdescidentity object for the layer on the stack above which the new layer is to be added. layer a pointer to a prfiledesc object representing the new layer to be added to the stack. returns the function returns one of the following values: if the layer is successfully pushed onto the stack, pr_success. if the layer is not successfully pushed onto the stack, pr_failure. use pr_geterror to get additional information regarding the reason for the failure. ...
PR_Rename
to the new name of the file. returns one of the following values: if file is successfully renamed, pr_success. if file is not successfully renamed, pr_failure. description pr_rename renames a file from its old name (from) to a new name (to). if a file with the new name already exists, pr_rename fails with the error code pr_file_exists_error. ...
PR_RmDir
returns if successful, pr_success. if unsuccessful, pr_failure. the actual reason can be retrieved via pr_geterror. description pr_rmdir removes the directory specified by the pathname name. the directory must be empty. ...
PR_SetLibraryPath
the syntax of the pathname is not defined, nor whether that pathname should be absolute or relative. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. this may indicate that the function cannot allocate sufficient storage to make a copy of the path string description this function registers a default library pathname with the runtime. ...
PR_SetPollableEvent
returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. ...
PR_SetSocketOption
data a pointer to a structure of type prsocketoptiondata specifying the options to set. returns if successful, pr_success. if unsuccessful, pr_failure. the reason for the failure can be obtained by calling pr_geterror. ...
PR_SetThreadPrivate
priv the per-thread private data, or more likely, a pointer to the data. returns the function returns one of the following values: if successful, pr_success. if the index is invalid, pr_failure. description if the thread already has non-null private data associated with it, and if the destructor function for the index is known (not null), nspr calls the destructor function associated with the index before setting the new data value. the pointer at the index is swapped with null. ...
PR_Shutdown
how the kind of disallowed operations on the socket. possible values include the following: pr_shutdown_rcv. further receives will be disallowed. pr_shutdown_send. further sends will be disallowed. pr_shutdown_both. further sends and receives will be disallowed. returns the function returns one of the following values: upon successful completion of shutdown request, pr_success. ...
PR_Sleep
returns calling pr_sleep with a parameter equivalent to pr_interval_no_timeout is an error and results in a pr_failure error. description pr_sleep simply waits on a condition for the amount of time specified. if you set ticks to pr_interval_no_wait, the thread yields. if ticks is not pr_interval_no_wait, pr_sleep uses an existing lock, but has to create a new condition for this purpose. ...
PR_StringToNetAddr
addr on output, the equivalent network address. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. you can retrieve the reason for the failure by calling pr_geterror. description for ipv4 addresses, the input string represents numbers in the internet standard "." notation. ...
PR_Sync
returns the function returns one of the following values: on successful completion, pr_success. if the function fails, pr_failure. ...
PR_UnloadLibrary
returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. use pr_geterror to find the reason for the failure. description this function undoes the effect of a pr_loadlibrary. ...
PR_Unlock
releases a specified lock object. releasing an unlocked lock results in an error. attempting to release a lock that was locked by a different thread causes undefined behavior. syntax #include <prlock.h> prstatus pr_unlock(prlock *lock); parameter pr_unlock has one parameter: lock a pointer to a lock object to be released. returns the function returns one of the following values: if successful, pr_success. if unsuccessful (for example, if the caller does not own the lock), pr_failure. see also pr_lock ...
PR_Unmap
len the length, in bytes, of the memory region. returns the function returns one of the following values: if the memory region is successfully unmapped, pr_success. if the memory region is not successfully unmapped, pr_failure. the error code can be retrieved via pr_geterror. ...
PR_Wait
the monitor object referenced must be one for which the calling thread currently holds the lock. ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled. ...
PR_WaitCondVar
timeout the value pr_interval_no_timeout requires that a condition be notified (or the thread interrupted) before it will resume from the wait. the value pr_interval_no_wait causes the thread to release the lock, possibly causing a rescheduling within the runtime, then immediately attempt to reacquire the lock and resume. returns the function returns one of the following values: if successful, pr_success. ...
PR_WaitForPollableEvent
blocks the calling thread until the pollable event is set, and then atomically unsetting the event before returning. syntax nspr_api(prstatus) pr_waitforpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent. returns the function returns one of the following values: if successful, pr_success. if unsuccessful, pr_failure. the reason for the failure can be retrieved via pr_geterror. ...
PR_dtoa
mode the type of conversion to employ. ndigits the number of digits desired in the output string. decpt a pointer to a memory location where the runtime will store the offset, relative to the beginning of the output string, of the conversion's decimal point. sign a location where the runtime can store an indication that the conversion was of a negative value. ...
NSPR API Reference
locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities controlling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants ...
An overview of NSS Internals
ady have two layers, the basic nspr layer and an ssl library layer. the mozilla applications define a third layer where application specific processing is performed. you can find more details in the nspr reference documents. nss occassionally has to create outbound network connections, in addition to the connections requested by the application. examples are retrieving ocsp (online certificate status protocol) information or downloading a crl (certificate revocation list). however, nss doesn't have an implementation to work with network proxies. if you must support proxies in your application, you are able to register your own implementation of an http request callback interface, and nss can use your application code that supports proxies. when using hashing, encryption, and decryption fun...
Certificate functions
xr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailaddress mxr 3.7 and later cert_getnextgeneralname mxr 3.10 and later cert_getnextnameconstraint mxr 3.10 and later cert_getocspresponsestatus mxr 3.6 and later cert_getocspstatusforcertid mxr 3.6 and later cert_getoidstring mxr 3.9 and later cert_getorgname mxr 3.2 and later cert_getorgunitname mxr 3.2 and later cert_getocspauthorityinfoaccesslocation mxr 3.4 and later cert_getpkixverifynistrevocationpolicy mxr 3.12 and later cert_g...
4.3 Release Notes
method (see needslogin) support hmacsha256, hmacsha384, and hmacsha512 (see hmactest.java) support for all nss 3.12 initialization options (see initializationvalues) new ssl error codes (see http://mxr.mozilla.org/security/sour...util/sslerrs.h) ssl_error_unsupported_extension_alert ssl_error_certificate_unobtainable_alert ssl_error_unrecognized_name_alert ssl_error_bad_cert_status_response_alert ssl_error_bad_cert_hash_value_alert new tls cipher suites (see http://mxr.mozilla.org/security/sour...sslsocket.java): tls_rsa_with_camellia_128_cbc_sha tls_dhe_dss_with_camellia_128_cbc_sha tls_dhe_rsa_with_camellia_128_cbc_sha tls_rsa_with_camellia_256_cbc_sha tls_dhe_dss_with_camellia_256_cbc_sha tls_dhe_rsa_with_camellia_256_cbc_sha not...
JSS 4.4.0 Release Notes
notable changes in jss 4.40 picks up work done downstream for fedora and rhel and used by various linux distributions with includes:. support for ipv6. support for tls v1.1 and tls v1.2 via nss though jss. bugs fixed in jss 4.4.0 this bugzilla query returns all the bugs fixed in nss 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=jss&target_milestone=4.4&target_milestone=4.4&bug_status=resolved&resolution=fixed documentation build instructions for jss at https://hg.mozilla.org/projects/jss/file/tip/readme platform information you can check out the source from mercurial via hg clone -r 055aa3ce8a61 https://hg.mozilla.org/projects/jss jss 4.4.0 works with openjdk versions 1.7 or higher we suggest the latest - openjdk 1.8. jss 4.4.0 requires nss 3.12.5 or higher t...
NSS 3.12.5 release_notes
n depends on renegotiation feature, it can be enabled by setting the environment variable nss_ssl_enable_renegotiation to 1. by setting this environmental variable, the fix provided by these patches will have no effect and the application may become vulnerable to the issue. this default setting can also be changed within the application by using the following existing api functions: secstatus ssl_optionset(prfiledesc *fd, print32 option, prbool on) secstatus ssl_optionsetdefault(print32 option, prbool on) there is now a new value for "option", which is: ssl_enable_renegotiation the corresponding new values for ssl_enable_renegotiation are: ssl_renegotiate_never: never renegotiate at all (default). ssl_renegotiate_unrestricted: renegotiate without restri...
NSS 3.12.6 release notes
certdistnames: duplicate distinguished name array. cert_distnamesfromcertlist: generate an array of distinguished names from a list of certs. in ocsp.h cert_cacheocspresponsefromsidechannel: this function is intended for use when ocsp responses are provided via a side-channel, i.e. tls ocsp stapling (a.k.a. the status_request extension). in ssl.h ssl_getimplementedciphers ssl_getnumimplementedciphers ssl_handshakenegotiatedextension new error codes in sslerr.h ssl_error_unsafe_negotiation ssl_error_r...
NSS 3.14.1 release notes
bug 810582 - tls false start is now only used with servers that negotiate a cipher suite that supports forward secrecy. note: the criteria for false start may change again in future nss releases. bugs fixed in nss 3.14.1 the following bugzilla query returns all of the bugs fixed in nss 3.14.1: https://bugzilla.mozilla.org/buglist.cgi?list_id=5216669;resolution=fixed;query_format=advanced;bug_status=resolved;bug_status=verified;target_milestone=3.14.1;product=nss compatability nss 3.14.1 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.14.1 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss publ...
NSS 3.24 release notes
onses, and ssl_setsignedcerttimestamps. ssl_configservercert automatically determines the certificate type from the certificate and private key. the caller is no longer required to use sslkeatype explicitly to select a "slot" into which the certificate is configured (which incorrectly identifies a key agreement type rather than a certificate). separate functions for configuring online certificate status protocol (ocsp) responses or signed certificate timestamps are not needed, since these can be added to the optional sslextraservercertdata struct provided to ssl_configservercert. also, partial support for rsa probabilistic signature scheme (rsa-pss) certificates has been added. although these certificates can be configured, they will not be used by nss in this version. for functions that use t...
NSS 3.31 release notes
runtime (nspr) 4.15 or newer. nss 3.31 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_31_rtm/src/ new in nss 3.31 new functionality allow certificates to be specified by rfc7512 pkcs#11 uris. allow querying a certificate object for its temporary or permanent storage status in a thread safe way. new functions in cert.h cert_getcertisperm - retrieve the permanent storage status attribute of a certificate in a thread safe way. cert_getcertistemp - retrieve the temporary storage status attribute of a certificate in a thread safe way. in pk11pub.h pk11_findcertfromuri - find a certificate identified by the given uri. pk11_findcertsfromuri -...
NSS Sample Code sample2
* this code uses the simplest of the init functions, which does not * require a nss database to exist */ rv = nss_nodb_init("."); if (rv ...
NSS Sample Code sample4
esponsible for returning the password to the nss * key database. for example purposes, this function hardcodes the password. ...
NSS Sample Code sample5
pittmmdl1v6t//x1xpcga7nrsldhz4widaqabakeajh8+4qncwcmgivnm6ytbpqt+k/jeoexg2bqhjojvnxn3fazgcefxvpuibcjvfaijs9ybcmozzrato0+k2hwnoqihaoc4nvbo8fqhzs4yxm1m86kml47fa9ui//oufbhladw1aiea2dbmixnsbokb+ohver69p0gnewlvcjc9bjdvfdlvslcciqcptv3vgyjv2vdwxqzqahc+yb4gigaqoqbcbmjd3lyflqiga+vtydunoqwtzwve4grf7izk2v5ccnhg3gr5rgwxn58cigccaforruksm66isg0iti04g9v/w+wmx91wjeeb+qbz" int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; certsubjectpublickeyinfo *spki = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; char *pubkstr = base64_encoded_subjectpublickeyinfo; char *pvtkstr = base64_encoded_privatekeyin...
NSS Sample Code sample6
esponsible for returning the password to the nss * key database. for example purposes, this function hardcodes the password. * in a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; /* initialize nss */ pk11_setpasswordfunc(passwdcb); /* the nss db must be initialized read-write since we'll be creating * keys in it. once keys are generated, it can be opened without read-write * subsequently (nss_init). */ rv = nss_initreadwrite("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); ...
nss tech note1
ders have a lot in common. quickder was written to be as compatible as possible with the classic decoder, in order to ease migration to it in areas of critical performance bottlenecks. for this reason, i will first describe all the common functionality of the two decoders, before outlining their differences. the main non-streaming apis for these two decoders have an identical prototype : secstatus sec_asn1decodeitem(prarenapool *pool, void *dest, const sec_asn1template *t, secitem *item); secstatus sec_quickderdecodeitem(prarenapool* arena, void* dest, const sec_asn1template* templateentry, secitem* src); here is a description of the arguments : secitem* src† is a structure containing a pointer to the binary data to be decoded, as well as its size. const sec_asn1template* tem...
Overview of NSS
rivate keys, certificates, and other secret material. s/mime (rfc 2311 and rfc 2633). ietf message specification (based on the popular internet mime standard) that provides a consistent way to send and receive signed and encrypted mime data. x.509 v3. itu standard that governs the format of certificates used for authentication in public-key cryptography. ocsp (rfc 2560). the online certificate status protocol (ocsp) governs real-time confirmation of certificate validity. pkix certificate and crl profile (rfc 3280). the first part of the four-part standard under development by the public-key infrastructure (x.509) working group of the ietf (known at pkix) for a public-key infrastructure for the internet. rsa, dsa, ecdsa, diffie-hellman, ec diffie-hellman, aes, triple des, des, rc2, rc4, sha-...
FC_GetTokenInfo
rminated. manufacturerid: id of the device manufacturer, "mozilla foundation", padded with spaces to 32 characters and not null-terminated. model: model of the device, "nss 3", padded with spaces to 16 characters and not null-terminated. serialnumber: the device's serial number as a string, "0000000000000000", 16 characters and not null-terminated. flags: bit flags indicating capabilities and status of the device. ckf_rng (0x00000001): this device has a random number generator ckf_write_protected (0x00000002): this device is read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token ca...
FIPS mode of operation
dsa domain parameters (pqg) fc_generatekeypair: dsa, rsa, and ecdsa. performs pair-wise consistency test. fc_wrapkey: rsa key wrapping fc_unwrapkey: rsa key wrapping fc_derivekey: diffie-hellman, ec diffie-hellman random number generation functions fc_seedrandom fc_generaterandom: performs continuous random number generator test. parallel function management functions fc_getfunctionstatus fc_cancelfunction ...
NSS tools : certutil
o apply when validating a certificate with the -v option. the contexts are the following: · c (as an ssl client) · v (as an ssl server) · l (as an ssl ca) · a (as any ca) · y (verify ca) · s (as an email signer) · r (as an email recipient) · o (as an ocsp status responder) · j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is ...
NSS tools : crlutil
name crlutil — list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl. synopsis crlutil [options] [[arguments]] status this documentation is still work in progress. please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl. the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see cert...
NSS tools : vfychain
l recipient, 6=object signer, 9=protectedobjectsigner, 10=ocsp responder, 11=any ca -v verbose mode. prints root cert subject(double the argument for whole root cert info) -w password database password -w pwfile password file revocation options for pkix api (invoked with -pp options) is a collection of the following flags: [-g type [-h flags] [-m type [-s flags]] ...] ... where: -g test-type sets status checking test type. possible values are "leaf" or "chain" -g test type sets status checking test type. possible values are "leaf" or "chain". -h test flags sets revocation flags for the test type it follows. possible flags: "testlocalinfofirst" and "requirefreshinfo". -m method type sets method type for the test type it follows. possible types are "crl" and "ocsp". -s method flags sets revocation...
sslintro.html
authentication and encryption happen automatically whenever you use the communication functions from the nspr library. a server application typically uses these functions to establish a connection: pr_bind pr_listen pr_accept pr_getsockname a client application typically uses these functions to establish a connection: pr_gethostbyname pr_enumeratehostent pr_connect pr_getconnectstatus when an application imports a socket into ssl after the tcp connection on that socket has already been established, it must call ssl_resethandshake to determine whether ssl should behave like an ssl client or an ssl server. note that this step would not be necessary if the socket weren't already connected. for an ssl socket that is configured before it is connected, ssl figures this out when the...
SSL functions
andshakewithtimeout mxr 3.11.4 and later ssl_resethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_revealcert mxr 3.2 and later ssl_revealpinarg mxr 3.2 and later ssl_revealurl mxr 3.2 and later ssl_securitystatus mxr 3.2 and later ssl_setmaxservercachelocks mxr 3.4 and later ssl_setpkcs11pinarg mxr 3.2 and later ssl_setsockpeerid mxr 3.2 and later ssl_seturl mxr 3.2 and later ssl_shutdownserversessionidcache mxr 3.7.4 and later ...
S/MIME functions
3.2 and later nss_cmssignerinfo_getsignercommonname mxr 3.2 and later nss_cmssignerinfo_getsigneremailaddress mxr 3.2 and later nss_cmssignerinfo_getsigningcertificate mxr 3.2 and later nss_cmssignerinfo_getsigningtime mxr 3.2 and later nss_cmssignerinfo_getverificationstatus mxr 3.2 and later nss_cmssignerinfo_getversion mxr 3.2 and later nss_cmssignerinfo_includecerts mxr 3.2 and later nss_cmsutil_verificationstatustostring mxr 3.2 and later nss_smimesignerinfo_savesmimeprofile mxr 3.4 and later nss_smimeutil_findbulkalgforrecip...
TLS Cipher Suite Discovery
number of entries in the above table. */ ssl_import const pruint16 ssl_numimplementedciphers; of course, the raw integer numbers of the cipher suites are not likely to be known to most users, so libssl provides a function by which the application can obtain a wealth of information about any supported cipher suite, by its number. this function is declared in "ssl.h" as follows: ssl_import secstatus ssl_getciphersuiteinfo( pruint16 ciphersuite, sslciphersuiteinfo *info, pruintn len); the application provides the cipher suite number for which it wants information, the address of a block of memory allocated to receive that information, and the size in bytes of that block of memory. ssl_getciphersuiteinfo fills that caller-supplied memory with information from the...
NSS_3.12.3_release_notes.html
y (wildcards) bug 334678: prng_fips1861.c redefines the macro bsize on hp-ux bug 335016: mpp_pprime (miller-rabin probabilistic primality test) may choose 0 or 1 as the random integer bug 347037: make shlibsign depend on the softoken only bug 371522: auto-update of crls stops after first update bug 380784: pk11mode in non fips mode failed. bug 394077: libpkix need to return revocation status of a cert bug 412468: modify certutil bug 417092: modify pkix_certselector api to return an error if cert was rejected. bug 426413: audit messages need distinct types bug 438870: free freebl hashing code of dependencies on nspr and libutil bug 439115: db merge allows nickname conflicts in merged db bug 439199: sse2 instructions for bignum are not implemented on windows 32-bit bug 44...
certutil
rust attributes in a certificate database. -u certusage specify a usage context to apply when validating a certificate with the -v option. the contexts are the following: o c (as an ssl client) o v (as an ssl server) o s (as an email signer) o r (as an email recipient) o o (as an ocsp status responder) o j (as an object signer) -v valid-months set the number of months a new certificate will be valid. the validity period begins at the current system time unless an offset is added or subtracted with the -w option. if this argument is not used, the default validity period is three months. when this argument is us...
NSS tools : vfychain
rints root cert subject(double the argument for whole root cert info) -w password database password -w pwfile password file revocation options for pkix api (invoked with -pp options) is a collection of the following flags: [-g type [-h flags] [-m type [-s flags]] ...] ... where: -g test-type sets status checking test type. possible values are "leaf" or "chain" -g test type sets status checking test type. possible values are "leaf" or "chain". -h test flags sets revocation flags for the test type it follows. possible flags: "testlocalinfofirst" and "requirefreshinfo". -m method type sets method type for the test type it...
Rhino shell
en. readurl(url [, charactercoding]) open an input connection to the given string url, read all its bytes and convert them to a string using the specified character coding or default character coding if explicit coding argument is not given. runcommand(commandname, [arg, ...] [options]) execute the specified command with the given argument and options as a separate process and return the exit status of the process. usage: runcommand(command) runcommand(command, arg1, ..., argn) runcommand(command, arg1, ..., argn, options) all except the last arguments to runcommand are converted to strings and denote command name and its arguments. if the last argument is a javascript object, it is an option object. otherwise it is converted to string denoting the last argument and options objects assum...
Creating JavaScript jstest reftests
c(); asserteq(arr[10000], 'item', 'gc must not wipe out sparse array elements'); } else { print('test skipped: no gc function'); } reportcompare(0, 0, 'ok'); handling abnormal test terminations some tests can terminate abnormally even though the test has technically passed. earlier we discussed the deprecated approach of using the -n naming scheme to identify tests whose passed, failed status is flipped by the post test processing code in jsdriver.pl and post-process-logs.pl. a different approach is to use the expectexitcode(exitcode) function which outputs a string: --- note: in this testcase, we expect exit code <exitcode> --- that tells the post-processing scripts jsdriver.pl or post-process-logs.pl that the test passes if the shell or browser terminates with that exit code. mult...
Hacking Tips
ce. this should show you the point at which the oom is incorrectly handled, which will be a few frames up from the breakpoint. note: if you are on linux it may be simpler to use rr. some guidelines for handling oom that lead to failures when they are not followed: check for allocation failure! fallible allocations should always must be checked and handled, at a minimum by returning a status indicating failure to the caller. report oom to the context if you have one if a function has a jscontext* argument, usually it should call js::reportoutofmemory(cx) on allocation failure to report this to the context. sometimes it's ok to ignore oom for example if you are performing a speculative optimisation you might abandon it and continue anyway. but in this case you...
Introduction to the JavaScript shell
of the specified function. if you specify a program counter offset into the function, the line number of the line of code containing that offset is returned. print([expression ...]) evaluates the expression(s) and displays the result(s) on stdout, separated by spaces (" ") and terminated by a newline ("\n"). putstr(expression) evaluates the expression and displays the result on stdout. quit([status]) exits the shell. status defaults to 0 if omitted. read(filename[, type]) reads and returns the contents of file. if type is "binary" returns an uint8array, otherwise returns an utf-8 decoded string. readline() reads a single line of input from stdin, returning it to the caller. you can use this to create interactive shell programs in javascript. reflect.parse() see parser api. note: thi...
JSAPI User Guide
pts. return 0; } int main(int argc, const char *argv[]) { // initialize the js engine. if (!js_init()) return 1; // create a js runtime. jsruntime *rt = js_newruntime(8l * 1024l * 1024l); if (!rt) return 1; // create a context. jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; js_seterrorreporter(rt, reporterror); int status = run(cx); // shut everything down. js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return status; } each jsnative has the same signature, regardless of what arguments it expects to receive from javascript. the javascript arguments to the function are given in argc and vp. argc tells how many actual arguments the caller passed, and js_argv(cx, vp) returns an ...
Secure Development Guidelines
issues cover common coding mistakes and how they affect a product how to avoid making them how to mitigate them everything is oriented toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (eflags) contains various state information instruction pointer (eip) points to register being executed; can’t be modified directly introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by an existing function point...
Task graph
and test tasks, along with lots of other kinds of tasks to build docker images, build toolchains, perform analyses, check syntax, and so on. these tasks are arranged in a "task graph", with some tasks (e.g., tests) depending on others (builds). once its prerequisite tasks complete, a dependent task begins. the result of each task is sent to treeherder where developers and sheriffs can track the status of the push. the outputs from each task, log files, firefox installers, and so on, appear attached to each task when it completes. these are viewable in the task inspector. all of this is controlled from within the gecko source code, through a process called task-graph generation. this means it's easy to add a new job or tweak the parameters of a job in a try push, eventually landing that cha...
Gecko Roles
ts a window border. role_grouping logically groups other objects. role_separator used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window. role_toolbar represents a toolbar, which is a grouping of controls (push buttons or toggle buttons) that provides easy access to frequently used features. role_statusbar represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object. the status bar has multiple fields, which display different kinds of information. role_table represents a table that contains rows and columns of cells, and optionally, row headers and column headers. role_colum...
Mork
Mozilla › Tech › Mork
entially with a meta-row. the table id is specified using the mid at the beginning of the table. furthermore, the scope of the mid also serves as the default scope of rows defined within the table. the meta-row of the table (different from the meta-row of a row) contains a few things you might care about. the first is the kind column (k), where the mid is typically column-scoped (:c). next is the status column (s), which is defined as a single digit that is the priority (which appears to be unused), a 'u' if it is unique (i.e., the only table of its kind), and a 'v' if it is verbose (which also appears to be unused). the presence of a row or rowreference in the meta-table indicates that said row is the meta-row of the table: it contains arbitrary properties for the entire table just like a norm...
XML Extras
ras module contains several features that allow developers to treat xml as data i.e. not as just another document format. the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds. 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. xml persistence fixptr and xpointer available since 1.4alpha in the core mozilla. moved to xml extras during 1.4beta.
Binary compatibility
ilt component may fail. it is a possiblity that is introduced when upgrading to a new compiler without recompiling everything. effectively, it is a different platform. what does this mean to you? if you build a component and it works fine in version 1.0 of mozilla. if and when mozilla upgrades the compiler they use, your component will have to be rebuilt against the same compiler. when you see a @status frozen, note that this means it should work as long as the component and xpcom are built with the same compiler abi. for more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_reuse.html . comments and questions should be directed to the newsgroup, mozilla.dev.tech.xpcom, or the mailing list, mozilla-xpcom@mozilla.org. ...
An Overview of XPCOM
be exported by the shared library. reference counting these macros manage reference counting. ns_addref calls addref on an nsisupports object. ns_if_addref same as above but checks for null before calling addref. ns_release calls release on an nsisupports object. ns_if_release same as above but check for null before calling release. status codes these macros test status codes. ns_failed return true if the passed status code was a failure. ns_succeeded returns true is the passed status code was a success. variable mappings nsrefcnt default reference count type. maps to a 32-bit integer. nsresult default error type. maps to a 32-bit integer. nsnull default null val...
Creating the Component Code
a set of safe domains. once enabled, this "weblock" mode is password protected and persists until it is turned off by the password holder. it can be used to implement parental controlled browsing for children, or for targeted "kiosk browsing," where the content is restricted to a particular server. web lock user interface shows the icon that is used to activate the web lock mode (leftmost in the status bar) once you have installed the weblock component and the extra user interface. web lock user interface most of the actual work in the weblock component is preparing the component itself, finding the xpcom interfaces the component needs to use, and hooking into existing functionality within the gecko browser. component registration all xpcom components - whether they're stored in shared li...
Using XPCOM Components
ge to making good information about xpcom components available to prospective clients, however, is that the process of freezing the interfaces that are implemented by these components is still ongoing. the component viewer does not distinguish between components that are frozen and those that are not. in the source code you view in mxr, interfaces that have been frozen are marked at the top with @status frozen. the xpcom component viewer the xpcom component viewer is an add-on you can install in your browser (in sandbox, not available for now). alternatively, you can try xpcomviewer, a similar add-on. xpcom component viewer the left column shows the components - in this case a subset returned from a search on "gfx" as part of the contract id and the right column a list of the interfaces. ...
Creating XPCOM components
organization of the tutorial following along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries xpcom services xpcom types method types reference counting status codes variable mappings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from script component internals creating components in cpp xpcom initializat...
XPCOM Stream Guide
Mozilla › Tech › XPCOM › Guide › Streams
ozilla.org/storagestream;1"] .createinstance(components.interfaces.nsistoragestream); /* in practice, your storage streams shouldn't be this small. the first argument, * which represents capacity per segment, is far too small for practical use. */ store.init(64, 64, null); var out = store.getoutputstream(0); netutil.asynccopy(baseinputstream, out, function(status) { if (status != components.results.ns_ok) return; /* due to a crash, we can't create input streams until the storage output stream * has some data in it. * * also, baseinputstream has been completely consumed at this point, so we * shouldn't read from it anymore. (however, because baseinputstream is an * nsstringinputstream, it is also a seekable stream...s...
Components.utils.exportFunction
to false. this option is new in firefox 33. from firefox 34 onwards this option has no effect: the exported function is always able to accept callbacks as arguments. 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. boolean, defaulting to false. this option is new in firefox 34. returns the placeholder function which has been created in the target context. exporting functions that take arguments until firefox 34, any arguments that the function takes are structured-cloned across the security boundary unless they are native objects such as dom nodes. because struc...
Monitoring HTTP activity
there are two classes of observable activities: those that occur at the socket level and those that occur at the http transaction level. observable socket activities when the activity type reported to your nsihttpactivityobserver.observeactivity() method is activity_type_socket_transport, the activity subtype, which indicates the specific type of activity that occurred, will be a socket transport status code. observable http activities when the activity type is activity_type_http_transaction, the activity subtype will be one of the activity subtype constants. these include the ability to monitor outgoing http request headers and bodies as well as incoming http headers and complete http transactions. ...
Observer Notifications
eful information. topic description offline-requested called to query whether the application can go offline. the attempt to go offline can be canceled. note: if your code chooses to cancel the attempt to go offline, it must notify the user. network:offline-about-to-go-offline called just before all network io is taken offline. network:offline-status-changed called when the offline state has changed. note: the data value for this notification 'offline' or 'online' to indicate the new state. network:link-status-changed called when the network link status changes. http requests these are the topics that you can observe during a http request (see setting http request headers and creating sandboxed http connections...
nsresult
for a list of defined result values, see error codes returned by mozilla apis. note: on compilers that do not support strongly-typed enums (that is, compilers that don't support this feature of c++11), it falls back to being an unsigned 32-bit integer, as in past versions of gecko. note: prior to gecko 19.0, nsresult was not strongly typed. ...
Core XPCOM functions
for a list of defined result values, see error codes returned by mozilla apis. ...
amIInstallCallback
toolkit/mozapps/extensions/amiinstalltrigger.idlscriptable a callback function that web pages can implement to be notified when triggered installs complete. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oninstallended(in astring aurl, in print32 astatus); methods oninstallended() called when an install completes or fails. void oninstallended( in astring aurl, in print32 astatus ); parameters aurl the url of the add-on being installed. astatus 0 if the install was successful or negative if not. ...
imgIContainer
ned long framenumber, in print32 atimeout); obsolete since gecko 2.0 void startanimation(); obsolete since gecko 2.0 void stopanimation(); obsolete since gecko 2.0 void unlockimage(); attributes attribute type description animated boolean whether this image is animated. you can only be guaranteed that querying this will not throw if status_decode_complete is set on the imgirequest. read only. exceptions thrown ns_error_not_available if the animated state cannot be determined. animationmode unsigned short currentframe gfxasurface get a surface for the current frame. this may be a platform-native, optimized frame, so you cannot inspect its pixel data. read only...
mozIStorageProgressHandler
ble please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing. this allows you to monitor the progress and possibly display status information to the user. boolean onprogress( in mozistorageconnection aconnection ); parameters <tt>aconnection</tt> a mozistorageconnection connection indicating the connection for which the callback was invoked. return value return true to abort the request or false to allow it to continue. see also storage mozstorage introduction and how-to article mozistorageconnection database co...
mozIStorageStatement
ad only. row mozistoragestatementrow the current row, with access to all data members by name. available only to javascript code. read only. state long the current state defined by mozistoragestatement.moz_storage_statement_invalid, mozistoragestatement.moz_storage_statement_ready, or mozistoragestatement.moz_storage_statement_executing. read only. statement status constants constant value description moz_storage_statement_invalid 0 the sql statement is invalid. moz_storage_statement_ready 1 the sql statement is ready to be executed. moz_storage_statement_executing 2 the sql statement is executing at the moment. methods initialize() obsolete since gecko 1.9.1 (firefox 3.5 ...
nsIAccessibleProvider
xultabbox 0x00001018 a combination of a tabs object and a tabpanels object. xultabs 0x00001019 the collection of tab objects, usable in the tabbox and independent of as well. xultext 0x0000101a xultextbox 0x0000101b xulthumb 0x0000...
nsIAccessibleRole
used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window. it is used for xul:separator, html:hr, role="separator". role_toolbar 22 represents a toolbar, which is a grouping of controls (push buttons or toggle buttons) that provides easy access to frequently used features. it is used for xul:toolbar, role="toolbar". role_statusbar 23 represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object. the status bar has multiple fields, which display different kinds of information. it is used for xul:statusbar. role_table 24 represents a table that contains rows and columns of cells, and optionally, row headers and colu...
nsIClipboardOwner
widget/public/nsiclipboardowner.idlscriptable please add a summary to this article. last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void losingownership(in nsitransferable atransferable); methods losingownership() this method notifies the owner of the clipboard transferable that the transferable is being removed from the clipboard. it results into a ns_ok if there are no errors. ...
nsIDNSListener
netwerk/dns/nsidnslistener.idlscriptable please add a summary to this article. 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. arecord the dns record corresponding to the hostname that was resolved. this parameter is null if there was an error. astatus if the lookup failed, this parameter gives the reason. ...
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. the listener will passed to asyncresolve will be notified immediately with a status code of ns_error_abort. void cancel(); parameters none. ...
nsIDOMOfflineResourceList
stener an event listener to be called periodically throughout the download process. onupdateready nsidomeventlistener an event listener to be called when a resource update is ready; this event is not currently used since versioned application caches aren't supported yet. oncached nsidomeventlistener an event listener to be called when caching is complete. status unsigned short one of the application cache state constants indicating the status of the application cache. constants application cache state constants constant value description uncached 0 the object isn't associated with an application cache. idle 1 the application cache is not in the process of being updated. checking 2 ...
nsIDOMXULElement
ring gets/sets the value of the element's orient attribute. pack domstring gets/sets the value of the element's pack attribute. persist domstring gets/sets the value of the element's persist attribute. ref domstring gets/sets the value of the element's ref attribute. resource nsirdfresource read only. returns the nsirdfresource corresponding to the element's ref or id attribute, if any. statustext domstring gets/sets the value of the element's statustext attribute. style nsidomcssstyledeclaration read only. obsolete since gecko 1.9 returns an object that may be used to read or write individual css style properties for the element. tooltip domstring gets/sets the value of the element's tooltip attribute. tooltiptext domstring gets/sets the value of the element's tooltiptext attrib...
nsIDownloadManager
considered private (ie. to be removed at the end of the private browsing session, cached in non-permanent storage, etc.) return value the newly created download item with the passed-in properties. addlistener() adds a listener to the download manager. void addlistener( in nsidownloadprogresslistener alistener ); parameters alistener the nsidownloadprogresslistener object to receive status information from the download manager. canceldownload() cancels the download with the specified id if it's currently in-progress. this calls cancel(ns_binding_aborted) on the nsicancelable provided by the download. void canceldownload( in unsigned long aid ); parameters aid the unique id of the download. exceptions thrown ns_error_failure the download is not in progress. clean...
nsIEditorIMESupport
xteventreplyptr areply ); parameters areply endcomposition() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) handles the end of inline input composition. void endcomposition(); parameters none. forcecompositionend() force the composition end. void forcecompositionend(); parameters none. native code only!getpreferredimestate get preferred ime status of current widget. void getpreferredimestate( out unsigned long astate ); parameters astate native code only!getquerycaretrect obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. get the query caret rect. void ge...
nsIFileInputStream
any errors that might happen when this flag is not set would happen during the first read. also, the file is not locked when init is called, so it might be deleted before we try to read from it. methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to read from (must qi to nsilocalfile) ioflags the file status flags define how the file is accessed. see pr_open documentation for more details. if set to -1 the file will be opened in default mode (pr_rdonly). perm file mode bits are described in the pr_open documentation. if set to -1 the default value 0 will be used. behaviorflags flags specifying various behaviors of the class (see enumerations in the class). see also nsifileoutputstream ...
nsIHttpServer
ns_error_invalid_arg * if path does not begin with a "/" or does not end with a "/" */ void registerprefixhandler(in string prefix, in nsihttprequesthandler handler); /** * registers a custom error page handler. * * @param code * the error code which is to be handled by handler * @param handler * an object which will handle any requests which generate the given status * code, or null to remove any existing handler. if the handler throws an * exception during server operation, fallback is to the genericized error * handler (the x00 version), then to 500, using a user-defined error * handler if one exists or the server default handler otherwise. fallback * will never occur from a user-provided handler that throws to the same * han...
nsIInputStream
igned long read(in charptr abuf, in unsigned long acount); native code only! unsigned long readsegments(in nswritesegmentfun awriter, in voidptr aclosure, in unsigned long acount); native code only! methods available() determine number of bytes available in the stream. in addition to the number of bytes available in the stream, this method also informs the caller of the current status of the stream. a stream that is closed will throw an exception when this method is called. that enables the caller to know the condition of the stream before attempting to read from it. if a stream is at end-of-file, but not closed, then this method returns 0 bytes available. note: some nsiinputstream implementations automatically close() when end-of-file is reached; others do not. note: this...
nsILocalFile
pr_wronly open for writing only. pr_rdwr open for reading and writing. pr_create_file if the file does not exist, the file is created. if the file exists, this flag has no effect. pr_append the file pointer is set to the end of the file prior to each write. pr_truncate if the file exists, its length is truncated to 0. pr_sync if set, each write will wait for both the file data and file status to be physically updated. pr_excl with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. delete_on_close file will be deleted when closed. mode a unix-style file permissions value. for example, the octal value 0600 may be used to limit read and write access to the current user of the system. this parameter may be...
nsILoginManagerStorage
ameter an array of all nsilogininfo objects in the login store. this parameter must always be an array; if there are no logins in the login store, it must be an empty array, not null. getloginsavingenabled() implement to report whether or not login saving has been disabled for a specific host. boolean getloginsavingenabled( in astring ahost ); parameters ahost the hostname whose login saving status should be returned. this string will be in the origin url format, without a pathname. for example, "http://mozilla.com". return value return true if login saving is enabled for the specified host; otherwise, return false. init() implement this method to initialize the component. this is not called automatically; you must call it yourself if needed. void init(); parameters none. initwithfile() i...
nsIMsgDBHdr
ly internal database code should set this attribute. threadparent nsmsgkey indicates the parent of this message in its thread. if this is the root of the thread, it will return nsmsgkey_none. messagesize unsigned long indicates the size of this message in bytes. linecount unsigned long indicates the size of the message body in number of lines. statusoffset unsigned long indicates the offset within the message of the x-mozilla-status header. messageoffset unsigned long indicates the position of the offline copy of an imap or news messages within the offline store. offlinemessagesize unsigned long indicates the size of the offline copy of an imap or news message. date prtime indicates the date ...
nsIMsgDBViewCommandUpdater
e add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports in thunderbird this is implemented for different windows in several different places: nsmsgdbviewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the threadpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the number of selected items changes. void updatecommandstatus(); parameters none. displaymessagechanged() called when the displayed message has changed. void displaymessagechanged(in nsimsgfolder afolder, ...
nsIMsgFolder
totals() void updatesummarytotals(in boolean force); summarychanged() void summarychanged(); getnumunread() get the total number of unread messages in this folder, or in all subfolders. long getnumunread(in boolean deep); gettotalmessages() get the total number of messages in this folder, or in all subfolders. long gettotalmessages(in boolean deep); clearnewmessages() clear new status flag of all of the new messages. void clearnewmessages(); clearrequirescleanup() void clearrequirescleanup(); setflag() sets a flag on the folder. the known flags are defined in nsmsgfolderflags.h. void setflag(in unsigned long flag); clearflag() clears a flag on the folder. the known flags are defined in nsmsgfolderflags.h. void clearflag(in unsigned long flag); getflag() dete...
nsIMsgSearchNotify
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchnotify.idl [scriptable, uuid(ca37784d-352b-4c39-8ccb-0abc1a93f681)] interface nsimsgsearchnotify : nsisupports { void onsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); // notification that a search has finished. void onsearchdone(in nsresult status); /* * until we can encode searches with a uri, this will be an * out-of-bound way to connect a set of search terms to a datasource */ /* * called when a new search begins */ void onnewsearch(); }; ...
nsIMsgSearchTerm
mid; beginsgrouping attribute boolean beginsgrouping; endsgrouping attribute boolean endsgrouping; methods matchrfc822string boolean matchrfc822string(in string astring, in string charset, in boolean charsetoverride); matchrfc2047string boolean matchrfc2047string(in string astring, in string charset, in boolean charsetoverride); matchdate boolean matchdate(in prtime atime); matchstatus boolean matchstatus(in unsigned long astatus); matchpriority boolean matchpriority(in nsmsgpriorityvalue priority); matchage boolean matchage(in prtime days); matchsize boolean matchsize(in unsigned long size); matchlabel boolean matchlabel(in nsmsglabelvalue alabelvalue); matchjunkstatus boolean matchjunkstatus(in string ajunkscore); matchjunkpercent /* * test search term matc...
nsIProtocolProxyService
o test. aflags a bit-wise combination of the resolve_ flags defined above. pass 0 to specify the default behavior. any additional bits that do not correspond to a resolve_ flag are reserved for future use. acallback the object to be notified when the result is available. return value an nsicancelableobject that can be used to cancel the asynchronous operation. if canceled, the cancellation status (areason) will be forwarded to the callback's nsiprotocolproxycallback.onproxyavailable() method via the astatus parameter. newproxyinfo() this method may be called to construct a nsiproxyinfo instance from the given parameters. this method may be useful in conjunction with nsisockettransportservice.createtransport() for creating, for example, a socks connection. nsiproxyinfo newproxyinfo( i...
nsISHEntry
the same docshell if and only if the two entries are entries for the same document. in practice, two entries a and b will have the same docidentifier if we arrived at b by clicking an anchor link in a or if b was created by a's calling history.pushstate(). docshellid unsigned long long the history id of the docshell. document nsidomdocument dom document. obsolete since gecko 1.8 expirationstatus boolean indicates whether the page is already expired in cache. id unsigned long an id to help identify this entry from others during subframe navigation. layouthistorystate nsilayouthistorystate layouthistorystate for scroll position and form values. loadtype unsigned long the loadtype for this entry. this is typically loadhistory except when reload is pressed, it has the appropriate reloa...
nsIServerSocket
void asynclisten( in nsiserversocketlistener alistener ); parameters alistener the listener to be notified when client connections are accepted. close() this method closes a server socket. this does not affect already connected client sockets (i.e., the nsisockettransport instances created from this server socket). this will cause the onstoplistening event to asynchronously fire with a status of ns_binding_aborted. void close(); parameters none. native code only!getaddress returns the address to which this server socket is bound. since a server socket may be bound to multiple network devices, this address may not necessarily be specific to a single network device. in the case of an ip socket, the ip address field would be zeroed out to indicate a server socket bound to all networ...
nsITransferable
attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and out of the transferable given the supported flavors. isprivatedata boolean although this is not a read-only attribute, you should generally avoid changing it, since doing so may cause it not to actually reflect the status of the context in which the transferable was created. native code only! requestingnode nsidomnode the source dom node this transferable was created from. native code only! note: currently, this can only be used on windows (in order to support network principal information in drag operations). constants kflavorhasdataprovider (that title needs to b...
nsIUpdate
the app.update.surveyurl preference. state astring the state of the selected patch: "downloading" the update is being downloaded. "pending" the update is ready to be applied. "applying" the update is in the process of being applied. "succeeded" the update has been installed successfully. "download-failed" the update failed to be downloaded. "failed" installing the update failed. read only. statustext astring an optional message associated with the update. type astring the type of patch represented by the object: "major" a major new version of the application. "minor" a minor update, such as a security update. version astring the application version of the update.obsolete since gecko 2.0 methods getpatchat() retrieves a patch. nsiupdatepatch getpatchat( in unsigned long index )...
nsIUpdateCheckListener
objects describing the available updates. updatecount the number of updates in the updates array. onerror() called when an error occurs while loading the remote update service file. void onerror( in nsixmlhttprequest request, in nsiupdate update ); parameters request the nsixmlhttprequest object handling the update check. update an nsiupdate object containing details about the error in its statustext attribute. onprogress() called every time there is a progress notification loading the update service file. void onprogress( in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize ); parameters request the nsixmlhttprequest object handling the update check. position the number of bytes downloaded so far. totalsize the total number of bytes that need to be...
nsIWebProgress
ameter includes nsiwebprogresslistener::state_is_window. notify_state_all 0x0000000f receive all nsiwebprogresslistener.onstatechange() events. these flags indicate the other events to observe, corresponding to the other four methods defined on nsiwebprogresslistener. constant value description notify_progress 0x00000010 receive nsiwebprogresslistener.onprogresschange() events. notify_status 0x00000020 receive nsiwebprogresslistener.onstatuschange() events. notify_security 0x00000040 receive nsiwebprogresslistener.onsecuritychange() events. notify_location 0x00000080 receive nsiwebprogresslistener.onlocationchange() events. notify_refresh 0x00000100 receive nsiwebprogresslistener2.onrefreshattempted() events. this is defined on nsiwebprogresslistener2. notify_all 0x000000ff <...
nsIXMLHttpRequest
mple 2 var {cu: utils, cc: classes, ci: instances} = components; cu.import('resource://gre/modules/services.jsm'); function xhr(url, cb) { let xhr = cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(ci.nsixmlhttprequest); let handler = ev => { evf(m => xhr.removeeventlistener(m, handler, !1)); switch (ev.type) { case 'load': if (xhr.status == 200) { cb(xhr.response); break; } default: services.prompt.alert(null, 'xhr error', 'error fetching package: ' + xhr.statustext + ' [' + ev.type + ':' + xhr.status + ']'); break; } }; let evf = f => ['load', 'error', 'abort'].foreach(f); evf(m => xhr.addeventlistener(m, hand...
nsIXmlRpcClient
the url of the xml-rpc server inprogress readonly boolean whether or not a call is in progress fault readonly nsixmlrpcfault the most recent xml-rpc fault from returned from this server. null if the last call didn't return an xml-rpc fault. result readonly nsisupports the most recent xml-rpc call result returned from this server. null if the last call didn't return a valid result. responsestatus readonly unsigned long the most recent http status code returned from this server. null if the server was unreachable or not yet contacted. responsestring readonly unsigned long the most recent http status code returned from this server. null if the server was unreachable or not yet contacted. constants constant type description int unsigned long nsisupportsprint32 boolean unsigned lo...
nsMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl use this to specify the value of a search term [ptr] native nsmsgsearchvalue(nsmsgsearchvalue); %{c++ typedef struct nsmsgsearchvalue { nsmsgsearchattribvalue attribute; union { nsmsgpriorityvalue priority; prtime date; pruint32 msgstatus; /* see msg_flag in msgcom.h */ pruint32 size; nsmsgkey key; print32 age; /* in days */ nsimsgfolder *folder; nsmsglabelvalue label; pruint32 junkstatus; pruint32 junkpercent; } u; char *string; } nsmsgsearchvalue; ...
nsMsgViewCommandCheckState
it is (as far as i can tell) not currently used anywhere in thunderbird. mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article. ...
nsMsgViewCommandType
w.docommandwithfolder() to select the destination folder. selectall 15 select all messages. downloadselectedforoffline 16 download the selected messages for offline. downloadflaggedforoffline 17 download all flagged messages for offline. selectthread 18 select the entire thread. selectflagged 19 select all flagged messages. cmdrequiringmsgbody 20 used with nsimsgdbview.getcommandstatus() to determine if commands requiring the message body (i.e. reload or print preview) are available. label0 21 attach a label to the selected messages. label1 22 attach a label to the selected messages. label2 23 attach a label to the selected messages. label3 24 attach a label to the selected messages. label4 25 attach a label to the selected messages. label5 26 attach a label t...
XPCOM reference
ned in nsmsgmessageflags.h. nsmsgnavigationtypethe nsmsgnavigationtype interface contains constants used for message navigation in thunderbird. for example to move forward a message, you would call:nsmsgsearchopvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl nsmsgviewcommandcheckstatethe nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird. it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird. for example to mark a message read, you would call:nsmsgviewflagstypethe nsmsgviewflagstype interface contains constants used for view flags in thunderbird. this interface isn't ever implemented. it is o...
Reference Manual
// ...as construction alone. nsifoo* temp; nsresult rv=getfoo(&temp); nscomptr<nsifoo> foo=dont_addref(temp); // remember this `raw-pointer, call // getter, assign |dont_addref|' // pattern. it crops up in many // efficiency discussions. in both cases you end up with foo, a valid nscomptr whose value was set with the product of getfoo, and rv the status returned by getfoo. the case using the temporary, however, uses construction to put the value into the nscomptr, which (though slightly more complicated in source) is more efficient than default construction followed by assignment, the course of events followed by the simpler example. prefer destruction to assignment prefer do_queryinterface to calling queryinterface iterating there is a very com...
Using nsCOMPtr
xperienced nscomptr user, or find the answer by experimentation. if you've never used nscomptr before, you're starting in the right place. just keep reading. you'll know when to stop. after you've been using nscomptrs for a while, and you reach unfamiliar territory, or run into compiler errors; you may want to return to this document to get help from the reference manual or the faq. contents status, recent changes, and plans recent changes to nscomptr getting started guide introduction using nscomptr summary reference manual the basics initialization and assignment using an nscomptr<t> as a t* efficiency and correctness compiler annoyances frequently asked questions buildtime errors runtime errors how do i... general b...
Weak reference
eference implementation doesn't give you exactly the interface you were hoping for. why can't i just directly call my interfaces methods on the weak reference? you really want this weak reference scheme to give you a pointer that implements the interface you actually care about, e.g., // note: _not_ the implementation we have... nsweakptr<nsifoo> weakfooptr = fooptr; // ... if ( weakfooptr ) status = weakfooptr->somefoomethod(...); this is a reasonable thing to want. it's expensive to implement automatically, however. neither inheritance, nor templates, nor macros can help automatically forward all the method calls to the real object. xpidl could write an implementation for you (if we modified it), or you could write one by hand as i discuss below. there are other, mostly negligible, cost...
xptcall FAQ
la? yes. mozilla will not run properly without a functioning port of xptcall. non-functional stub code exists to allow building xptcall on non-supported platforms. but any browser feature that relies on xpconnect will fail. any platform that does not do xptcall is in trouble. we need to get moving on getting xptcall working everywhere! what platforms are supported? the growing list: porting status where can i find other resources? the code is at: xpcom/reflect/xptcall a new porting guide is at: https://developer.mozilla.org/en/xptcall_porting_guide pre-implementation proposals are here and here. original document information author(s): john bandhauer <jband@netscape.com> originally published: 02 september 1999 ...
Xptcall Porting Guide
index, but no tests for the stubs functionality. such a test ought to be written, but this has not yet been done. a full 'test' at this point requires building the client and running the xpconnect test called testxpc in mozilla/js/src/xpconnect/tests. getting these ports done is very important. please let me know if you are interested in doing one. i'll answer any questions as i get them. porting status original author: john bandhauer, 31 may 1999. ...
XPCOM
wrappers around nspr's.xptcall faqxptcall is a small low level xpcom method call library. it is implemented using platform specific c/c++ and assembly language code. it is used to facilitate cross language and cross thread method calls. porting this code is required in order to make mozilla run on any given platform.xptcall porting guideoriginal author: john bandhauer, 31 may 1999.xptcall porting statusthis is a status page for the multiplatform porting of xptcall. xptcall has a faq and a porting guide. join the xpcom community choose your preferred method for joining the discussion: mailing list newsgroup rss feed irc: #developers (learn more)tools: javascript component wizard, visual c++ component wiz...
XPIDL Syntax
Mozilla › Tech › XPIDL › Syntax
purpose of this document this document is not an introduction to xpidl or idl in general. it is more focused on xpidl syntax and grammar. see xpidl main page for more links and introductory content. simplifications, conventions and notation the syntax is specified according to abnf as defined by rfc 5234, although a few productions use prose for clarity of understanding. lexically, tokens are delimited by whitespace (defined here as spaces, tabs, vertical tabs, form feeds, line feeds, and carriage returns, or [ \t\v\f\r\n] in regular expression form). ...
Address Book examples
let searchresult = abmanager.getdirectory(ab.uri + "?" + searchquery).childcards; // ... use searchresult as required. } } note: this method doesn't work with remote address books (e.g. ldap). hence the additional !ab.isremote check how do i add/edit/delete contacts? note: not all address books can be written to. ...
Spam filtering
user can configure junk mail can be automatically purged from the "junk" folder. to analyze a message for spam, we need the entire message, not just the headers. spam detection happens after filters are run. white listing happens after filters, but before spam detection. the purge code is implemented as a search of the "junk" folder, looking for "old" message that have the proper junk status. when does purging happens? elaborate on the mime changes that were made for spam. currently, spam filtering is does not work for news, but it would be possible to add support for this. (there is a bug on it.). initial state user action table changes unknown (user can't see this, looks like "not junk") mark as junk add tokens to bad unknown (user ...
Use SQLite
2mb: var db = opendatabase('mydb', '1.0', 'test db', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executesql('create table if not exists logs (id unique, log)'); tx.executesql('insert into logs (id, log) values (1, "foobar")'); tx.executesql('insert into logs (id, log) values (2, "logmsg")'); msg = '<p>log message created and row inserted.</p>'; document.queryselector('#status').innerhtml = msg; }); db.transaction(function (tx) { tx.executesql('select * from logs', [], function (tx, results) { var len = results.rows.length, i; msg = "<p>found rows: " + len + "</p>"; document.queryselector('#status').innerhtml += msg; for (i = 0; i < len; i++){ msg = "<p><b>" + results.rows.item(i).log + "</b></p>"; document.queryselector('#status').innerhtml ...
Using the Mozilla source server
ymbol server. once the symbol path is set you must now enable source server. using the source server in windbg in the windbg command line, type .srcfix and hit enter. this enables source server support. now, when you click on a frame in the "calls" window, windbg will prompt you about running cvs to download the associated source code. if you click "yes", windbg will display *busy* in the status bar while it downloads the source, and then it will automatically open the file and highlight the current line. using the source server in visual studio note: source server support does not work correctly out of the box in visual studio 2005. if you install windbg, and copy srcsrv.dll from the windbg install dir to the visual studio install dir (replacing the existing copy) it will work. ena...
Browser Side Plug-in API - Plugins
he result. npn_pushpopupsenabledstate pushes the popups-enabled state. npn_reloadplugins reloads all plug-ins in the plugins directory. npn_requestread requests a range of bytes for a seekable stream. npn_setvalue sets windowless plug-in as transparent or opaque. npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies. npn_status displays a message on the status line of the browser window. npn_useragent returns the browser's user agent field. npn_version returns version information for the plug-in api. npn_write pushes data into a stream produced by the plug-in and consumed by the browser. ...
Initialization and Destruction - Plugins
ion. to check this information, use npn_version. no plug-in api calls can take place in either direction until the initialization completes successfully, with the exception of the functions np_initialize and np_shutdown, which are not in the function tables. however, because np_initialize is called at the end of the initialization process, you can call other methods, such as npn_memalloc and npn_status, from np_initialize. instance creation after initialization, the plug-in instance is created. more than one instance of the same plug-in can exist if a single page contains multiple embedded plug-ins, or if several browser windows are open and display the same data type. at this point, a plug-in can call the npn_setvalue function to specify whether it is windowed (the default) or windowless. p...
Debugging service workers - Firefox Developer Tools
ce workers view (along with any other service workers registered on the same domain): this gives you a variety of information about your service worker: the url that the service worker is registered on. that last time the service worker was updated (if the service has not been updated, this is when it was first installed). the path to the service worker source file. the server worker’s status, which can be one of the following: stopped: the service worker is installed, but not currently running. when the service worker is stopped, a start button is provided to start it running, allowing you to trigger the service worker lifecycle. running: the service worker is running. there are a couple of other useful controls on this view, too. unregister on the right-hand side o...
Inspecting web sockets - Firefox Developer Tools
s article explores what functionality the web socket inspector makes available. 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. you can use the ws button to filter the list for just web socket connections. 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. choose the reponse tab to inspect web socket frames sent and received through the selected connection. the live-updated table shows data for sent (green arrow) and received (red arrow) f...
Cache Storage - Firefox Developer Tools
...
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
eptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if first, count or primcount are negative, a gl.invalid_value error is thrown. if gl.current_program is null, a gl.invalid_operation error is thrown. examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawarraysinstancedangle(gl.points, 0, 8, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification. recommendation initial definition. ...
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
values, a gl.invalid_enum error is thrown. if offset is a invalid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count or primcount are negative, a gl.invalid_value error is thrown. examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawelementsinstancedangle(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification. recommendation initial definition. ...
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
attribdivisorangle(index, divisor); parameters index a gluint specifying the index of the generic vertex attributes. divisor a gluint specifying the number of instances that will pass between updates of the generic attribute. return value none. examples var ext = gl.getextension('angle_instanced_arrays'); ext.vertexattribdivisorangle(0, 2); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification. recommendation initial definition. ...
ANGLE_instanced_arrays - Web APIs
and the instance advances between each set. ext.vertexattribdivisorangle() modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawarraysinstancedangle() and ext.drawelementsinstancedangle(). examples enabling the extension: var ext = gl.getextension('angle_instanced_arrays'); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification. recommendation initial definition. ...
AbortController.AbortController() - Web APIs
}); function fetchvideo() { ... fetch(url, {signal}).then(function(response) { ... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror. you can find a full working example on github — see abort-api (see it running live also). specifications specification status comment domthe definition of 'abortcontroller()' in that specification. living standard initial definition ...
AbortController.abort() - Web APIs
}); function fetchvideo() { ... fetch(url, {signal}).then(function(response) { ... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror. you can find a full working example on github — see abort-api (see it running live also). specifications specification status comment domthe definition of 'abort()' in that specification. living standard initial definition ...
AbortController.signal - Web APIs
}); function fetchvideo() { ... fetch(url, {signal}).then(function(response) { ... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror. you can find a full working example on github — see abort-api (see it running live also). specifications specification status comment domthe definition of 'signal' in that specification. living standard initial definition ...
AbortController - Web APIs
chvideo() { ... fetch(url, {signal}).then(function(response) { ... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with a domexception named aborterror. you can find a full working example on github — see abort-api (see it running live also). specifications specification status comment domthe definition of 'abortcontroller' in that specification. living standard initial definition ...
AbortSignal: abort event - Web APIs
living standard ...
AbortSignal.aborted - Web APIs
signal (available in the signal property). later on we check whether or not it the signal has been aborted using the aborted property, and send an appropriate log to the console. var controller = new abortcontroller(); var signal = controller.signal; // ... signal.aborted ? console.log('request has been aborted') : console.log('request not aborted'); specifications specification status comment domthe definition of 'onabort' in that specification. living standard initial definition ...
AbortSignal.onabort - Web APIs
controller object, and get its abortsignal (available in the signal property). later on we check whether or not it the signal has been aborted using the onabort property, and send an appropriate log to the console. var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status comment domthe definition of 'onabort' in that specification. living standard initial definition ...
AbortSignal - Web APIs
on(response) { ... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror. current version of firefox rejects the promise with a domexception you can find a full working example on github — see abort-api (see it running live also). specifications specification status comment domthe definition of 'abortsignal' in that specification. living standard initial definition ...
AbsoluteOrientationSensor - Web APIs
e should be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. orientation sensorthe definition of 'absoluteorientationsensor' in that specification. candidate recommendation ...
AbsoluteOrientationSensor - Web APIs
orientation sensorthe definition of 'absoluteorientationsensor' in that specification. candidate recommendation ...
AbstractRange.collapsed - Web APIs
apsed read-only property of the abstractrange interface returns true if the range's start position and end position are the same. syntax var iscollpased = range.collapsed value a boolean value which is true if the range is collapsed. a collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range.. specifications specification status comment domthe definition of 'collapsed' in that specification. living standard static rangethe definition of 'collapsed' in that specification. editor's draft initial definition. ...
AbstractRange.endContainer - Web APIs
the endcontainer property of the abstractrange interface returns the node in which the end of the range is located. syntax var endnode = range.endcontainer value the dom node which contains the final character of the range. specifications specification status comment domthe definition of 'endcontainer' in that specification. living standard static rangethe definition of 'endcontainer' in that specification. editor's draft initial definition. ...
AbstractRange.endOffset - Web APIs
the endoffset property of the abstractrange interface returns the offset into the end node of the range's end position. syntax var endoffset = range.endoffset; value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located. specifications specification status comment domthe definition of 'endoffset' in that specification. living standard static rangethe definition of 'endoffset' in that specification. editor's draft initial definition. ...
AbstractRange.startContainer - Web APIs
the read-only startcontainer property of the abstractrange interface returns the start node for the range. syntax var startnode = range.startcontainer value the dom node inside which the start position of the range is found. specifications specification status comment domthe definition of 'startcontainer ' in that specification. living standard static rangethe definition of 'startcontainer' in that specification. editor's draft initial definition. ...
AbstractRange.startOffset - Web APIs
the read-only startoffset property of the abstractrange interface returns the offset into the start node of the range's start position. syntax var startoffset = range.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located. specifications specification status comment domthe definition of 'startoffset' in that specification. living standard static rangethe definition of 'startoffset' in that specification. editor's draft initial definition. ...
AbstractRange - Web APIs
e to encompass the word "paragraph". we then finish up by calling clonecontents() on the range to create a new documentfragment object which contains the portion of the document encompassed by the range. after that, we use appendchild() to add that fragment at the end of the document's body, as obtained from document.body. the result looks like this: specifications specification status comment domthe definition of 'abstractrange' in that specification. living standard ...
AbstractWorker.onerror - Web APIs
gh the worker. syntax myworker.onerror = function() { ... }; example the following code snippet shows creation of a worker object using the worker() constructor and setting up of an onerror handler on the resulting object: var myworker = new worker('worker.js'); myworker.onerror = function() { console.log('there is an error with your worker!'); } specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification. living standard ...
AbstractWorker - Web APIs
living standard no change from unknown. ...
Accelerometer.Accelerometer() - Web APIs
ple should be taken, meaning the number of times per second that sensor.onerror will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'accelerometer' in that specification. candidate recommendation ...
Accelerometer.x - Web APIs
Web › API › Accelerometer › x
sixty times a second. let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'x' in that specification. candidate recommendation ...
Accelerometer.y - Web APIs
Web › API › Accelerometer › y
sixty times a second. let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'y' in that specification. candidate recommendation ...
Accelerometer.z - Web APIs
Web › API › Accelerometer › z
sixty times a second. let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'z' in that specification. candidate recommendation ...
Accelerometer - Web APIs
nreading event callback. in the example below this occurs sixty times a second. let acl = new accelerometer({frequency: 60}); acl.addeventlistener('reading', () => { console.log("acceleration along the x-axis " + acl.x); console.log("acceleration along the y-axis " + acl.y); console.log("acceleration along the z-axis " + acl.z); }); acl.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'accelerometer' in that specification. candidate recommendation ...
AddressErrors.addressLine - Web APIs
alue, this property is set to a domstring providing a human-readable error message explaining the validation error. the text should also include, when possible, advice about how to go about correcting the error. if the paymentaddress object's addressline property was determined to be valid, this property is not included in the addresserrors dictionary. specifications specification status comment payment request apithe definition of 'addresserrors.addressline' in that specification. candidate recommendation initial definition. ...
AddressErrors.city - Web APIs
candidate recommendation initial definition. ...
AddressErrors.country - Web APIs
aving an invalid value, this property is set to a domstring providing a human-readable error message explaining the validation error. the text should also include, when possible, advice about how to go about correcting the error. if the paymentaddress object's country property was determined to be valid, this property is not included in the dictionary. specifications specification status comment payment request apithe definition of 'addresserrors.country' in that specification. candidate recommendation initial definition. ...
AddressErrors.dependentLocality - Web APIs
candidate recommendation initial definition. ...
AddressErrors.languageCode - Web APIs
gestions for correcting it. this validation might be as simple as ensuring the text of the string is compliant with the syntax defined in bcp-47, or as detailed as actually verifying that the specified string matches a value from a database. if the languagecode value was validated successfully, this property is not included in the addresserrors object. specifications specification status comment payment request apithe definition of 'addresserrors.languagecode' in that specification. candidate recommendation initial definition. ...
AddressErrors.organization - Web APIs
ng it. for example, if validation simply ensures that only permitted characters are included in the organization's name, this might return a string such as "the organization name may only contain the letters a-z, digits, spaces, and commas." if the organization value was validated successfully, this property is not included in the addresserrors object. specifications specification status comment payment request apithe definition of 'addresserrors.organization' in that specification. candidate recommendation initial definition. ...
AddressErrors.phone - Web APIs
candidate recommendation initial definition. ...
AddressErrors.postalCode - Web APIs
candidate recommendation initial definition. ...
AddressErrors.recipient - Web APIs
candidate recommendation initial definition. ...
AddressErrors.region - Web APIs
candidate recommendation initial definition. ...
AddressErrors.regionCode - Web APIs
alidated, this property contains a domstring offering a human-readable explanation of the validation error and offers suggestions for correcting it. if the regioncode value was validated successfully, this property is not included in the addresserrors object. usage notes the region code is derived from the iso 3166-2 country subdivision name standard. specifications specification status comment payment request apithe definition of 'addresserrors.regioncode' in that specification. candidate recommendation initial definition. ...
AddressErrors.sortingCode - Web APIs
candidate recommendation initial definition. ...
AddressErrors - Web APIs
candidate recommendation initial definition. ...
AesCbcParams - Web APIs
a domstring. this should be set to aes-cbc. iv a buffersource. the initialization vector. must be 16 bytes, unpredictable, and preferably cryptographically random. however, it need not be secret (for example, it may be transmitted unencrypted along with the ciphertext). examples see the examples for subtlecrypto.encrypt() and subtlecrypto.decrypt(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aescbcparams' in that specification. recommendation ...
AesCtrParams - Web APIs
sn't wrap: if the message is n blocks and the counter is m bits long, then the following must be true: n <= 2m. the nist sp800-38a standard, which defines ctr, suggests that the counter should occupy half of the counter block (see appendix b.2), so for aes it would be 64. examples see the examples for subtlecrypto.encrypt() and subtlecrypto.decrypt(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesctrparams' in that specification. recommendation ...
AesGcmParams - Web APIs
recommendation ...
AesKeyGenParams - Web APIs
as any of aes-cbc, aes-ctr, aes-gcm, or aes-kw. properties name a domstring. this should be set to aes-cbc, aes-ctr, aes-gcm, or aes-kw, depending on the algorithm you want to use. length a number — the length in bits of the key to generate. this must be one of: 128, 192, or 256. examples see the examples for subtlecrypto.generatekey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aeskeygenparams' in that specification. recommendation ...
AmbientLightSensor.AmbientLightSensor() - Web APIs
supported: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends device hardware and consequently may be less than requested. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. ambient light sensorthe definition of 'ambientlightsensor()' in that specification. candidate recommendation ...
AmbientLightSensor.illuminance - Web APIs
ue a number indicating the current light level in lux. example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general. ambient light sensorthe definition of 'illuminance' in that specification. candidate recommendation ...
AmbientLightSensor - Web APIs
of the ambient light level around the hosting device. example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general. ambient light sensorthe definition of 'ambientlightsensor' in that specification. candidate recommendation ...
Ambient Light Events - Web APIs
candidate recommendation initial definition ...
Ambient Light Sensor API - Web APIs
...
AnalyserNode.AnalyserNode() - Web APIs
. maxdecibels: the desired initial maximum power in db for fft analysis. the default is -30. mindecibels: the desired initial minimum power in db for fft analysis. the default is -100. smoothingtimeconstant: the desired initial smoothing constant for the fft analysis. the default is 0.8. return value a new analysernode object instance. specifications specification status comment web audio apithe definition of 'analysernode() constructor' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
AnalyserNode.fftSize - Web APIs
working draft ...
AnalyserNode.frequencyBinCount - Web APIs
working draft ...
AnalyserNode.getByteFrequencyData() - Web APIs
working draft ...
AnalyserNode.getByteTimeDomainData() - Web APIs
working draft ...
AnalyserNode.getFloatFrequencyData() - Web APIs
working draft ...
AnalyserNode.getFloatTimeDomainData() - Web APIs
working draft ...
AnalyserNode.maxDecibels - Web APIs
working draft ...
AnalyserNode.minDecibels - Web APIs
working draft ...
AnalyserNode.smoothingTimeConstant - Web APIs
working draft ...
AnalyserNode - Web APIs
working draft ...
Animation() - Web APIs
or scrolling, for example. the default value is document.timeline, but this can be set to null as well. examples in the follow the white rabbit example, the animation() constructor is used to create an animation for the rabbitdownkeyframes using the document's timeline: var rabbitdownanimation = new animation(rabbitdownkeyframes, document.timeline); specifications specification status comment web animationsthe definition of 'animation()' in that specification. working draft editor's draft. ...
Animation.cancel() - Web APIs
Web › API › Animation › cancel
mation is cancelled, its starttime and currenttime are set to null. syntax animation.cancel(); parameters none. return value none. exceptions this method doesn't directly throw exceptions; however, if the animation's playstate is anything but "idle" when cancelled, the current finished promise is rejected with a domexception named aborterror. specifications specification status comment web animationsthe definition of 'animation.cancel()' in that specification. working draft editor's draft. ...
Animation.commitStyles() - Web APIs
ax animation.commitstyles(); parameters none. return value none. examples const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); }); specifications specification status comment web animationsthe definition of 'commitstyles()' in that specification. working draft ...
Animation.currentTime - Web APIs
// 23.404 // 24.192 // 25.514 // ... // reduced time precision with `privacy.resistfingerprinting` enabled animation.currenttime; // 49.8 // 50.6 // 51.7 // ... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment web animationsthe definition of 'currenttime' in that specification. working draft ...
Animation.effect - Web APIs
Web › API › Animation › effect
nimation. the target effect may be either an effect object of a type based on animationeffectreadonly, such as keyframeeffect, or null. syntax var effect = animation.effect; animation.effect = animationeffectreadonly value a animationeffectreadonly object describing the target animation effect for the animation, or null to indicate no active effect. specifications specification status comment web animationsthe definition of 'animation.effect' in that specification. working draft editor's draft. ...
Animation.finish() - Web APIs
Web › API › Animation › finish
working draft ...
Animation.finished - Web APIs
solve once the animation has finished running. examples the following code waits until all animations running on the element elem have finished, then deletes the element from the dom tree: promise.all( elem.getanimations().map( function(animation) { return animation.finished } ) ).then( function() { return elem.remove(); } ); specifications specification status comment web animationsthe definition of 'animation.finished' in that specification. working draft editor's draft. ...
Animation.id - Web APIs
Web › API › Animation › id
used to identify the animation. syntax var animationsid = animation.id; animation.id = newidstring; value a domstring which can be used to identify the animation, or null if the animation has no id. examples in the follow the white rabbit example, you can assign the rabbitdownanimation an id like so: rabbitdownanimation.effect.id = "rabbitgo"; specifications specification status comment web animationsthe definition of 'animation.id' in that specification. working draft editor's draft. ...
Animation.oncancel - Web APIs
on the new animation. syntax var cancelhandler = animation.oncancel; animation.oncancel = cancelhandler; value a function to be executed when the animation is cancelled, or null if there is no cancel event handler. examples if this animation is canceled, remove its element. animation.oncancel = function() { animation.effect.target.remove(); }; specifications specification status comment web animationsthe definition of 'animation.oncancel' in that specification. working draft editor's draft. ...
Animation.onfinish - Web APIs
working draft editor's draft. ...
Animation.onremove - Web APIs
animation that animates the <div> element to the position of the mouse pointer. this could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically remove overriding forward filling animations. a console message is logged each time an animation it removed, invoked when the remove event is fired. specifications specification status comment web animationsthe definition of 'animation.onremove' in that specification. working draft editor's draft. ...
Animation.pause() - Web APIs
Web › API › Animation › pause
working draft ...
Animation.pending - Web APIs
Web › API › Animation › pending
working draft ...
Animation.persist() - Web APIs
Web › API › Animation › persist
could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically remove overriding forward filling animations. you can see the replacestate of the animation being logged at the end of the handler. this will be active for each animation by default, or persisted if the persist() call is uncommented. specifications specification status comment web animationsthe definition of 'persist()' in that specification. working draft ...
Animation.play() - Web APIs
Web › API › Animation › play
cks or taps var growalice = function() { // play alice's animation. alicechange.play(); // play the cake's animation. nommingcake.play(); } // when a user holds their mouse down or taps, call growalice to make all the animations play. cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification. working draft ...
Animation.playState - Web APIs
working draft initial definition. ...
Animation.playbackRate - Web APIs
working draft ...
Animation.ready - Web APIs
Web › API › Animation › ready
working draft editor's draft. ...
Animation.replaceState - Web APIs
could result in a huge animations list, which could create a memory leak. for this reason, modern browsers automatically remove overriding forward filling animations. you can see the replacestate of the animation being logged at the end of the handler. this will be active for each animation by default, or persisted if the persist() call is uncommented. specifications specification status comment web animationsthe definition of 'animation.replacestate' in that specification. working draft ...
Animation.reverse() - Web APIs
Web › API › Animation › reverse
working draft ...
Animation.startTime - Web APIs
; // 23.404 // 24.192 // 25.514 // ... // reduced time precision with `privacy.resistfingerprinting` enabled animation.starttime; // 49.8 // 50.6 // 51.7 // ... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment web animationsthe definition of 'animation.starttime' in that specification. working draft editor's draft. ...
Animation.timeline - Web APIs
working draft editor's draft. ...
Animation.updatePlaybackRate() - Web APIs
turn value none. examples a speed selector component would benefit from smooth updating of updateplaybackrate(), as demonstrated below: speedselector.addeventlistener('input', evt => { cartoon.updateplaybackrate(parsefloat(evt.target.value)); cartoon.ready.then(() => { console.log(`playback rate set to ${cartoon.playbackrate}`); }); }); specifications specification status comment web animationsthe definition of 'updateplaybackrate()' in that specification. working draft ...
Animation - Web APIs
Web › API › Animation
essed a preference for no animated experiences. designing safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 specifications specification status comment web animationsthe definition of 'animation' in that specification. working draft initial definition ...
AnimationEffect.getComputedTiming() - Web APIs
tion is through its current iteration with values between 0 and 1. returns null if the animation is not running or its keyframeeffect isn't associated with an animation. currentiteration the number of times this animation has looped, starting from 0. returns null if the animation is not running or its keyframeeffect isn't associated with an animation. specifications specification status comment web animationsthe definition of 'animationeffect.getcomputedtiming()' in that specification. working draft editor's draft. ...
AnimationEffect.getTiming() - Web APIs
working draft editor's draft. ...
AnimationEffect.updateTiming() - Web APIs
the updatetiming() method of the animationeffect interface updates the specified timing properties for an animation effect. syntax animation.updatetiming(timing); parameters timing an optionaleffecttiming object containing the timing properties to update. return value none. specifications specification status comment web animationsthe definition of 'animationeffect.updatetiming()' in that specification. working draft editor's draft. ...
AnimationEffect - Web APIs
working draft editor's draft. ...
AnimationEvent() - Web APIs
* delay). it defaults to 0.0. pseudoelement optional is a domstring, starting with "::", containing the name of the pseudo-element the animation runs on. if the animation doesn't run on a pseudo-element but on the element itself, specify an empty string: "". it defaults to "". return value a new animationevent, initialized per any provided options. specifications specification status comment css animationsthe definition of 'animationevent()' in that specification. working draft initial definition. ...
AnimationEvent.animationName - Web APIs
the animationevent.animationname read-only property is a domstring containing the value of the animation-name css property associated with the transition. syntax name = animationevent.animationname specifications specification status comment css animationsthe definition of 'animationevent.animationname' in that specification. working draft initial definition. ...
AnimationEvent.elapsedTime - Web APIs
the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. for an animationstart event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay). syntax time = animationevent.elapsedtime specifications specification status comment css animationsthe definition of 'animationevent.elapsedtime' in that specification. working draft initial definition. ...
AnimationEvent.pseudoElement - Web APIs
summary the animationevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on. if the animation doesn't run on a pseudo-element but on the element, an empty string: ''. syntax name = animationevent.pseudoelement specifications specification status comment css animationsthe definition of 'animationevent.pseudoelement' in that specification. working draft initial definition. ...
AnimationEvent - Web APIs
taining the name of the pseudo-element the animation runs on. if the animation doesn't run on a pseudo-element but on the element, an empty string: ''. methods also inherits methods from its parent event. animationevent.initanimationevent() initializes a animationevent created using the deprecated document.createevent("animationevent") method. specifications specification status comment css animationsthe definition of 'animationevent' in that specification. working draft initial definition. ...
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
bject containing the following fields: bubbles optional defaults to false, of type boolean, indicating if the event bubbles or not. cancelable optional defaults to false, of type boolean, indicating if the event can be canceled or not. detail optional defaults to null, of type any — an event-dependent value associated with the event. specifications specification status comment web animationsthe definition of 'animationplaybackevent()' in that specification. working draft editor's draft. ...
AnimationPlaybackEvent.currentTime - Web APIs
3.404 // 24.192 // 25.514 // ... // reduced time precision with `privacy.resistfingerprinting` enabled playbackevent.currenttime; // 49.8 // 50.6 // 51.7 // ... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment web animationsthe definition of 'animationplaybackevent.currenttime' in that specification. working draft editor's draft. ...
AnimationPlaybackEvent.timelineTime - Web APIs
f the animationplaybackevent interface represents the time value of the animation's timeline at the moment the event is queued. this will be unresolved if the animation was not associated with a timeline at the time the event was generated or if the associated timeline was inactive. value a number representing the current time in milliseconds, or null. specifications specification status comment web animationsthe definition of 'animationplaybackevent.timelinetime' in that specification. working draft editor's draft. ...
AnimationPlaybackEvent - Web APIs
n events. constructor animationplaybackevent.animationplaybackevent() constructs a new animationplaybackevent object instance. attributes animationplaybackevent.currenttime the current time of the animation that generated the event. animationplaybackevent.timelinetime the time value of the timeline of the animation that generated the event. specifications specification status comment web animationsthe definition of 'animationplaybackevent' in that specification. working draft editor's draft. ...
AnimationTimeline.currentTime - Web APIs
04 // 24.192 // 25.514 // ... // reduced time precision with `privacy.resistfingerprinting` enabled animationtimeline.currenttime; // 49.8 // 50.6 // 51.7 // ... in firefox, you can also enable privacy.resistfingerprinting; the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment web animationsthe definition of 'currenttime' in that specification. working draft editor's draft. ...
AnimationTimeline - Web APIs
rited by documenttimeline and future timeline types) and is not itself directly used by developers. anywhere you see animationtimeline, you should use documenttimeline or any other timeline type instead. properties animationtimeline.currenttime read only returns the time value in milliseconds for this timeline or null if this timeline is inactive. specifications specification status comment web animationsthe definition of 'animationtimeline' in that specification. working draft editor's draft. ...
ArrayBufferView - Web APIs
candidate recommendation initial definition. ...
Attr.localName - Web APIs
Web › API › Attr › localName
living standard initial definition ...
Attr.namespaceURI - Web APIs
Web › API › Attr › namespaceURI
it its namespace from the element it is attached to. if an attribute is not explicitly given a namespace, it has no namespace. the dom does not handle or enforce namespace validation per se. it is up to the dom application to do any validation necessary. note too that the namespace prefix, once it is associated with a particular node, cannot be changed. specifications specification status comment domthe definition of 'attr: namespaceuri' in that specification. living standard ...
Attr.prefix - Web APIs
Web › API › Attr › prefix
s defined within the node interface. syntax string = attribute.prefix examples the following logs "x" to the console. <div x:id="example" onclick="console.log(this.attributes[0].prefix)"/> notes this will only work when a namespace-aware parser is used, i.e. when a document is served with an xml mime type. this will not work for html documents. specifications specification status comment domthe definition of 'attr: prefix' in that specification. living standard dom4the definition of 'attr.prefix' in that specification. obsolete ...
Attr - Web APIs
Web › API › Attr
s going away. removeattributenode() use element.removeattribute() instead. removechild() obsolete since gecko 14 modify the value of attr.value instead. replacechild() obsolete since gecko 14 modify the value of attr.value instead. setattributenode() use element.setattribute() instead. setattributenodens() use element.setattributens() instead. specifications specification status comment domthe definition of 'attr' in that specification. living standard added ownerelement property back dom4the definition of 'attr' in that specification. obsolete moved namespaceuri, prefix and localname from node to this api and removed ownerelement, schematypeinfo and isid. document object model (dom) level 3 core specificationthe definition o...
AudioBuffer() - Web APIs
s removed from the spec. return value a new audiobuffer object instance. exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range). rangeerror there isn't enough memory available to allocate the buffer. specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet...
AudioBuffer.copyFromChannel() - Web APIs
t in the source buffer; that is, it's greater than its current length. example this example creates a new audio buffer, then copies the samples from another channel into it. var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var anotherarray = new float32array(length); myarraybuffer.copyfromchannel(anotherarray, 1, 0); specification specification status comment web audio apithe definition of 'copyfromchannel' in that specification. working draft ...
AudioBuffer.copyToChannel() - Web APIs
working draft ...
AudioBuffer.duration - Web APIs
working draft ...
AudioBuffer.getChannelData() - Web APIs
working draft ...
AudioBuffer.length - Web APIs
working draft ...
AudioBuffer.numberOfChannels - Web APIs
working draft ...
AudioBuffer.sampleRate - Web APIs
working draft ...
AudioBuffer - Web APIs
working draft initial definition. ...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
earest integer value. thus, its behavior is independent of the value of the playbackrate parameter. playbackrate: the speed at which to render the audio stream. its default value is 1. this parameter is k-rate. this is a compound parameter with detune. its nominal range is (-∞ to +∞). return value a new audiobuffersourcenode object instance. specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefir...
AudioBufferSourceNode.buffer - Web APIs
working draft initial definition ...
AudioBufferSourceNode.detune - Web APIs
working draft ...
AudioBufferSourceNode.loop - Web APIs
working draft ...
AudioBufferSourceNode.loopEnd - Web APIs
tion(e){"error with decoding audio data" + e.err}); } request.send(); } ... loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopend' in that specification. working draft ...
AudioBufferSourceNode.loopStart - Web APIs
tion(e){"error with decoding audio data" + e.err}); } request.send(); } ... loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopstart' in that specification. working draft ...
AudioBufferSourceNode.playbackRate - Web APIs
working draft ...
AudioBufferSourceNode.start() - Web APIs
working draft ...
AudioBufferSourceNode - Web APIs
working draft ...
AudioConfiguration - Web APIs
up that 1s. } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported, ' + (result.smooth ? '' : 'not ') + 'smooth, and ' + (result.powerefficient ? '' : 'not ') + 'power efficient.' }); specifications specification status comment media capabilitiesthe definition of 'audioconfiguration' in that specification. draft initial definition ...
AudioContext() - Web APIs
...' is not a valid enum value of type audiocontextlatencycategory". example this example creates a new audiocontext for interactive audio (optimizing for latency) and a sample rate of 44.1khz. var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext({ latencyhint: 'interactive', samplerate: 44100, }); specifications specification status comment web audio apithe definition of 'audiocontext()' in that specification. working draft initial definition. ...
AudioContext.baseLatency - Web APIs
ency = audioctx.baselatency; value a double representing the base latency in seconds. example // default latency ("interactive") const audioctx1 = new audiocontext(); console.log(audioctx1.baselatency); // 0.00 // higher latency ("playback") const audioctx2 = new audiocontext({ latencyhint: 'playback' }); console.log(audioctx2.baselatency); // 0.15 specifications specification status comment web audio apithe definition of 'baselatency' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet...
AudioContext.close() - Web APIs
ing live.) when the stop button is clicked, close() is called. when the promise resolves, the example is reset to its beginning state. stopbtn.onclick = function() { audioctx.close().then(function() { startbtn.removeattribute('disabled'); susresbtn.setattribute('disabled', 'disabled'); stopbtn.setattribute('disabled', 'disabled'); }); } specifications specification status comment web audio apithe definition of 'close()' in that specification. working draft ...
AudioContext.createMediaElementSource() - Web APIs
working draft ...
AudioContext.createMediaStreamDestination() - Web APIs
mediarecorder.onstop = function(evt) { // make blob out of our blobs, and open it. var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); document.queryselector("audio").src = url.createobjecturl(blob); }; </script> </body> </html> note: you can view this example live, or study the source code, on github. specifications specification status comment web audio apithe definition of 'createmediastreamdestination()' in that specification. working draft ...
AudioContext.createMediaStreamSource() - Web APIs
working draft ...
AudioContext.createMediaStreamTrackSource() - Web APIs
working draft ...
AudioContext.getOutputTimestamp() - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefo...
AudioContext.outputLatency - Web APIs
me at which the first sample in the buffer is actually processed by the audio output device. it varies depending on the platform and the available hardware. syntax var outputlatency = audioctx.outputlatency; value a double representing the output latency in seconds. example const audioctx = new audiocontext(); console.log(audioctx.outputlatency); specifications specification status comment web audio apithe definition of 'outputlatency' in that specification. working draft ...
AudioContext.resume() - Web APIs
propriate once the promise resolves. susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'resume()' in that specification. working draft ...
AudioContext.suspend() - Web APIs
propriate once the promise resolves. susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'close()' in that specification. working draft ...
AudioContext - Web APIs
n the process. examples basic audio context declaration: var audioctx = new audiocontext(); cross browser variant: var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); var finish = audioctx.destination; // etc. specifications specification status comment web audio apithe definition of 'audiocontext' in that specification. working draft ...
AudioContextLatencyCategory - Web APIs
ible latency that doesn't cause glitches in the audio. this is likely to require increased power consumption. this is the default value. "playback" the user agent should select a latency that will maximize playback time by minimizing power consumption at the expense of latency. useful for non-interactive playback, such as playing music. specifications specification status comment web audio apithe definition of 'audiocontextlatencycategory' in that specification. working draft initial definition. ...
AudioContextOptions.latencyHint - Web APIs
can). the value can also be specified as a double-precision floating-point value, specifying the preferred maximum latency in seconds. this provides more precise control over the balance between audio latency and device energy usage. to determine the actual latency of the context after creating it, check the value of the context's baselatency property. specifications specification status comment web audio apithe definition of 'audiocontextoptions.latencyhint' in that specification. working draft initial definition. ...
AudioContextOptions.sampleRate - Web APIs
hould typically be between 8,000 hz and 96,000 hz; the default will vary depending on the output device, but the sample rate 44,100 hz is the most common. if the samplerate property is not included in the options, or the options are not specified when creating the audio context, the new context's output device's preferred sample rate is used by default. specifications specification status comment web audio apithe definition of 'audiocontextoptions.samplerate' in that specification. working draft initial definition. ...
AudioContextOptions - Web APIs
ing power consumption at the expense of latency. useful for non-interactive playback, such as playing music. example this example instantiates an audio context for music playback (optimized for power consumption over latency), with the sample rate 48,000 hz. let musiccontext = new audiocontext({ latencyhint: "playback", samplerate: 48000 }); specifications specification status comment web audio apithe definition of 'audiocontextoptions' in that specification. working draft initial definition. ...
AudioDestinationNode.maxChannelCount - Web APIs
working draft ...
AudioDestinationNode - Web APIs
working draft ...
AudioListener.forwardX - Web APIs
working draft ...
AudioListener.forwardY - Web APIs
working draft ...
AudioListener.forwardZ - Web APIs
working draft ...
AudioListener.positionX - Web APIs
working draft ...
AudioListener.positionY - Web APIs
working draft ...
AudioListener.positionZ - Web APIs
working draft ...
AudioListener.setPosition() - Web APIs
working draft ...
AudioListener.upX - Web APIs
Web › API › AudioListener › upX
working draft ...
AudioListener.upY - Web APIs
Web › API › AudioListener › upY
working draft ...
AudioListener.upZ - Web APIs
Web › API › AudioListener › upZ
working draft ...
AudioListener - Web APIs
working draft ...
AudioNode.channelCount - Web APIs
ar channels = oscillator.channelcount; value an integer. example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcount; specifications specification status comment web audio apithe definition of 'channelcount' in that specification. working draft ...
AudioNode.channelCountMode - Web APIs
ed value representing a channelcountmode. example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcountmode = 'explicit'; specifications specification status comment web audio apithe definition of 'channelcountmode' in that specification. working draft ...
AudioNode.channelInterpretation - Web APIs
epresenting a channelinterpretation. example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelinterpretation = 'discrete'; specifications specification status comment web audio apithe definition of 'channelinterpretation' in that specification. working draft ...
AudioNode.connect() - Web APIs
Web › API › AudioNode › connect
have without any audio connections), including any timeline changes scheduled for the parameter. therefore, it is possible to choose the range in which an audioparam will change by setting the value of the audioparam to the central frequency, and to use a gainnode between the audio source and the audioparam to adjust the range of the audioparam changes. specifications specification status comment web audio apithe definition of 'connect() to an audionode' in that specification. working draft web audio apithe definition of 'connect() to an audioparam' in that specification. working draft ...
AudioNode.context - Web APIs
Web › API › AudioNode › context
working draft ...
AudioNode.disconnect() - Web APIs
s called isn't connected to the specified destination node. example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); gainnode.disconnect(); specifications specification status comment web audio apithe definition of 'disconnect' in that specification. working draft ...
AudioNode.numberOfInputs - Web APIs
integer ≥ 0. example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofinputs); // 0 console.log(gainnode.numberofinputs); // 1 console.log(audioctx.destination.numberofinputs); // 1 specifications specification status comment web audio apithe definition of 'numberofinputs' in that specification. working draft ...
AudioNode.numberOfOutputs - Web APIs
eger ≥ 0. example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofoutputs); // 1 console.log(gainnode.numberofoutputs); // 1 console.log(audioctx.destination.numberofoutputs); // 0 specifications specification status comment web audio apithe definition of 'numberofoutputs' in that specification. working draft ...
AudioNode - Web APIs
Web › API › AudioNode
working draft ...
AudioNodeOptions - Web APIs
information including default values.) channelinterpretation optional represents an enumerated value describing the meaning of the channels. this interpretation will define how audio up-mixing and down-mixing will happen. the possible values are "speakers" or "discrete". (see audionode.channelcountmode for more information including default values.) specifications specification status comment web audio apithe definition of 'audionodeoptions' in that specification. working draft initial definition. ...
AudioParam.cancelAndHoldAtTime() - Web APIs
n time until further changes are made using other methods. syntax var audioparam = audioparam.cancelandholdattime(canceltime) parameters canceltime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled. return value a reference to the audioparam it was called on. specifications specification status comment web audio apithe definition of 'cancelandholdattime()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
AudioParam.cancelScheduledValues() - Web APIs
all scheduled changes will be cancelled. returns a reference to this audioparam object. in some older implementations this method returns void. examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audioparam gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification. working draft ...
AudioParam.defaultValue - Web APIs
by the specific audionode creating the audioparam. syntax var defaultval = audioparam.defaultvalue; value a floating-point number. example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); const defaultval = gainnode.gain.defaultvalue; console.log(defaultval); // 1 console.log(defaultval === gainnode.gain.value); // true specifications specification status comment web audio apithe definition of 'defaultvalue' in that specification. working draft ...
AudioParam.exponentialRampToValueAtTime() - Web APIs
working draft ...
AudioParam.linearRampToValueAtTime() - Web APIs
working draft ...
AudioParam.maxValue - Web APIs
maximum value permitted for the parameter's nominal range. the default value of maxvalue is the maximum positive single-precision floating-point value (+340,282,346,638,528,859,811,704,183,484,516,925,440). example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.maxvalue); // 3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'maxvalue' in that specification. working draft ...
AudioParam.minValue - Web APIs
nimum value permitted for the parameter's nominal range. the default value of minvalue is the minimum negative single-precision floating-point value (-340,282,346,638,528,859,811,704,183,484,516,925,440). example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.minvalue); // -3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'minvalue' in that specification. working draft ...
AudioParam.setTargetAtTime() - Web APIs
working draft ...
AudioParam.setValueAtTime() - Web APIs
working draft ...
AudioParam.setValueCurveAtTime() - Web APIs
working draft ...
AudioParam.value - Web APIs
Web › API › AudioParam › value
value of a parameter is maintained to accurately reflect the state of the parameter over time. example this example instantly changes the volume of a gainnode to 40%. const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); gainnode.gain.value = 0.4; //which is identical to: gainnode.gain.setvalueattime(0.4, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'value' in that specification. working draft ...
AudioParam - Web APIs
working draft ...
AudioParamDescriptor - Web APIs
working draft initial definition. ...
AudioScheduledSourceNode: ended event - Web APIs
working draft initial specification. ...
AudioScheduledSourceNode.onended - Web APIs
es as input a single parameter, which is an object of type event describing the event that occurred. examples in this simple example, an event listener for the ended event is set up to enable a "start" button in the user interface when the node stops playing. node.onended = function(event) { document.getelementbyid("startbutton").disabled = false; } specifications specification status comment web audio apithe definition of 'onended' in that specification. working draft initial specification. ...
AudioScheduledSourceNode.start() - Web APIs
working draft ...
AudioScheduledSourceNode.stop() - Web APIs
once and to stop playing in one second. the stop time is determined by taking the audio context's current time from audiocontext.currenttime and adding 1 second. context = new audiocontext(); osc = context.createoscillator(); osc.connect(context.destination); /* let's play a sine wave for one second. */ osc.start(); osc.stop(context.currenttime + 1); specifications specification status comment web audio apithe definition of 'stop()' in that specification. working draft ...
AudioScheduledSourceNode - Web APIs
working draft ...
AudioTrack.enabled - Web APIs
actually a javascript array, it can be accessed like one for the most part). the scan looks for the tracks whose kind values are "main" and "commentary" and remembers those audiotrack objects. once those have been found, the values of the two tracks' enabled properties are exchanged, which results in swapping which of the two tracks is currently active. specifications specification status comment html living standardthe definition of 'audiotrack.enabled' in that specification. living standard html5the definition of 'audiotrack.enabled' in that specification. recommendation ...
AudioTrack.id - Web APIs
Web › API › AudioTrack › id
ement. the track id can also be used as the fragment of a url that loads the specific track (if the media supports media fragments). syntax var trackid = audiotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an audiotracklist such as the one specified by a media element's audiotracks property. specifications specification status comment html living standardthe definition of 'audiotrack.id' in that specification. living standard html5the definition of 'audiotrack.id' in that specification. recommendation ...
AudioTrack.kind - Web APIs
Web › API › AudioTrack › kind
to it. "translation" a translated version of the primary audio track. "commentary" an audio track containing a commentary. this might be used to contain the director's commentary track on a movie, for example. "" (empty string) the track doesn't have an explicit kind, or the kind provided by the track's metadata isn't recognized by the user agent. specifications specification status comment html living standardthe definition of 'audiotrack: kind' in that specification. living standard html5the definition of 'audiotrack.kind' in that specification. recommendation ...
AudioTrack.label - Web APIs
Web › API › AudioTrack › label
living standard html5the definition of 'audiotrack.label' in that specification. recommendation ...
AudioTrack.language - Web APIs
ple. function getavailablelanguages(el) { var tracklist = []; const wantedkinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, language: track.language }); } }); return tracklist; } specifications specification status comment html living standardthe definition of 'audiotrack.language' in that specification. living standard html5the definition of 'audiotrack.language' in that specification. recommendation ...
AudioTrack.sourceBuffer - Web APIs
recommendation ...
AudioTrack - Web APIs
living standard html5the definition of 'audiotrack' in that specification. recommendation ...
AudioTrackList: addtrack event - Web APIs
living standard ...
AudioTrackList: change event - Web APIs
living standard ...
AudioTrackList.getTrackById() - Web APIs
living standard html5the definition of 'audiotracklist.gettrackbyid()' in that specification. recommendation ...
AudioTrackList.length - Web APIs
irst <video> element found in the dom by queryselector(). var videoelem = document.queryselector("video"); var numaudiotracks = 0; if (videoelem.audiotracks) { numaudiotracks = videoelem.audiotracks.length; } note that this sample checks to be sure htmlmediaelement.audiotracks is defined, to avoid failing on browsers without support for audiotrack. specifications specification status comment html living standardthe definition of 'audiotracklist.length' in that specification. living standard html5the definition of 'audiotracklist.length' in that specification. recommendation ...
AudioTrackList.onaddtrack - Web APIs
r the addtrack event that calls a function, addtotracklist(), passing in the audiotrack object representing the newly-added track. in this scenario, that function's role is to add the new track to a list of audio tracks available to choose from. document.queryselector("video").audiotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'audiotracklist.onaddtrack' in that specification. living standard html5the definition of 'audiotracklist.onaddtrack' in that specification. recommendation ...
AudioTrackList.onchange - Web APIs
living standard html5the definition of 'audiotracklist.onchange' in that specification. recommendation ...
AudioTrackList.onremovetrack - Web APIs
io tracks in the media element whenever a track is removed from the media element. document.queryselector("my-video").audiotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").audiotracks.length; }; the current number of audio tracks remaining in the media element is obtained from audiotracklist property length. specifications specification status comment html living standardthe definition of 'audiotracklist.onremovetrack' in that specification. living standard html5the definition of 'audiotracklist.onremovetrack' in that specification. recommendation ...
AudioTrackList: removetrack event - Web APIs
living standard ...
AudioTrackList - Web APIs
app that displays information about the number of channels available. to keep it up to date, handlers for the addtrack and removetrack events are set up. audiotracks.onaddtrack = updatetrackcount; audiotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = audiotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'audiotracklist' in that specification. living standard html5the definition of 'audiotracklist' in that specification. recommendation ...
AudioWorklet - Web APIs
terface does not define any properties of its own, but does inherit properties of worklet. methods this interface inherits methods from worklet. the audioworklet interface does not define any methods of its own. events audioworklet has no events to which it responds. examples see audioworkletnode for complete examples of custom audio node creation. specifications specification status comment web audio apithe definition of 'audioworklet' in that specification. working draft initial definition. ...
AudioWorkletGlobalScope.registerProcessor - Web APIs
working draft ...
AudioWorkletGlobalScope - Web APIs
the name of the processor to it — and connect the node to an audio graph. we should see the output of console.log calls in the console: const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const testnode = new audioworkletnode(audiocontext, 'test-processor') testnode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletglobalscope' in that specification. working draft ...
AudioWorkletNode() - Web APIs
instance. exceptions notsupportederror the specified options.outputchannelcount is 0 or larger than the current implementation supports. indexsizeerror the length of options.outputchannelcount array does not match options.numberofoutputs. example for a complete example demonstrating user-defined audio processing, see the audioworkletnode page. specifications specification status comment web audio apithe definition of 'audioworkletnode()' in that specification. working draft initial definition. ...
AudioWorkletNode.onprocessorerror - Web APIs
working draft ...
AudioWorkletNode.parameters - Web APIs
working draft ...
AudioWorkletNode.port - Web APIs
working draft ...
AudioWorkletNode - Web APIs
te an instance of audioworkletnode passing it the name of the processor, and connect the node to an audio graph. const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletnode' in that specification. working draft ...
AudioWorkletNodeOptions - Web APIs
working draft initial definition. ...
AudioWorkletProcessor() - Web APIs
working draft initial definition. ...
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
working draft ...
AudioWorkletProcessor.port - Web APIs
working draft ...
AudioWorkletProcessor.process - Web APIs
working draft ...
AudioWorkletProcessor - Web APIs
an instance of audioworkletnode, passing it the name of the processor, then connect the node to an audio graph. const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletprocessor' in that specification. working draft ...
AuthenticatorAssertionResponse.authenticatorData - Web APIs
recommendation initial definition. ...
AuthenticatorAssertionResponse.signature - Web APIs
recommendation initial definition. ...
AuthenticatorAssertionResponse.userHandle - Web APIs
recommendation initial definition. ...
AuthenticatorAssertionResponse - Web APIs
recommendation initial definition. ...
AuthenticatorAttestationResponse.attestationObject - Web APIs
recommendation initial definition. ...
AuthenticatorAttestationResponse.getTransports() - Web APIs
recommendation initial definition. ...
AuthenticatorAttestationResponse - Web APIs
recommendation initial definition. ...
AuthenticatorResponse - Web APIs
recommendation initial definition. ...
BaseAudioContext.audioWorklet - Web APIs
working draft initial definition. ...
BaseAudioContext.createAnalyser() - Web APIs
working draft ...
BaseAudioContext.createBiquadFilter() - Web APIs
working draft ...
BaseAudioContext.createBuffer() - Web APIs
working draft ...
BaseAudioContext.createBufferSource() - Web APIs
working draft ...
BaseAudioContext.createChannelMerger() - Web APIs
vely swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelmerger()' in that specification. working draft ...
BaseAudioContext.createChannelSplitter() - Web APIs
vely swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelsplitter()' in that specification. working draft ...
BaseAudioContext.createConstantSource() - Web APIs
teconstantsource() property of the baseaudiocontext interface creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value. syntax var constantsourcenode = audiocontext.createconstantsource() parameters none. returns a constantsourcenode instance. specifications specification status comment web audio apithe definition of 'createconstantsource()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
BaseAudioContext.createConvolver() - Web APIs
working draft ...
BaseAudioContext.createDelay() - Web APIs
working draft ...
BaseAudioContext.createDynamicsCompressor() - Web APIs
working draft ...
BaseAudioContext.createGain() - Web APIs
ear something, make sure you haven't // connected your source into the output in addition to using the gainnode. gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'creategain()' in that specification. working draft ...
BaseAudioContext.createIIRFilter() - Web APIs
ers, the first of which must not be zero. return value an iirfilternode implementing the filter with the specified feedback and feedforward coefficient arrays. exceptions invalidstateerror all of the feedforward coefficients are 0, and/or the first feedback coefficient is 0. notsupportederror one or both of the input arrays exceeds 20 members. specifications specification status comment web audio apithe definition of 'createiirfilter()' in that specification. working draft ...
BaseAudioContext.createOscillator() - Web APIs
on. // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification. working draft ...
BaseAudioContext.createPanner() - Web APIs
working draft ...
BaseAudioContext.createPeriodicWave() - Web APIs
we get a sine wave. the coefficients of the fourier transform should be given in ascending order (i.e. (a+bi)ei,(c+di)e2i,(f+gi)e3i\left(a+bi\right)e^{i} , \left(c+di\right)e^{2i} , \left(f+gi\right)e^{3i} etc.) and can be positive or negative. a simple way of manually obtaining such coefficients (though not the best) is to use a graphing calculator. specifications specification status comment web audio apithe definition of 'createperiodicwave' in that specification. working draft ...
BaseAudioContext.createScriptProcessor() - Web APIs
working draft ...
BaseAudioContext.createStereoPanner() - Web APIs
working draft ...
BaseAudioContext.createWaveShaper() - Web APIs
working draft ...
BaseAudioContext.currentTime - Web APIs
// 23.404 // 24.192 // 25.514 // ... // reduced time precision with `privacy.resistfingerprinting` enabled audioctx.currenttime; // 49.8 // 50.6 // 51.7 // ... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment web audio apithe definition of 'currenttime' in that specification. working draft initial definition. ...
BaseAudioContext.decodeAudioData() - Web APIs
working draft ...
BaseAudioContext.destination - Web APIs
thub repo, like voice-change-o-matic. var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillatornode.connect(gainnode); gainnode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'destination' in that specification. working draft ...
BaseAudioContext.listener - Web APIs
syntax baseaudiocontext.listener; value an audiolistener object. example note: for a full web audio spatialization example, see our panner-node demo. var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix ... var mylistener = audioctx.listener; specifications specification status comment web audio apithe definition of 'listener' in that specification. working draft ...
BaseAudioContext.onstatechange - Web APIs
o context's state changes. syntax baseaudiocontext.onstatechange = function() { ... }; example the following snippet is taken from our audiocontext states demo (see it running live.) the onstatechange hander is used to log the current state to the console every time it changes. audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'onstatechange' in that specification. working draft ...
BaseAudioContext.sampleRate - Web APIs
udio example implementation, see one of our web audio demos on the mdn github repo, like panner-node. try entering audioctx.samplerate into your browser console. var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix ... console.log(audioctx.samplerate); specifications specification status comment web audio apithe definition of 'samplerate' in that specification. working draft ...
BaseAudioContext.state - Web APIs
working draft ...
BaseAudioContext - Web APIs
working draft ...
BasicCardRequest.supportedNetworks - Web APIs
truments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { ... }; var options = { ... }; var request = new paymentrequest(supportedinstruments, details, options); specifications specification status comment basic card paymentthe definition of 'supportednetworks' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
BasicCardRequest - Web APIs
working draft initial definition. ...
BasicCardResponse.billingAddress - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'billingaddress' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
BasicCardResponse.cardNumber - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardnumber' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
BasicCardResponse.cardSecurityCode - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardsecuritycode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
BasicCardResponse.cardholderName - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardholdername' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
BasicCardResponse.expiryMonth - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expirymonth' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
BasicCardResponse.expiryYear - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expiryyear' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
BasicCardResponse - Web APIs
the structure defined by the basiccardresponse dictionary, and may look something like this: { "cardnumber' : '9999999999999999", "cardholdername' : 'mr. dick straw", "cardsecuritycode" : "999", "expirymonth" : "07", "expiryyear" : "2021", "billingaddress" : { "country" : "gb", // etc. billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'basiccardresponse' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
BatteryManager.level - Web APIs
turned if the implementation isn't able to determine the battery charge level or if the system is not battery-powered. example html content <div id="level">(battery level unknown)</div> javascript content navigator.getbattery().then(function(battery) { var level = battery.level; document.queryselector('#level').textcontent = level; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingchange - Web APIs
chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingchange = chargingchange(); function chargingchange() { document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingtimechange - Web APIs
ging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingtimechange = chargingtimechange(); function chargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.ondischargingtimechange - Web APIs
me unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.ondischargingtimechange = dischargingtimechange; function dischargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onlevelchange - Web APIs
ryselector('#level').textcontent = battery.level; if(battery.charging) { document.queryselector('#statebaterry').textcontent = "charging time: " + (battery.chargingtime / 60); } else { document.queryselector('#statebaterry').textcontent = "discharging time: " + (battery.dischargingtime / 60); } }; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BeforeUnloadEvent - Web APIs
ple. window.addeventlistener("beforeunload", function (e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification. living standard initial definition ...
BiquadFilterNode() - Web APIs
: the sharpness of the phase transition at the center frequency. a larger value implies a sharper transition and a larger group delay. frequency: the frequency where the center of the phase transition occurs. viewed another way, this is the frequency with maximal group delay. gain: not used. return value a new biquadfilternode object instance. specifications specification status comment web audio apithe definition of 'biquadfilternode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxin...
BiquadFilterNode.Q - Web APIs
working draft ...
BiquadFilterNode.detune - Web APIs
working draft ...
BiquadFilterNode.frequency - Web APIs
working draft ...
BiquadFilterNode.gain - Web APIs
working draft ...
BiquadFilterNode.getFrequencyResponse() - Web APIs
working draft ...
BiquadFilterNode.type - Web APIs
working draft ...
BiquadFilterNode - Web APIs
working draft ...
Blob() - Web APIs
Web › API › Blob › Blob
without changing them. to convert newlines to the host system's native convention, specify the value native. return value a new blob object containing the specified data. example var afileparts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single domstring var omyblob = new blob(afileparts, {type : 'text/html'}); // the blob specification specification status comment file apithe definition of 'blob()' in that specification. working draft initial definition. ...
Blob.arrayBuffer() - Web APIs
Web › API › Blob › arrayBuffer
for example, if the reader used to fetch the blob's data throws an exception. any exceptions thrown while getting the data will be converted into rejections. usage notes while similar to the filereader.readasarraybuffer() method, arraybuffer() returns a promise rather than being an event-based api, as is the case with the filereader interface's method. specifications specification status comment file apithe definition of 'blob.arraybuffer()' in that specification. working draft ...
Blob.size - Web APIs
Web › API › Blob › size
gths in bytes. // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { console.log(files[i].name + " has a size of " + files[i].size + " bytes"); } specifications specification status comment file apithe definition of 'blob.size' in that specification. working draft initial definition. ...
Blob.slice() - Web APIs
Web › API › Blob › slice
he blob. the default value is size. contenttype optional the content type to assign to the new blob; this will be the value of its type property. the default value is an empty string. return value a new blob object containing the specified subset of the data contained within the blob on which this method was called. the original blob is not altered. specifications specification status comment file apithe definition of 'blob.slice()' in that specification. working draft initial definition ...
Blob.stream() - Web APIs
Web › API › Blob › stream
the blob's data to a writable stream. call the returned stream's tee() method to tee the readable stream. this returns an array containing two new readablestream objects, each of which returns the contents of the blob. call the returned stream's pipethrough() method to pipe the stream through a transformstream or any other readable and writable pair. specifications specification status comment file apithe definition of 'blob.stream()' in that specification. working draft ...
Blob.text() - Web APIs
Web › API › Blob › text
hat performs a similar function. it works on both blob and file objects. there are two key differences: blob.text() returns a promise, whereas filereader.readastext() is an event based api. blob.text() always uses utf-8 as encoding, while filereader.readastext() can use a different encoding depending on the blob's type and a specified encoding name. specifications specification status comment file apithe definition of 'blob.text()' in that specification. working draft ...
Blob.type - Web APIs
Web › API › Blob › type
working draft initial definition. ...
Blob - Web APIs
Web › API › Blob
blob); another way to read content from a blob is to use a response. the following code reads the content of a blob as text: const text = await (new response(blob)).text(); or by using blob.prototype.text(): const text = await blob.text(); by using other methods of filereader, it is possible to read the contents of a blob as a string or a data url. specifications specification status comment file apithe definition of 'the blob interface' in that specification. working draft initial definition. ...
BlobEvent.BlobEvent() - Web APIs
structor returns a newly created blobevent object with an associated blob. syntax blobevent = new blobevent({data: aspecificblob}[, timecode]); arguments the blobevent() constructor also inherits arguments from event(). data is a blob associated with the event. timecode optional a domhighrestimestamp to be used in initializing the blob event. specifications specification status comment mediastream recordingthe definition of 'blobevent: blobevent' in that specification. working draft initial definition. ...
BlobEvent.data - Web APIs
Web › API › BlobEvent › data
the blobevent.data read-only property represents a blob associated with the event. syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification. working draft initial definition. ...
BlobEvent.timecode - Web APIs
bevent interface a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data, and the timestamp of the first chunk in the first blobevent produced by this recorder. note that the timecode in the first produced blobevent does not need to be zero. syntax var timecode = blobevent.timecode value a domhighrestimestamp. specifications specification status comment mediastream recordingthe definition of 'timecode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
BlobEvent - Web APIs
Web › API › BlobEvent
working draft initial definition. ...
Bluetooth.getAvailability() - Web APIs
this method doesn't throw any exceptions. examples the following snippet prints out a message in the console specifying wheter or not bluetooth is supported: navigator.bluetooth.getavailability().then(available => { if (available) console.log("this device supports bluetooth!"); else console.log("doh! bluetooth is not supported"); }); specifications specification status comment web bluetooththe definition of 'getavailability()' in that specification. draft initial definition. ...
Bluetooth.getDevices() - Web APIs
draft initial definition. ...
Bluetooth.onavailabilitychanged - Web APIs
draft initial definition. ...
Bluetooth.referringDevice - Web APIs
draft initial definition. ...
Bluetooth.requestDevice() - Web APIs
draft initial definition. ...
Bluetooth - Web APIs
Web › API › Bluetooth
s value. if this option is set, that is the value returned by this method. 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. specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification. draft initial definition. ...
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.broadcast - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.indicate - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.notify - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.read - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.reliableWrite - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.write - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
draft initial definition. ...
BluetoothCharacteristicProperties - Web APIs
draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
BluetoothDevice.gatt - Web APIs
the bluetoothdevice.gatt read-only property returns a reference to the device's bluetoothremotegattserver. syntax var gattserver = instanceofbluetoothdevice.gatt returns a reference to the device's bluetoothremotegattserver. specifications specification status comment web bluetooththe definition of 'gattserver' in that specification. draft initial definition. ...
id - Web APIs
the bluetoothdevice.id read-only property returns a domstring that uniquely identifies a device. syntax var id = instanceofbluetoothdevice.id returns a domstring. specifications specification status comment web bluetooththe definition of 'id' in that specification. draft initial definition. ...
BluetoothDevice.name - Web APIs
the bluetoothdevice.name read-only property returns a domstring that provides a human-readable name for the device. syntax var name = instanceofbluetoothdevice.name returns a domstring. specifications specification status comment web bluetooththe definition of 'name' in that specification. draft initial definition. ...
BluetoothDevice - Web APIs
nnected. methods bluetoothdevice.watchadvertisments() a promise that resolves to undefined or is rejected with an error if advetisments can’t shown for any reason. bluetoothdevice.unwatchadvertisments() stops watching for advertisments. bluetoothdevice.connectgatt() a promise that resolves to an instance of bluetoothgattremoteserver. specifications specification status comment web bluetooththe definition of 'bluetoothdevice' in that specification. draft initial definition. ...
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
tic.getdescriptors() method returns a promise that resolves to an array of all bluetoothgattdescriptor objects for a given descriptor uuid. syntax bluetoothremotegattcharacteristic.getdescriptors(bluetoothdescriptoruuid).then(function(bluetoothgattdescriptors[]) { ... }) returns a promise that resolves to an array of bluetoothgattdescriptor objects. specifications specification status comment web bluetooththe definition of 'getdescriptors()' in that specification. draft initial definition. ...
BluetoothRemoteGATTCharacteristic.properties - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.service - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic.value - Web APIs
the bluetoothremotegattcharacteristic.value read-only property returns currently cached characteristic value. this value gets updated when the value of the characteristic is read or updated via a notification or indication. syntax var value = bluetoothremotegattcharacteristic.value returns the currently cached characteristic value. specifications specification status comment web bluetooththe definition of 'value' in that specification. draft initial definition. ...
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
draft initial definition. ...
BluetoothRemoteGATTCharacteristic - Web APIs
o the bytes contained in an arraybuffer and returns a promise. bluetoothremotegattcharacteristic.startnotifications() returns a promise when navigator.bluetooth is added to the active notification context. bluetoothremotegattcharacteristic.stopnotifications() returns a promise when navigator.bluetooth is removed from the active notification context. specifications specification status comment web bluetooththe definition of 'bluetoothremotegattcharacteristic' in that specification. draft initial definition. ...
characteristic - Web APIs
draft initial definition. ...
readValue() - Web APIs
the bluetoothremotegattdescriptor.readvalue() method returns a promise that resolves to an arraybuffer holding a duplicate of the value property if it is available and supported. otherwise it throws an error. syntax bluetoothremotegattdescriptor.readvalue().then(function(value[]) { ... }) returns a promise that resolves to an arraybuffer. specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasa...
uuid - Web APIs
draft initial definition. ...
value - Web APIs
the bluetoothremotegattdescriptor.value read-only property returns an arraybuffer containing the currently cached descriptor value. this value gets updated when the value of the descriptor is read. syntax var characteristic = bluetoothremotegattdescriptor.characteristic returns an arraybuffer. specifications specification status comment web bluetooththe definition of 'value' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for andr...
writeValue() - Web APIs
the bluetoothremotegattdescriptor.writevalue() method sets the value property to the bytes contained in an arraybuffer and returns a promise. syntax bluetoothremotegattdescriptor.writevalue(array[]).then(function() { ... }) parameters array sets the value with the bytes contained in the array. returns a promise. specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
BluetoothRemoteGATTDescriptor - Web APIs
is read. methods bluetoothremotegattdescriptor.readvalue() returns a promise that resolves to an arraybuffer holding a duplicate of the value property if it is available and supported. otherwise it throws an error. bluetoothremotegattdescriptor.writevalue() sets the value property to the bytes contained in an arraybuffer and returns a promise. specifications specification status comment web bluetooththe definition of 'bluetoothremotegattdescriptor' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefo...
BluetoothRemoteGATTServer.connect() - Web APIs
the bluetoothremotegattserver.connect() method causes the script execution environment to connect to this.device. syntax bluetoothremotegattserver.connect() .then(function(bluetoothremotegattserver) { ... }) returns a promise that resolves to a bluetoothremotegattserver. parameters none. specifications specification status comment web bluetooththe definition of 'connect()' in that specification. draft initial definition. ...
BluetoothRemoteGATTServer.connected - Web APIs
draft initial definition. ...
BluetoothRemoteGATTServer.device - Web APIs
the bluetoothremotegattserver.device read-only property returns a reference to the bluetoothdevice running the server. syntax var device = bluetoothremotegattserver.device specifications specification status comment web bluetooththe definition of 'device' in that specification. draft initial definition. ...
BluetoothRemoteGATTServer.disconnect() - Web APIs
the bluetoothremotegattserver.disconnect() method causes the script execution environment to disconnect from this.device. syntax bluetoothremotegattserver.disconnect() returns none. parameters none. specifications specification status comment web bluetooththe definition of 'disconnect()' in that specification. draft initial definition. ...
BluetoothRemoteGATTServer.getPrimaryService() - Web APIs
e bluetooth device for a specified bluetoothserviceuuid. syntax bluetoothremotegattserver.getprimaryservice(bluetoothserviceuuid).then(function(bluetoothgattservice) { ... }) returns a promise that resolves to a bluetoothgattservice object. parameters bluetoothserviceuuid a bluetooth service universally unique identifier for a specified device. specifications specification status comment web bluetooththe definition of 'getprimaryservice()' in that specification. draft initial definition. ...
BluetoothRemoteGATTServer.getPrimaryServices() - Web APIs
device for a specified bluetoothserviceuuid. syntax bluetoothremotegattserver.getprimaryservices(bluetoothserviceuuid).then(function(bluetoothgattservices) { ... }) returns a promise that resolves to a list of bluetoothgattservice objects. parameters bluetoothserviceuuid a bluetooth service universally unique identifier for a specified device. specifications specification status comment web bluetooththe definition of 'getprimaryservices()' in that specification. draft initial definition. ...
BluetoothRemoteGATTServer - Web APIs
draft initial definition. ...
device - Web APIs
draft initial definition. ...
getCharacteristic() - Web APIs
id). syntax bluetoothgattserviceinstance.getcharacteristic(characteristic).then(function(bluetoothgattcharacteristic) { ... } ) returns a promise to an instance of bluetoothgattcharacteristic parameters characteristic the uuid of a characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic. specifications specification status comment web bluetooththe definition of 'getcharacteristic()' in that specification. draft initial definition. ...
getCharacteristics() - Web APIs
x bluetoothgattserviceinstance.getcharacteristics(characteristics).then(function(bluetoothgattcharacteristic[]) { ... } ) returns a promise to an array of bluetoothgattcharacteristic instances. parameters characteristic the uuid of a characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic. specifications specification status comment web bluetooththe definition of 'getcharacteristics()' in that specification. draft initial definition. ...
getIncludedService() - Web APIs
dedservice() method returns a promise to an instance of bluetoothgattservice for a given universally unique identifier (uuid). syntax bluetoothgattserviceinstance.getincludedservice(service).then(function(bluetoothgattservice) { ... } ) returns a promise to an instance of bluetoothgattservice. properties service the uuid of a bluetooth service. specifications specification status comment web bluetooththe definition of 'getincludedservice()' in that specification. draft initial definition. ...
getIncludedServices() - Web APIs
) method returns a promise to an array of bluetoothgattservice instances for an optional universally unique identifier (uuid). syntax bluetoothgattserviceinstance.getincludedservice(service).then(function(bluetoothgattservice) { ... } ) returns a promise to an instance of bluetoothgattservice. properties service the uuid of a bluetooth service. specifications specification status comment web bluetooththe definition of 'getincludedservices()' in that specification. draft initial definition. ...
isPrimary - Web APIs
the bluetoothgattservice.isprimary read-only property returns a boolean that indicates whether this is a primary service. if it is not a primary service, it is a secondary service. syntax var isprimary = bluetoothgattservice.isprimary returns a boolean. specifications specification status comment web bluetooththe definition of 'isprimary' in that specification. draft initial definition. ...
uuid - Web APIs
the bluetoothgattservice.uuid read-only property returns a domstring representing the uuid of this service. syntax var uuid = bluetoothgattservice.uuid returns a domstring. specifications specification status comment web bluetooththe definition of 'uuid' in that specification. draft initial definition. ...
BluetoothRemoteGATTService - Web APIs
dentifier (uuid). bluetoothremotegattservice.getincludedservice() returns a promise to an instance of bluetoothremotegattservice for a given universally unique identifier (uuid). bluetoothremotegattservice.getincludedservices() returns a promise to an array of bluetoothremotegattservice instances for an optional universally unique identifier (uuid). specifications specification status comment web bluetooththe definition of 'bluetoothremotegattservice' in that specification. draft initial definition. ...
Body.arrayBuffer() - Web APIs
Web › API › Body › arrayBuffer
living standard ...
Body.blob() - Web APIs
Web › API › Body › blob
url using url.createobjecturl, and then set that url as the source of an <img> element to display the image. 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. living standard ...
Body.body - Web APIs
Web › API › Body › body
living standard ...
Body.bodyUsed - Web APIs
Web › API › Body › bodyUsed
living standard ...
Body.formData() - Web APIs
Web › API › Body › formData
living standard ...
Body.json() - Web APIs
Web › API › Body › json
living standard initial definition ...
Body.text() - Web APIs
Web › API › Body › text
living standard ...
Body - Web APIs
Web › API › Body
living standard ...
BroadcastChannel() - Web APIs
living standard initial definition. ...
BroadcastChannel.close() - Web APIs
m as there is no other way for a browser to know that this channel is not needed anymore. note: this feature is available in web workers. syntax var str = channel.close(); example // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.close()' in that specification. living standard initial definition. ...
BroadcastChannel: message event - Web APIs
body { border: 1px solid black; padding: .5rem; height: 100px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); result specifications specification status html living standard living standard ...
BroadcastChannel: messageerror event - Web APIs
annel.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessage and onmessageerror event handler properties: const channel = new broadcastchannel('example-channel'); channel.onmessage = (event) => { received.textcontent = event.data; }; channel.onmessageerror = (event) => { console.log(event); }; specifications specification status html living standard living standard ...
BroadcastChannel.name - Web APIs
e read-only. note: this feature is available in web workers. syntax var str = channel.name; examples // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // log the channel name to the console console.log(bc.name); // "test_channel" // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.name' in that specification. living standard initial definition. ...
BroadcastChannel.onmessage - Web APIs
function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type messageevent. example bc.onmessage = function(ev) { console.log(`message event received! '${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification. living standard initial definition. ...
BroadcastChannel.onmessageerror - Web APIs
living standard ...
BroadcastChannel.postMessage() - Web APIs
the broadcastchannel.postmessage() sends a message, which can be of any kind of object, to each listener in any browsing context with the same origin. the message is transmitted as a message event targeted at each broadcastchannel bound to the channel. note: this feature is available in web workers. syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification. living standard initial definition. ...
BroadcastChannel - Web APIs
ses the channel object, indicating it won't get any new messages, and allowing it to be, eventually, garbage collected. events message fired when when a message arrives on the channel. also available via the onmessage property. messageerror fired when a message arrives that can't be deserialized. also available via the onmessageerror property. specifications specification status comment html living standardthe definition of 'broadcastchannel' in that specification. living standard initial definition. ...
Broadcast Channel API - Web APIs
channel api's self-contained interface allows cross-context communication. it can be used to detect user actions in other tabs within a same origin, like when the user logs in or out. the messaging protocol is not defined and the different browsing contexts need to implement it themselves; there is no negotiation nor requirement from the specification. specifications specification status comment html living standardthe definition of 'the broadcast channel api' in that specification. living standard initial definition. ...
BufferSource - Web APIs
buffersource is a typedef used to represent objects that are either themselves an arraybuffer, or which are a typedarray providing an arraybufferview. this is a helper type to simplify the specification. it isn't an interface and there are no objects implementing it. specifications specification status comment web idlthe definition of 'buffersource' in that specification. candidate recommendation initial definition. ...
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
rategy object. exceptions none. examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy()' in that specification. living standard initial definition. ...
ByteLengthQueuingStrategy.size() - Web APIs
byte length of the given chunk. examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'size' in that specification. living standard initial definition. ...
ByteLengthQueuingStrategy - Web APIs
hunk’s bytelength property. examples const queueingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
ByteString - Web APIs
bytestring is a utf-8 string that corresponds to the set of all possible sequences of bytes. bytestring maps to a string when returned in javascript; generally, it's only used when interfacing with protocols that use bytes and strings interchangably, such as http. specifications specification status comment web idlthe definition of 'bytestring' in that specification. candidate recommendation initial definition. ...
CDATASection - Web APIs
onospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cdatasection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no specific properties and implements those of its parent text. methods this interface has no specific methods and implements those of its parent text. specifications specification status comment domthe definition of 'cdatasection' in that specification. living standard re-added in issue #295 due to web breakage dom4the definition of 'cdatasection' in that specification. obsolete removed in favour of the more generic text interface document object model (dom) level 3 core specificationthe definition of 'cdatasection' in that specificat...
CSS.escape() - Web APIs
Web › API › CSS › escape
working draft initial definition ...
CSS numeric factory functions - Web APIs
working draft initial definition ...
CSS.paintWorklet (Static property) - Web APIs
Web › API › CSS › paintWorklet
generates an image where a css property expects a file. syntax var worklet = css.paintworklet; value the paintworklet object. examples the following example demonstrates loading a paintworklet from its js file and does so by feature detection. <script> if ('paintworklet' in css) { css.paintworklet.addmodule('checkerboard.js'); } </script> specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification. working draft initial definition. ...
CSS.registerProperty() - Web APIs
working draft initial definition. ...
CSS.supports() - Web APIs
Web › API › CSS › supports
candidate recommendation initial definition. ...
CSS - Web APIs
Web › API › CSS
r the condition, given in parameter is supported. css.escape() can be used to escape a string mostly for use as part of a css selector. css factory functions can be used to return a new cssunitvalue with a value of the parameter number of the units of the name of the factory function method used. css.em(3) // cssunitvalue {value: 3, unit: "em"} specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification. working draft adds the paintworklet static property. css object model (cssom)the definition of 'css' in that specification. working draft adds the escape() static method. css conditional rules module level 3the definition of 'css' in that specification. candidat...
CSSConditionRule - Web APIs
rule derives from cssrule, cssgroupingrule and inherits all properties of these classes. it has one specific property: cssconditionrule.conditiontext represents the text of the condition of the rule. methods the cssconditionrule derives from cssrule, cssgroupingrule and inherits all methods of these classes. it has no specific property of its own. specifications specification status comment css conditional rules module level 3the definition of 'cssconditionrule' in that specification. candidate recommendation initial definition. ...
CSSCounterStyleRule - Web APIs
g. csscounterstylerule.fallback is a domstring object that contains the serialization of the fallback descriptor defined for the associated rule. if the descriptor was not specified in the associated rule, the attribute returns an empty string. methods this interface doesn't implement any specific method but inherits methods from its parent cssrule. specifications specification status comment css counter styles level 3the definition of 'csscounterstylerule' in that specification. candidate recommendation initial definition. ...
CSSGroupingRule - Web APIs
ulelist of the css rules in the media rule. methods common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all methods of this class. it has two specific methods: cssgroupingrule.deleterule deletes a rule from the style sheet. cssgroupingrule.insertrule inserts a new style rule into the current style sheet. specification specification status comment css object model (cssom)the definition of 'cssgroupingrule' in that specification. working draft initial definition. ...
CSSImageValue - Web APIs
working draft initial definition. ...
CSSKeyframeRule - Web APIs
ame.keytext represents the key of the keyframe, like '10%', '75%'. the from keyword maps to '0%' and the to keyword maps to '100%'. csskeyframe.style read only returns a cssstyledeclaration of the css style associated with the keyframe. methods as a cssrule, csskeyframerule also implements the methods of that interface. it has no specific methods. specification specification status comment css animationsthe definition of 'csskeyframerule' in that specification. working draft initial definition ...
CSSKeyframesRule - Web APIs
f the keyframe to be deleted, expressed as a domstring resolving as a number between 0% and 100%. csskeyframesrule.findrule() returns a keyframe rule corresponding to the given key. the key is a domstring containing an index of the keyframe to be returned, resolving to a percentage between 0% and 100%. if no such keyframe exists, findrule returns null. specification specification status comment css animationsthe definition of 'csskeyframesrule' in that specification. working draft initial definition ...
CSSKeywordValue.CSSKeywordValue() - Web APIs
working draft initial definition. ...
CSSKeywordValue.value - Web APIs
var val = csskeywordvalue.value csskeywordvalue.value = val value a usvstring. examples the following example resets the css display property to its defaults. let indicator = document.getelementbyid('indicator'); indicator.attributestylemap.set('display', new csskeywordvalue('initial')); indicator.attributestylemap.get('display').value // 'initial' specifications specification status comment css typed om level 1the definition of 'undefined' in that specification. working draft initial definition. ...
CSSKeywordValue - Web APIs
working draft initial definition. ...
CSSMathProduct.CSSMathProduct() - Web APIs
working draft initial definition. ...
CSSMathProduct.values - Web APIs
working draft initial definition. ...
CSSMathProduct - Web APIs
nterface of the css typed object model api represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue. constructor cssmathproduct.cssmathproduct() creates a new cssmathproduct object. properties cssmathproduct.values returns a cssnumericarray object which contains one or more cssnumericvalue objects. methods none. specifications specification status comment css typed om level 1the definition of 'cssmathproduct' in that specification. working draft initial definition. ...
CSSMathSum.CSSMathSum() - Web APIs
working draft initial definition. ...
CSSMathSum.values - Web APIs
Web › API › CSSMathSum › values
working draft initial definition. ...
CSSMathSum - Web APIs
is still evolving. in the future we may write the last three lines as: console.log( stylemap.get('width').values[1] ); // cssmathnegate {value: cssunitvalue, operator: "negate"} console.log( stylemap.get('width').values[1].value ); // cssunitvalue {value: 20, unit: "px"} console.log( stylemap.get('width').values[1].value.unit ); // 'px' specifications specification status comment css typed om level 1the definition of 'cssmathsum' in that specification. working draft initial definition. ...
CSSMathValue.operator - Web APIs
working draft initial definition. ...
CSSMathValue - Web APIs
working draft initial definition. ...
CSSMediaRule - Web APIs
these interfaces. it has the following specific property: cssmediarule.media read only specifies a medialist representing the intended destination medium for style information. methods as a cssconditionrule, and therefore both a cssgroupingrule and a cssrule, cssmediarule also implements the methods of that interface. it has no specific methods. specifications specification status comment css conditional rules module level 3the definition of 'cssmediarule' in that specification. candidate recommendation make it derived from the cssconditionrule. css object model (cssom)the definition of 'cssmediarule' in that specification. working draft no changes from document object model (dom) level 2 style specification document object mod...
CSSNamespaceRule.namespaceURI - Web APIs
the cssnamespacerule.namespaceuri read-only property returns a domstring containing the text of the uri of the given namespace. syntax var namespaceuri = cssnamespacerule.namespaceuri returns a domstring containing a uri. specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification. working draft initial definition. ...
CSSNamespaceRule.prefix - Web APIs
the cssnamespacerule.prefix read-only property returns a domstring with the name of the prefix associated to this namespace. if there is no such prefix, returns null. syntax var prefix = cssnamespacerule.prefix returns a domstring containing the prefix associated to this namespace. specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification. working draft initial definition. ...
CSSNamespaceRule - Web APIs
e.namespaceuri returns a domstring containing the text of the uri of the given namespace. cssnamespacerule.prefix returns a domstring with the name of the prefix associated to this namespace. if there is no such prefix, returns null. methods as a cssrule, cssnamespacerule also implements the methods of that interface. it has no specific methods: specification specification status comment css object model (cssom)the definition of 'cssnamespacerule' in that specification. working draft initial definition. ...
CSSNumericValue.add() - Web APIs
numericvalue); parameters number either a number or a cssnumericvalue. return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method. examples let mathsum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification. working draft initial definition. ...
CSSNumericValue.div() - Web APIs
syntax var cssnumericvalue = cssnumericvalue.div(number); parameters number either a number or a cssnumericvalue. return value a cssmathproduct. exceptions typeerror indicates that an invalid type was passed to the method. examples let mathproduct = css.px("24").div(css.percent("4")); // prints "calc(24px / 4%)" mathproduct.tostring(); specifications specification status comment css typed om level 1the definition of 'div' in that specification. working draft initial definition. ...
CSSNumericValue.equals() - Web APIs
working draft initial definition. ...
CSSNumericValue.max() - Web APIs
type was passed to the method. examples as stated earlier, all passed values must be of the same type and value. some of the following examples illustrate what happens when they are not. // prints "2cm" console.log(css.cm("1").max(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'max' in that specification. working draft initial definition. ...
CSSNumericValue.min() - Web APIs
type was passed to the method. examples as stated earlier, all passed values must be of the same type and value. some of the following examples illustrate what happens when they are not. // prints "1cm" console.log(css.cm("1").min(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'min' in that specification. working draft initial definition. ...
CSSNumericValue.mul() - Web APIs
l(number); parameters number either a number or a cssnumericvalue. return value a cssmathproduct exceptions typeerror indicates that an invalid type was passed to the method. examples let mathsum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification. working draft initial definition. ...
CSSNumericValue.parse() - Web APIs
snumericvalue = cssnumericvalue.parse(csstext); parameters csstext a string containing numeric and unit parts. return value a cssnumericvalue. exceptions syntaxerror tbd examples the following returns a cssunitvalue object with a unit property equal to "px" and a value property equal to 42. let numvalue = cssnumericvalue.parse("42.0px"); specifications specification status comment css typed om level 1the definition of 'parse' in that specification. working draft initial definition. ...
CSSNumericValue.sub() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method. examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification. working draft initial definition. ...
CSSNumericValue.sum() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method. examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification. working draft initial definition. ...
CSSNumericValue.to() - Web APIs
itvalue = cssnumericvalue.to(unit); parameters unit the unit to which you want to convert. return value a cssmathsum. exceptions syntaxerror indicates that an invalid type was passed to the method. typeerror indicates that the passed values cannot be summed. examples // prints "0.608542cm" console.log(css.px("23").to("com").tostring()); specifications specification status comment css typed om level 1the definition of 'to' in that specification. working draft initial definition. ...
CSSNumericValue.toSum() - Web APIs
onvert to. return value a cssnumericvalue. exceptions syntaxerror undefined typeerror indicates that an invalid type was passed to the method. examples let v = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); v.tostring() // => "calc(23px + 4% + 3cm + 9in)" v.tosum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'tosum' in that specification. working draft initial definition. ...
CSSNumericValue.type - Web APIs
thint, or time. syntax var cssnumerictype = cssnumericvalue.type(); parameters none. return value a cssnumerictype object. exceptions none. examples let mathsum = css.px("23").sub(css.percent("4")).sub(css.cm("3")).sub(css.in("9")); // returns an object with the structure: {length: 1, percenthint: "length"} let cssnumerictype = mathsum.type(); specifications specification status comment css typed om level 1the definition of 'type' in that specification. working draft initial definition. ...
CSSNumericValue - Web APIs
mericvalue.equals true if all the values are the exact same type and value, in the same order. otherwise, false. cssnumericvalue.to converts value into another one with the specified unit. cssnumericvalue.tosum tbd cssnumericvalue.type tbd cssnumericvalue.parse allows a cssnumericvalue to be constructed directly from a string containing css. specifications specification status comment css typed om level 1the definition of 'cssnumericvalue' in that specification. working draft initial definition. ...
CSSOMString - Web APIs
lready represent strings as 16-bit sequences might choose to use domstring instead. implementation differences browser domstring or usvstring for cssomstring firefox (gecko) usvstring chrome (blink) usvstring safari (webkit) usvstring edge (edgehtml) - opera (blink) usvstring specifications specification status comment css object model (cssom)the definition of 'cssomstring' in that specification. working draft initial definition. ...
CSSPageRule - Web APIs
is interface. it has the following specific properties: csspagerule.selectortext represents the text of the page selector associated with the at-rule. csspagerule.style read only returns the declaration block associated with the at-rule. methods as a cssrule, csspagerule also implements the methods of that interface. it has no specific methods. specifications specification status comment css object model (cssom)the definition of 'csspagerule' in that specification. working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'csspagerule' in that specification. obsolete initial definition ...
CSSPrimitiveValue.getCounterValue() - Web APIs
achieved using the counter interface. syntax var countervalue = cssprimitivevalue.getcountervalue(); return value a counter object representing the counter value. exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a counter value (e.g. this is not css_counter). specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getcountervalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.getFloatValue() - Web APIs
n domexception an invalid_access_err is raised if the css value doesn't contain a float value or if the float value can't be converted into the specified unit. example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("margin-top"); console.log(cssvalue.getfloatvalue(cssprimitivevalue.css_cm)); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getfloatvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.getRGBColorValue() - Web APIs
r value. exceptions type description domexception an invalid_access_err is raised if the attached property can't return an rgb color value (i.e. this is not css_rgbcolor). example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.getrgbcolorvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrgbcolorvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.getRectValue() - Web APIs
ue. exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a rect value. (i.e. this is not css_rect). example var cs = window.getcomputedstyle(document.getelementbyid("clippeddiv")); var cssvalue = cs.getpropertycssvalue("clip"); console.log(cssvalue.getrectvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrectvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.getStringValue() - Web APIs
.getstringvalue(); return value a string value. exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a string value. example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("display"); console.log(cssvalue.getstringvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getstringvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.primitiveType - Web APIs
alue is not a recognized css2 value. the value can only be obtained by using the csstext attribute. css_uri the value is a <uri>. the value can be obtained by using the getstringvalue() method. example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.primitivetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.primitivetype' in that specification. obsolete initial definition ...
CSSPrimitiveValue.setFloatValue() - Web APIs
t representing the new float value. return value void. exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a float value or if the string value can't be converted into the specified unit. an no_modification_allowed_err is raised if this property is read-only. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setfloatvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue.setStringValue() - Web APIs
representing the new string value. return value void. exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a string value or if the string value can't be converted into the specified unit. an no_modification_allowed_err is raised if this property is read-only. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setstringvalue' in that specification. obsolete initial definition ...
CSSPrimitiveValue - Web APIs
ept the specified unit or the float value, the value will be unchanged and a domexception will be raised. cssprimitivevalue.setstringvalue() a method to set the string value with the specified unit. if the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a domexception will be raised. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue' in that specification. obsolete initial definition ...
CSSPseudoElement.element - Web APIs
working draft initial definition. ...
CSSPseudoElement.type - Web APIs
working draft initial definition. ...
CSSPseudoElement - Web APIs
he example below demonstrates the basic properties of the csspseudoelement object representing the opening quotation mark. const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-elements level 4the definition of 'csspseudoelement' in that specification. working draft initial definition. ...
CSSRule.cssText - Web APIs
Web › API › CSSRule › cssText
es .selectortext and .style (or its sub-properties). see using dynamic styling information for details. syntax string = cssrule.csstext example <style> body { background-color: darkblue; } </style> <script> var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].csstext); // body { background-color: darkblue; } </script> specifications specification status comment css object model (cssom)the definition of 'cssrule: csstext' in that specification. working draft ...
CSSRule.parentStyleSheet - Web APIs
the parentstylesheet property of the cssrule interface returns the stylesheet object in which the current rule is defined. syntax var stylesheet = cssrule.parentstylesheet parameters stylesheet is a stylesheet object. example if (bgrule.parentstylesheet != mysheet) { // alien style rule! } specifications specification status comment css object model (cssom)the definition of 'cssrule: parentstylesheet' in that specification. working draft ...
CSSRule - Web APIs
Web › API › CSSRule
cssrule.viewport_rule 15 cssviewportrule cssrule.region_style_rule 16 cssregionstylerule cssrule.unknown_rule 0 cssunknownrule cssrule.charset_rule 2 csscharsetrule (removed in most browsers.) an up-to-date informal list of constants can be found on the csswg wiki. specifications specification status comment css object model (cssom)the definition of 'cssrule' in that specification. working draft obsoleted values charset_rule and unknown_rule. added value namespace_rule. css animationsthe definition of 'cssrule' in that specification. working draft added values keyframes_rule and keyframe_rule. css fonts module level 4the definition of 'cssrule' in...
CSSRuleList - Web APIs
working draft ...
CSSStyleDeclaration.cssText - Web APIs
line style declaration only. to be able to set a stylesheet rule dynamically, see using dynamic styling information. not to be confused with stylesheet style-rule cssrule.csstext. example <span id="s1" style="color: red;"> some text </span> <script> var elem = document.getelementbyid("s1"); alert(elem.style.csstext); // "color: red;" </script> specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration: csstext' in that specification. working draft ...
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
retrieved. return value value is a cssvalue containing the css value for a property. if none exists, returns null. example the following javascript code gets an object containing the computed rgb values of the color css property: var style = window.getcomputedstyle(elem, null); var rgbobj = style.getpropertycssvalue('color').getrgbcolorvalue(); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete declared as obsolete in july 2003. ...
CSSStyleDeclaration.getPropertyPriority() - Web APIs
g that represents the priority (e.g. "important") if one exists. if none exists, returns the empty string. example the following javascript code checks whether margin is marked as important in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var isimportant = declaration.getpropertypriority('margin') === 'important'; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertypriority()' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.getPropertyValue() - Web APIs
hecked. return value value is a domstring containing the value of the property. if not set, returns the empty string. example the following javascript code queries the value of the margin property in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var value = declaration.getpropertyvalue('margin'); // "1px 2px" specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertyvalue()' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.item() - Web APIs
name is a domstring that is the name of the css property at the specified index. javascript has a special simpler syntax for obtaining an item from a nodelist by index: var propertyname = style[index]; example var style = document.getelementbyid('div1').style; var propertyname = style.item(1); // or simply style[1] - returns the second style listed specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.item()' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.length - Web APIs
plictly set on the parent of the instance. example the following gets the number of explicitly set styles on the following html element: <div id="div1" style="margin: 0 10px; background-color: #ca1; font-family: monospace"></div> javascript code: var mydiv = document.getelementbyid('div1'); var divstyle = mydiv.style; var len = divstyle.length; // 6 specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.length' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.parentRule - Web APIs
syntax var rule = styles.parentrule; value the css rule that contains this declaration block or null if this cssstyledeclaration is not attached to a cssrule. example the following javascript code gets the parent css style rule from a cssstyledeclaration: var declaration = document.stylesheets[0].rules[0].style; var rule = declaration.parentrule; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.parentrule' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.removeProperty() - Web APIs
ore it was removed. exceptions domexception no_modification_allowed_err: if the property or declaration block is read only. example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration.setProperty() - Web APIs
working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete ...
CSSStyleDeclaration - Web APIs
getcomputedstyle in firefox. returns the property value as a cssprimitivevalue or null for shorthand properties. example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification. working draft merged the dom level 2 style css2properties interface into cssstyledeclaration. document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification. obsolete initial definition ...
CSSStyleRule.selectorText - Web APIs
rule.selectortext example // for cssrule: body { background-color: darkblue; } var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].selectortext); // body notes the implementation may have stripped out insignificant whitespace while parsing the selector. if set to a selector string which cannot be parsed, a syntaxerror is thrown. specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' in that specification. working draft browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
CSSStyleRule.styleMap - Web APIs
working draft initial definition. ...
CSSStyleRule - Web APIs
(cssrule.style_rule). properties cssstylerule.selectortext returns the textual representation of the selector for this rule, e.g. "h1,h2". cssstylerule.style read only returns the cssstyledeclaration object for the rule. cssstylerule.stylemap read only returns a stylepropertymap object which provides access to the rule's property-value pairs. specifications specification status comment css object model (cssom)the definition of 'cssstylerule' in that specification. working draft no changes document object model (dom) level 2 style specificationthe definition of 'cssrule' in that specification. obsolete ...
CSSStyleSheet.addRule() - Web APIs
ructing a string using the template literal `${selector}{${styleblock}}`, then passing it into the standard insertrule() method. therefore, given existing code such as the following: cssstylesheet.addrule(selector, styles, 0); you can rewrite this to use the more standard insertrule() like this: cssstylesheet.insertrule(`${selector} {${styles}}`, 0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.addrule()' in that specification. working draft ...
CSSStyleSheet.cssRules - Web APIs
working draft ...
CSSStyleSheet.deleteRule() - Web APIs
the cssstylesheet method deleterule() removes a rule from the stylesheet object. syntax cssstylesheet.deleterule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed. return value undefined example this example removes the first rule from the stylesheet mystyles. mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.deleterule()' in that specification. working draft ...
CSSStyleSheet.insertRule() - Web APIs
working draft no change from document object model (dom) level 2 style specification. document object model (dom) level 2 style specificationthe definition of 'cssstylesheet.insertrule' in that specification. obsolete initial definition ...
CSSStyleSheet.ownerRule - Web APIs
working draft ...
CSSStyleSheet.removeRule() - Web APIs
lesheet.removerule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed. return value undefined example this example removes the first rule from the stylesheet mystyles. mystyles.removerule(0); you can rewrite this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification. working draft ...
CSSStyleSheet.rules - Web APIs
removed soon, its availability is not as widespread and using it will result in compatibility problems for your site or app. syntax var rules = cssstylesheet.rules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet. each entry in the rule list is a cssrule object describing one rule making up the stylesheet. specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.rules' in that specification. working draft ...
CSSStyleSheet - Web APIs
working draft document object model (dom) level 2 style specificationthe definition of 'cssstylesheet' in that specification. obsolete initial definition ...
CSSStyleValue.parse() - Web APIs
the code below parses a set of declarations for the transform property. the second code block shows the structure of the returned object as it would be rendered in a developer tools console. const css = cssstylevalue.parse( 'transform', 'translate3d(10px,10px,0) scale(0.5)'); csstransformvalue {0: csstranslate, 1: cssscale, length: 2, is2d: false} specifications specification status comment css typed om level 1the definition of 'parse()' in that specification. working draft initial definition. ...
CSSStyleValue.parseAll() - Web APIs
tylevalue objects, each containing one of the supplied values. syntax cssstylevalue.parseall(property, value) parameters property a css property to set. csstext a comma-separated string containing one or more values that apply to the provided property. return value an array of cssstylevalue objects, each containing one of the supplied values. specifications specification status comment css typed om level 1the definition of 'parseall()' in that specification. working draft initial definition. ...
CSSStyleValue - Web APIs
working draft initial definition. ...
CSSSupportsRule - Web APIs
le { } properties as a cssconditionrule and therefore a cssrule and a cssgroupingrule, csssupportsrule also implements the properties of these interfaces. it has no specific properties. methods as a cssconditionrule and therefore a cssruleand a cssgroupingrule, csssupportsrule also implements the methods of that interface. it has no specific methods. specification specification status comment css conditional rules module level 3the definition of 'csssupportsrule' in that specification. candidate recommendation initial definition ...
CSSUnitValue.CSSUnitValue() - Web APIs
w cssunitvalue() parameters value returns a double indicating the number of units. unit returns a usvstring indicating the type of unit. examples the following shows a method of creating a csspositionvalue from individual cssunitvalue constructors. let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification. working draft initial definition. ...
CSSUnitValue.unit - Web APIs
Web › API › CSSUnitValue › unit
ar astring = cssunitvalue.unit; value a usvstring. examples the following creates a csspositionvalue from individual cssunitvalue constructors, then queries the cssunitvalue.unit. let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "em" )); console.log( pos.x.unit ); // "px" console.log( pos.y.unit ); // "em" specifications specification status comment css typed om level 1the definition of 'cssunitvalue.unit' in that specification. working draft initial definition. ...
CSSUnitValue.value - Web APIs
; cssunitvalue.value = cssunitvalue; value a double. examples the following creates a csspositionvalue from individual cssunitvalue constructors, then queries the cssunitvalue.value. let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "px" )); console.log( pos.x.value ); // 5 console.log( pos.y.value ); // 10 specifications specification status comment css typed om level 1the definition of 'cssunitvalue.value' in that specification. working draft initial definition. ...
CSSUnitValue - Web APIs
uble indicating the number of units. cssunitvalue.unit returns a usvstring indicating the type of unit. event handlers none. methods none. examples the following shows a method of creating a csspositionvalue from individual cssunitvalue constructors. let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification. working draft initial definition. ...
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
whose values must be either a usvstring or a cssvariablereferencevalue. examples let value = new cssunparsedvalue( ['4deg'] ), values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( value ); // cssunparsedvalue {0: "4deg", length: 1} console.log( values ); // cssunparsedvalue {0: "1em", 1: "#445566", 2: "-45px", length: 3} specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification. working draft initial definition. ...
CSSUnparsedValue.entries() - Web APIs
oop (the difference being that a for-in loop enumerates properties in the prototype chain as well). syntax cssunparsedvalue.entries(obj) parameters obj the cssunparsedvalue whose enumerable own property [key, value] pairs are to be returned. return value an array of the given cssunparsedvalue object's own enumerable property [key, value] pairs. specifications specification status comment css typed om level 1the definition of 'entries()' in that specification. working draft initial definition. ...
CSSUnparsedValue.forEach() - Web APIs
g three arguments: currentvalue the value of the current element being processed. indexoptional the index of the current element being processed. arrayoptional the cssunparsedvalue that foreach() is being called on. thisarg optional value to use as this (i.e the reference object) when executing callback. return value undefined. specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification. working draft initial definition. ...
CSSUnparsedValue.keys() - Web APIs
the cssunparsedvalue.keys() method returns a new array iterator object that contains the keys for each index in the array. syntax cssunparsedvalue.keys() parameters none. return value a new array. specifications specification status comment css typed om level 1the definition of 'keys()' in that specification. working draft initial definition. ...
CSSUnparsedValue.length - Web APIs
the cssunparsedvalue interface returns the number of items in the object. syntax var length = cssunparsedvalue.length; value an integer. examples in this example we employ the cssunparsedvalue.cssunparsedvalue() constructor, then query the length: let values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( values.length ) // 3 specifications specification status comment css typed om level 1the definition of 'length' in that specification. working draft initial definition. ...
CSSUnparsedValue.values() - Web APIs
working draft initial definition. ...
CSSUnparsedValue - Web APIs
h() executes a provided function once for each element of the cssunparsedvalue object. cssunparsedvalue.keys() returns a new array iterator object that contains the keys for each index in the cssunparsedvalue object. cssunparsedvalue.values() returns a new array iterator object that contains the values for each index in the cssunparsedvalue object. specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification. working draft initial definition. ...
CSSValue.cssText - Web APIs
Web › API › CSSValue › cssText
perty of the cssvalue interface represents the current computed css property value. syntax csstext = cssvalue.csstext; value a domstring representing the current css property value. example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.csstext); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.csstext' in that specification. obsolete initial definition ...
CSSValue.cssValueType - Web APIs
he value is a cssvalue list and an instance of the cssvaluelist interface can be obtained by using binding-specific casting methods on this instance of the cssvalue interface. example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.cssvaluetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.cssvaluetype' in that specification. obsolete initial definition ...
CSSValue - Web APIs
Web › API › CSSValue
of the cssprimitivevalue interface can be obtained by using binding-specific casting methods on this instance of the cssvalue interface. css_value_list the value is a cssvalue list and an instance of the cssvaluelist interface can be obtained by using binding-specific casting methods on this instance of the cssvalue interface. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue' in that specification. obsolete initial definition ...
CSSValueList.item() - Web APIs
Web › API › CSSValueList › item
x is greater than or equal to the number of values in the list, this method returns null. syntax var cssvalue = cssvaluelist.item(index); parameters index an unsigned long representing the index of the css value within the collection. return value a cssvalue object at the index position in the cssvaluelist, or null if that is not a valid index. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.item' in that specification. obsolete initial definition ...
CSSValueList.length - Web APIs
the length read-only property of the cssvaluelist interface represents the number of cssvalues in the list. the range of valid values of the indices is 0 to length-1 inclusive. syntax var length = cssvaluelist.length; value an unsigned long representing the number of cssvalues. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.length' in that specification. obsolete initial definition ...
CSSValueList - Web APIs
hread only an unsigned long representing the number of cssvalues in the list. methods cssvaluelist.item() this method is used to retrieve a cssvalue by ordinal index. the order in this collection represents the order of the values in the css style property. if index is greater than or equal to the number of values in the list, this returns null. specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalueslist' in that specification. obsolete initial definition ...
CSSVariableReferenceValue() - Web APIs
creates a new cssvariablereferencevalue. syntax new cssvariablereferencevalue(variable[, fallback]]) parameters variable a custom property name. fallback optional. a custom property fallback value. specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue()' in that specification. working draft initial definition. ...
CSSVariableReferenceValue.fallback - Web APIs
working draft ...
CSSVariableReferenceValue.variable - Web APIs
working draft ...
CSSVariableReferenceValue - Web APIs
with two dashes. constructor cssvariablereferencevalue.cssvariablereferencevalue() creates a new cssvariablereferencevalue object. properties cssvariablereferencevalue.variable returns the custom name passed to the constructor. cssvariablereferencevalue.fallback read only returns the built-in css value for the custom name. methods none. specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue' in that specification. working draft initial definition. ...
CSS Counter Styles - Web APIs
the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters. interfaces csscounterstylerule represents an @counter-style rule. specifications specification status comment css counter styles level 3 candidate recommendation initial definition ...
CSS Font Loading API - Web APIs
the css font loading api provides events and interfaces for dynamically loading font resources. interfaces fontface represents a single usable font face. fontfaceset an interface loading font faces and checking their download statuses. fontfacesource a mixin providing all of the fonts used in font-related operations, unless defined otherwise. it defines the fontfacesources.fonts property available to document and workerglobalscope. fontfacesetloadevent fired whenever a fontfaceset loads. specifications specification status comment css font loading module level 3 working draft initial definition. ...
CSS Object Model (CSSOM) - Web APIs
anslate cssunitvalue cssunparsedvalue cssvariablereferencevalue stylepropertymap stylepropertymapreadonly obsolete cssom interfaces cssprimitivevalue cssvalue cssvaluelist tutorials determining the dimensions of elements (it needs some updating as it was made in the dhtml/ajax era). managing screen orientation specifications specification status comment css typed om level 1 working draft css painting api level 1 working draft extended the css interface with the paintworklet static property. css object model (cssom) view module working draft defined the screen and mediaquerylist interfaces and the mediaquerylistevent event and mediaquerylistlistener event listener. css object mode...
CSS Painting API - Web APIs
...
CSS Properties and Values API - Web APIs
...
CSS Typed Object Model API - Web APIs
ple object-position. csstransformvalue an interface representing a list of transform list values. they "contain" one or more csstransformcomponents, which represent individual transform function values. cssunparsedvalue represents property values that reference custom properties. it consists of a list of string fragments and variable references. specifications specification status comment css typed om level 1 working draft initial definition. ...
Cache.delete() - Web APIs
Web › API › Cache › delete
that represents a specific cache to search within. note that this option is ignored by cache.delete(). return value a promise that resolves to true if the cache entry is deleted, or false otherwise. examples caches.open('v1').then(function(cache) { cache.delete('/images/image.png').then(function(response) { someuiupdatefunction(); }); }) specifications specification status comment service workersthe definition of 'cache: delete' in that specification. working draft initial definition. ...
Cache.keys() - Web APIs
Web › API › Cache › keys
hat represents a specific cache to search within. note that this option is ignored by cache.keys(). return value a promise that resolves to an array of cache keys. examples caches.open('v1').then(function(cache) { cache.keys().then(function(keys) { keys.foreach(function(request, index, array) { cache.delete(request); }); }); }) specifications specification status comment service workersthe definition of 'cache: keys' in that specification. working draft initial definition. ...
Cache.match() - Web APIs
Web › API › Cache › match
working draft initial definition. ...
Cache.matchAll() - Web APIs
Web › API › Cache › matchAll
xcept that rather than resolving with an array of all matching responses, it resolves with the first matching response only (that is, response[0]). examples caches.open('v1').then(function(cache) { cache.matchall('/images/').then(function(response) { response.foreach(function(element, index, array) { cache.delete(element); }); }); }) specifications specification status comment service workersthe definition of 'cache: matchall' in that specification. working draft initial definition. ...
CacheStorage.delete() - Web APIs
if not, we delete it using delete(). this.addeventlistener('activate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: delete' in that specification. working draft initial definition. ...
CacheStorage.has() - Web APIs
Web › API › CacheStorage › has
v1' exists. if so, we add a list of assets to it. if not then we run some kind of cache set-up function. caches.has('v1').then(function(hascache) { if (!hascache) { somecachesetupfunction(); } else { caches.open('v1').then(function(cache) { return cache.addall(myassets); }); } }).catch(function() { // handle exception here. }); specifications specification status comment service workersthe definition of 'cachestorage: has' in that specification. working draft initial definition. ...
CacheStorage.keys() - Web APIs
Web › API › CacheStorage › keys
e it using cachestorage.delete(). then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachewhitelist.indexof(key) === -1) { return caches.delete(key); } }); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: keys' in that specification. working draft initial definition. ...
CacheStorage.match() - Web APIs
working draft initial definition. ...
CacheStorage.open() - Web APIs
Web › API › CacheStorage › open
working draft initial definition. ...
CacheStorage - Web APIs
working draft initial definition. ...
CanvasCaptureMediaStreamTrack.canvas - Web APIs
cating the canvas which is the source of the frames being captured. example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // do things to the stream ... // obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification. working draft initial definition ...
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
e thrown is not mentioned in the spec, this is a likely candidate). example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // send the current state of the canvas as a frame to the stream stream.getvideotracks()[0].requestframe(); specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastream.requestframe()' in that specification. working draft initial definition ...
CanvasCaptureMediaStreamTrack - Web APIs
in real-time. methods this interface inherits the methods of its parent, mediastreamtrack. canvascapturemediastreamtrack.requestframe() manually forces a frame to be captured and sent to the stream. this lets applications that wish to specify the frame capture times directly do so, if they specified a framerate of 0 when calling capturestream(). specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack' in that specification. working draft initial definition ...
CanvasGradient.addColorStop() - Web APIs
living standard ...
CanvasGradient - Web APIs
properties as an opaque object, there is no exposed property. methods there is no inherited method. canvasgradient.addcolorstop() adds a new stop, defined by an offset and a color, to the gradient. if the offset is not between 0 and 1, inclusive, an index_size_err is raised; if the color can't be parsed as a css <color>, a syntax_err is raised. specifications specification status comment html living standardthe definition of 'canvasgradient' in that specification. living standard ...
CanvasImageSource - Web APIs
e and canvasfillstrokestyles interfaces. it’s just an internal helper type to simplify the specification. it’s not an interface and there are no objects implementing it. the interfaces that it allows to be used as image sources are the following: htmlimageelement svgimageelement htmlvideoelement htmlcanvaselement imagebitmap offscreencanvas specifications specification status comment html living standardthe definition of 'canvasimagesource' in that specification. living standard initial definition. ...
CanvasPattern.setTransform() - Web APIs
living standard ...
CanvasPattern - Web APIs
e, a canvas, or a video, created by the canvasrenderingcontext2d.createpattern() method. it can be used as a fillstyle or strokestyle. properties as an opaque object, this has no exposed property. methods there are no inherited method. canvaspattern.settransform() applies an svgmatrix or dommatrix representing a linear transform to the pattern. specifications specification status comment html living standardthe definition of 'canvaspattern' in that specification. living standard added settransform() method in v5. ...
CanvasRenderingContext2D.arc() - Web APIs
living standard ...
CanvasRenderingContext2D.arcTo() - Web APIs
living standard ...
CanvasRenderingContext2D.beginPath() - Web APIs
drawn with different colors. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // first path ctx.beginpath(); ctx.strokestyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(200, 20); ctx.stroke(); // second path ctx.beginpath(); ctx.strokestyle = 'green'; ctx.moveto(20, 20); ctx.lineto(120, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beginpath' in that specification. living standard ...
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
begins at the point specified by moveto(): (30, 30). the first control point is placed at (120, 160), and the second at (180, 10). the curve ends at (220, 140). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(30, 30); ctx.beziercurveto(120,160, 180,10, 220,140); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beziercurveto' in that specification. living standard ...
CanvasRenderingContext2D.canvas - Web APIs
associated <canvas> element. syntax ctx.canvas; examples given this <canvas> element: <canvas id="canvas"></canvas> ... you can get a reference to the canvas element within the canvasrenderingcontext2d by using the canvas property: var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.canvas // htmlcanvaselement specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.canvas' in that specification. living standard ...
CanvasRenderingContext2D.clearRect() - Web APIs
living standard ...
CanvasRenderingContext2D.clip() - Web APIs
living standard ...
CanvasRenderingContext2D.closePath() - Web APIs
e face's eyes. the last arc creates the mouth. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.arc(240, 20, 40, 0, math.pi); ctx.moveto(100, 20); ctx.arc(60, 20, 40, 0, math.pi); ctx.moveto(215, 80); ctx.arc(150, 80, 65, 0, math.pi); ctx.closepath(); ctx.linewidth = 6; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.closepath' in that specification. living standard ...
CanvasRenderingContext2D.createImageData() - Web APIs
living standard ...
CanvasRenderingContext2D.createLinearGradient() - Web APIs
living standard ...
CanvasRenderingContext2D.createPattern() - Web APIs
living standard ...
CanvasRenderingContext2D.createRadialGradient() - Web APIs
living standard ...
CanvasRenderingContext2D.direction - Web APIs
t one is left-to-right, and the second is right-to-left. note that "hi!" in ltr becomes "!hi" in rtl. html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hi!', 150, 50); ctx.direction = 'rtl'; ctx.filltext('hi!', 150, 130); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.direction' in that specification. living standard ...
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
living standard initial definition ...
CanvasRenderingContext2D.drawImage() - Web APIs
living standard ...
CanvasRenderingContext2D.ellipse() - Web APIs
living standard ...
CanvasRenderingContext2D.fill() - Web APIs
living standard ...
CanvasRenderingContext2D.fillRect() - Web APIs
ngle. this is often useful for creating a background, on top of which other things may then be drawn. to achieve this, the dimensions of the rectangle are set to equal the <canvas> element's width and height attributes. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillrect(0, 0, canvas.width, canvas.height); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillrect' in that specification. living standard ...
CanvasRenderingContext2D.fillStyle - Web APIs
living standard ...
CanvasRenderingContext2D.fillText() - Web APIs
lt restricting the text size this example writes the words "hello world," restricting its width to 140 pixels. html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.filltext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.filltext' in that specification. living standard ...
CanvasRenderingContext2D.filter - Web APIs
living standard initial definition. ...
CanvasRenderingContext2D.font - Web APIs
living standard ...
CanvasRenderingContext2D.getImageData() - Web APIs
t are either transparent or taken from off the canvas; only 5,000 of them are opaque black (the color of the drawn rectangle). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 100, 100); ctx.fill(); let imagedata = ctx.getimagedata(60, 60, 200, 100); ctx.putimagedata(imagedata, 150, 10); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getimagedata' in that specification. living standard ...
CanvasRenderingContext2D.getLineDash() - Web APIs
kes consist of lines that are 10 units wide, with spaces of 20 units in between each line. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([10, 20]); console.log(ctx.getlinedash()); // [10, 20] // draw a dashed line ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getlinedash' in that specification. living standard ...
CanvasRenderingContext2D.getTransform() - Web APIs
living standard ...
CanvasRenderingContext2D.globalAlpha - Web APIs
living standard ...
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
rectangles that exclude themselves where they overlap. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalcompositeoperation = 'xor'; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalcompositeoperation' in that specification. living standard compositing and blending level 1 candidate recommendation ...
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
living standard ...
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
e. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { ctx.imagesmoothingquality = 'low'; ctx.drawimage(img, 0, 0, 300, 150); }; result specifications specification status comment html living standardthe definition of 'imagesmoothingquality' in that specification. living standard initial definition. ...
CanvasRenderingContext2D.isPointInPath() - Web APIs
living standard ...
CanvasRenderingContext2D.isPointInStroke() - Web APIs
living standard ...
CanvasRenderingContext2D.lineCap - Web APIs
living standard ...
CanvasRenderingContext2D.lineDashOffset - Web APIs
living standard ...
CanvasRenderingContext2D.lineJoin - Web APIs
living standard ...
CanvasRenderingContext2D.lineTo() - Web APIs
ther. this example draws a letter 'm' with a single contiguous line. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.moveto(90, 130); ctx.lineto(95, 25); ctx.lineto(150, 80); ctx.lineto(205, 25); ctx.lineto(210, 130); ctx.linewidth = 15; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.lineto' in that specification. living standard ...
CanvasRenderingContext2D.lineWidth - Web APIs
living standard ...
CanvasRenderingContext2D.measureText() - Web APIs
tring to measure. return value a textmetrics object. example given this <canvas> element: <canvas id="canvas"></canvas> ... you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('hello world'); console.log(text.width); // 56; specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.measuretext' in that specification. living standard ...
CanvasRenderingContext2D.miterLimit - Web APIs
living standard ...
CanvasRenderingContext2D.moveTo() - Web APIs
at (50, 50) and ends at (200, 50). the second line begins at (50, 90) and ends at (280, 120). var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(50, 50); // begin first sub-path ctx.lineto(200, 50); ctx.moveto(50, 90); // begin second sub-path ctx.lineto(280, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.moveto' in that specification. living standard ...
CanvasRenderingContext2D.putImageData() - Web APIs
living standard ...
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
as"></canvas> javascript the curve begins at the point specified by moveto(): (20, 110). the control point is placed at (230, 150). the curve ends at (250, 20). const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(20, 110); ctx.quadraticcurveto(230, 150, 250, 20); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.quadraticcurveto' in that specification. living standard ...
CanvasRenderingContext2D.rect() - Web APIs
using the rect() method. the path is then rendered using the fill() method. html <canvas id="canvas"></canvas> javascript the rectangle's corner is located at (10, 20). it has a width of 150 and a height of 100. const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 20, 150, 100); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rect' in that specification. living standard ...
CanvasRenderingContext2D.resetTransform() - Web APIs
living standard ...
CanvasRenderingContext2D.restore() - Web APIs
t with the default state later. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.restore' in that specification. living standard ...
CanvasRenderingContext2D.rotate() - Web APIs
living standard ...
CanvasRenderingContext2D.save() - Web APIs
t with the default state later. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.save' in that specification. living standard ...
CanvasRenderingContext2D.scale() - Web APIs
ive scaling factor: -280 * -1 becomes 280, and text is drawn leftwards from that point. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.filltext('hello world!', -280, 90); ctx.settransform(1, 0, 0, 1, 0, 0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scale' in that specification. living standard ...
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
living standard ...
CanvasRenderingContext2D.setLineDash() - Web APIs
living standard ...
CanvasRenderingContext2D.setTransform() - Web APIs
living standard ...
CanvasRenderingContext2D.shadowBlur - Web APIs
shadowcolor property sets its color, and shadowblur sets its level of bluriness. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowblur = 15; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowblur' in that specification. living standard ...
CanvasRenderingContext2D.shadowColor - Web APIs
living standard ...
CanvasRenderingContext2D.shadowOffsetX - Web APIs
o the right, and shadowblur gives it a blur level of 10. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsetx = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsetx' in that specification. living standard ...
CanvasRenderingContext2D.shadowOffsetY - Web APIs
s the bottom, and shadowblur gives it a blur level of 10. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsety = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 80); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsety' in that specification. living standard ...
CanvasRenderingContext2D.stroke() - Web APIs
living standard ...
CanvasRenderingContext2D.strokeRect() - Web APIs
rectangle with a drop shadow and thick, beveled outlines. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.shadowcolor = '#d53'; ctx.shadowblur = 20; ctx.linejoin = 'bevel'; ctx.linewidth = 15; ctx.strokestyle = '#38f'; ctx.strokerect(30, 30, 160, 90); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.strokerect' in that specification. living standard ...
CanvasRenderingContext2D.strokeStyle - Web APIs
living standard ...
CanvasRenderingContext2D.strokeText() - Web APIs
restricting the text size this example writes the words "hello world," restricting its width to 140 pixels. html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.stroketext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.stroketext' in that specification. living standard ...
CanvasRenderingContext2D.textAlign - Web APIs
english-language text. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '30px serif'; ctx.direction = 'ltr'; ctx.textalign = 'start'; ctx.filltext('start-aligned', 0, 50); ctx.textalign = 'end'; ctx.filltext('end-aligned', canvas.width, 120); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textalign' in that specification. living standard ...
CanvasRenderingContext2D.textBaseline - Web APIs
living standard ...
CanvasRenderingContext2D.transform() - Web APIs
amples skewing a shape this example skews a rectangle both vertically (.2) and horizontally (.8). scaling and translation remain unchanged. html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.transform(1, .2, .8, 1, 0, 0); ctx.fillrect(0, 0, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.transform' in that specification. living standard ...
CanvasRenderingContext2D.translate() - Web APIs
living standard ...
CanvasRenderingContext2D - Web APIs
d, ignoring viewport clipping and scrolling. canvasrenderingcontext2d.demote() this causes a context that is currently using a hardware-accelerated backend to fallback to a software one. all state should be preserved. internet explorer canvasrenderingcontext2d.msfillrule the fill rule to use. this must be one of evenodd or nonzero (default). specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d' in that specification. living standard ...
Canvas API - Web APIs
aming api for canvas. scrawl-canvas is an open-source javascript library for creating and manipulating 2d canvas elements. the zim framework provides conveniences, components, and controls for coding creativity on the canvas — includes accessibility and hundreds of colorful tutorials. note: see the webgl api for 2d and 3d libaries that use webgl. specifications specification status comment html living standardthe definition of 'the 2d rendering context' in that specification. living standard ...
CaretPosition - Web APIs
ocument.caretpositionfrompoint method. properties this interface doesn't inherit any properties. caretposition.offsetnode read only returns a node containing the found node at the caret's position. caretposition.offset read only returns a long representing the character offset in the caret position node. methods caretposition.getclientrect specification specification status comment css object model (cssom) view modulethe definition of 'caretposition' in that specification. working draft ...
ChannelMergerNode() - Web APIs
f not specified, the default value used is 6. return value a new channelmergernode object instance. exceptions invalidstateerror an option such as channelcount or channelcountmode has been given an invalid value. example var ac = new audiocontext(); var options = { numberofinputs : 2 } var mymerger = new channelmergernode(ac, options); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification. working draft ...
ChannelMergerNode - Web APIs
vely swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification. working draft ...
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
dictionary): numberofoutputs: a number defining the number of inputs the channelsplitternode should have. if not specified, the default value used is 6. return value a new channelsplitternode object instance. example var ac = new audiocontext(); var options = { numberofoutputs : 2 } var mysplitter = new channelsplitternode(ac, options); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification. working draft ...
ChannelSplitterNode - Web APIs
vely swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification. working draft ...
Using channel messaging - Web APIs
er function. // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; input.value = ''; } when a message is received back from the iframe confirming that the original message was received successfully, this simply outputs the confirmation to a paragraph and empties the text input ready for the next message to be sent. specifications specification status comment html living standardthe definition of 'channel messaging' in that specification. living standard ...
Channel Messaging API - Web APIs
aneously. examples we have published a channel messaging basic demo on github (run it live too), which shows a really simple single message transfer between a page and an embedded <iframe>. you can also see a multimessaging demo (run this live), which shows a slightly more complex setup that can send multiple messages between main page and iframe. specifications specification status comment html living standardthe definition of 'channel messaging' in that specification. living standard ...
CharacterData - Web APIs
aracterdata.replacedata() replaces the specified amount of characters, starting at the specified offset, with the specified domstring; when this method returns, data contains the modified domstring. characterdata.substringdata() returns a domstring containing the part of characterdata.data of the specified length and starting at the specified offset. specifications specification status comment domthe definition of 'characterdata' in that specification. living standard added implemention of the childnode and nondocumenttypechildnode interface. document object model (dom) level 3 core specificationthe definition of 'characterdata' in that specification. obsolete no change from document object model (dom) level 2 core specification. docume...
ChildNode.after() - Web APIs
Web › API › ChildNode › after
living standard initial definition. ...
ChildNode.before() - Web APIs
Web › API › ChildNode › before
living standard initial definition. ...
ChildNode.remove() - Web APIs
Web › API › ChildNode › remove
living standard initial definition. ...
ChildNode.replaceWith() - Web APIs
living standard initial definition. ...
ChildNode - Web APIs
Web › API › ChildNode
ts a set of node or domstring objects in the children list of this childnode's parent, just after this childnode. domstring objects are inserted as equivalent text nodes. childnode.replacewith() replaces this childnode in the children list of its parent with a set of node or domstring objects. domstring objects are inserted as equivalent text nodes. specifications specification status comment domthe definition of 'childnode' in that specification. living standard split the elementtraversal interface in parentnode and childnode. previouselementsibling and nextelementsibling are now defined on the latter. the characterdata and documenttype implemented the new interfaces. added the remove(), before(), after() and replacewith() methods. element trave...
Client.frameType - Web APIs
Web › API › Client › frameType
the frametype read-only property of the client interface indicates the type of browsing context of the current client. this value can be one of "auxiliary", "top-level", "nested", or "none". syntax var myframetype = client.frametype; example tbd specifications specification status comment service workersthe definition of 'frametype' in that specification. working draft initial definition. ...
Client.id - Web APIs
Web › API › Client › id
the id read-only property of the client interface returns the universally unique identifier of the client object. syntax var clientid = client.id; example tbd specifications specification status comment service workersthe definition of 'id' in that specification. working draft initial definition. ...
Client.postMessage() - Web APIs
nt. // eg, if it closed. if (!client) return; // send a message to the client. client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification. working draft initial definition. ...
Client.type - Web APIs
Web › API › Client › type
working draft initial definition. ...
Client.url - Web APIs
Web › API › Client › url
working draft initial definition. ...
Client - Web APIs
Web › API › Client
tchall() and clients.get(). methods client.postmessage() sends a message to the client. properties client.id read only the universally unique identifier of the client as a string. client.type read only the client's type as a string. it can be "window", "worker", or "sharedworker". client.url read only the url of the client as a string. specifications specification status comment service workersthe definition of 'client' in that specification. working draft initial definition. ...
Clients.claim() - Web APIs
Web › API › Clients › claim
turn value a promise that resolves to undefined. example the following example uses claim() inside service worker's "activate" event listener so that clients loaded in the same scope do not need to be reloaded before their fetches will go through this service worker. self.addeventlistener('activate', event => { event.waituntil(clients.claim()); }); specifications specification status comment service workersthe definition of 'claim()' in that specification. working draft initial definition. ...
Clients.get() - Web APIs
Web › API › Clients › get
working draft initial definition ...
Clients.matchAll() - Web APIs
Web › API › Clients › matchAll
his method returns clients in most recently focused order, correct as per spec. examples clients.matchall(options).then(function(clientlist) { for (var i = 0 ; i < clientlist.length ; i++) { if (clientlist[i].url === 'index.html') { clients.openwindow(clientlist[i]); // or do something else involving the matching client } } }); specifications specification status comment service workersthe definition of 'clients: matchall' in that specification. working draft initial definition ...
Clients.openWindow() - Web APIs
working draft initial definition. ...
Clients - Web APIs
Web › API › Clients
working draft initial definition ...
Clipboard.read() - Web APIs
Web › API › Clipboard › read
working draft initial definition. ...
Clipboard.readText() - Web APIs
ext contents from the clipboard, use the read() method instead. you can write text to the clipboard using writetext(). example this example retrieves the textual contents of the clipboard and inserts the returned text into an element's contents. navigator.clipboard.readtext().then( cliptext => document.getelementbyid("outbox").innertext = cliptext); specifications specification status comment clipboard api and eventsthe definition of 'readtext()' in that specification. working draft initial definition. ...
Clipboard.write() - Web APIs
Web › API › Clipboard › write
working draft initial definition. ...
Clipboard.writeText() - Web APIs
ts have been updated. the promise is rejected if the caller does not have permission to write to the clipboard. example this example sets the clipboard's contents to the string "<empty clipboard>". navigator.clipboard.writetext("<empty clipboard>").then(function() { /* clipboard successfully set */ }, function() { /* clipboard write failed */ }); specifications specification status comment clipboard api and eventsthe definition of 'writetext()' in that specification. working draft initial definition. ...
Clipboard - Web APIs
Web › API › Clipboard
issions to be able to use clipboard.readtext() and clipboard.writetext(). content scripts applied on http sites do not have access to the clipboard object. see extensions in firefox 63. in addition, read() and write() are disabled by default and require changing a preference to enable them. check the compatibility tables for each method before using it. specifications specification status comment clipboard api and eventsthe definition of 'clipboard' in that specification. working draft initial definition. ...
ClipboardEvent() - Web APIs
se-sensitive and can be: 'copy', 'cut', or 'paste'. options optional options are as follows: clipboarddata: a datatransfer containing the data concerned by the clipboard event. datatype : a domstring containing the mime-type of the data contained in the data argument. data : a domstring containing the data concerned by the clipboard event. specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent()' in that specification. working draft initial definition. ...
ClipboardEvent.clipboardData - Web APIs
working draft initial definition. ...
ClipboardEvent - Web APIs
ipboardevent event with the given parameters. properties also inherits properties from its parent event. clipboardevent.clipboarddata read only is a datatransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its mime type. methods no specific methods; inherits methods from its parent event. specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent' in that specification. working draft initial definition. ...
ClipboardItem() - Web APIs
working draft initial definition. ...
ClipboardItem.getType() - Web APIs
working draft initial definition. ...
ClipboardItem.types - Web APIs
working draft initial definition. ...
ClipboardItem - Web APIs
working draft initial definition. ...
Clipboard API - Web APIs
...
CloseEvent() - Web APIs
leanly or not. "code", optional and defaulting to 0, of type unsigned short, that is the connection close code sent by the server. "reason", optional and defaulting to '', of type domstring, that is a human-readable reason why the server closed the connection. the closeeventinit dictionary also accepts fields from the eventinit dictionary. specifications specification status comment html living standardthe definition of 'closeevent()' in that specification. living standard initial definition. ...
Comment() - Web APIs
Web › API › Comment › Comment
the comment() constructor returns a newly created comment object with the optional domstring given in parameter as its textual content. syntax comment1 = new comment(); // create an empty comment comment2 = new comment("this is a comment"); example var comment = new comment("test"); specifications specification status comment domthe definition of 'comment: comment' in that specification. living standard initial definition ...
Comment - Web APIs
Web › API › Comment
roperties this interface has no specific property, but inherits those of its parent, characterdata, and indirectly those of node. constructor comment() returns a comment object with the parameter as its textual content. methods this interface has no specific method, but inherits those of its parent, characterdata, and indirectly those of node. specifications specification status comment domthe definition of 'comment' in that specification. living standard added the constructor. document object model (dom) level 3 core specificationthe definition of 'comment' in that specification. obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of ...
CompositionEvent.CompositionEvent() - Web APIs
obsolete initial definition. ...
CompositionEvent.data - Web APIs
ll be replaced by the string being composed. this value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started. for compositionupdate, this is the string as it stands currently as editing is ongoing. for compositionend events, this is the string as committed to the editor. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'data' in that specification. obsolete initial definition. ...
CompositionEvent.initCompositionEvent() - Web APIs
arg a boolean specifying whether or not the event can bubble. cancelablearg a boolean shether or not the event can be canceled. viewarg the window object from which the event was generated. dataarg a domstring representing the value of the data attribute. localearg a domstring representing the value of the locale attribute. return value void. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'initcompositionevent()' in that specification. obsolete initial definition. ...
CompositionEvent.locale - Web APIs
...
CompositionEvent - Web APIs
ent.locale read only returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime). methods this interface also inherits methods of its parent, uievent, and its ancestor — event. compositionevent.initcompositionevent() initializes the attributes of a compositionevent object. specifications specification status comment ui eventsthe definition of 'compositionevent' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'compositionevent' in that specification. obsolete ...
console.assert() - Web APIs
Web › API › Console › assert
ssert(false, 'the word is %s', 'foo'); // correct output in node.js and some browsers // (e.g. firefox v60.0.2): // assertion failed: the word is foo // incorrect output in some browsers // (e.g. chrome v67.0.3396.87): // assertion failed: the word is %s foo see outputting text to the console in the documentation of console for further details. specifications specification status comment console apithe definition of 'console.assert()' in that specification. living standard initial definition ...
console.clear() - Web APIs
Web › API › Console › clear
the console.clear() method clears the console if the environment allows it. syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification. living standard initial definition ...
console.count() - Web APIs
Web › API › Console › count
living standard initial definition ...
Console.countReset() - Web APIs
living standard initial definition ...
console.debug() - Web APIs
Web › API › Console › debug
onsecutive order. subst1 ... substn javascript objects with which to replace substitution strings within msg. this gives you additional control over the format of the output. see using string substitutions in console for a description of how substitutions work. see outputting text to the console in the documentation of the console object for details. specifications specification status comment console apithe definition of 'console.debug()' in that specification. living standard initial definition ...
Console.dir() - Web APIs
Web › API › Console › dir
child objects. in other words, console.dir() is the way to see all the properties of a specified javascript object in console by which the developer can easily get the properties of the object. note: this feature is available in web workers. syntax console.dir(object); parameters object a javascript object whose properties should be output. specifications specification status comment console apithe definition of 'console.dir()' in that specification. living standard initial definition ...
Console.dirxml() - Web APIs
Web › API › Console › dirxml
of the specified xml/html element. if it is not possible to display as an element the javascript object view is shown instead. the output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes. syntax console.dirxml(object); parameters object a javascript object whose properties should be output. specifications specification status comment console apithe definition of 'console.dirxml()' in that specification. living standard initial definition ...
Console.error() - Web APIs
Web › API › Console › error
ed together in the order listed and output. msg a javascript string containing zero or more substitution strings. subst1 ... substn javascript objects with which to replace substitution strings within msg. this gives you additional control over the format of the output. see outputting text to the console in the documentation of console for details. specifications specification status comment console apithe definition of 'console.error()' in that specification. living standard initial definition ...
Console.group() - Web APIs
Web › API › Console › group
living standard initial definition ...
Console.groupCollapsed() - Web APIs
to it to expand it, revealing the entries created in the group. call console.groupend() to back out to the parent group. see using groups in the console in the console documentation for details and examples. note: this feature is available in web workers. syntax console.groupcollapsed([label]); parameters label label for the group. optional. specifications specification status comment console apithe definition of 'console.groupcollapsed()' in that specification. living standard initial definition ...
Console.groupEnd() - Web APIs
Web › API › Console › groupEnd
exits the current inline group in the web console. see using groups in the console in the console documentation for details and examples. note: this feature is available in web workers. syntax console.groupend(); parameters none. specifications specification status comment console apithe definition of 'console.groupend()' in that specification. living standard initial definition ...
Console.info() - Web APIs
Web › API › Console › info
ed together in the order listed and output. msg a javascript string containing zero or more substitution strings. subst1 ... substn javascript objects with which to replace substitution strings within msg. this gives you additional control over the format of the output. see outputting text to the console in the documentation of console for details. specifications specification status comment console apithe definition of 'console.info()' in that specification. living standard initial definition ...
console.log() - Web APIs
Web › API › Console › log
chrome console api reference about this and other functions. logging objects don't use console.log(obj), use console.log(json.parse(json.stringify(obj))). this way you are sure you are seeing the value of obj at the moment you log it. otherwise, many browsers provide a live view that constantly updates as values change. this may not be what you want. specifications specification status comment console apithe definition of 'console.log()' in that specification. living standard initial definition ...
Console.table() - Web APIs
Web › API › Console › table
nsole.table([john, jane, emily], ["firstname"]); sorting columns you can sort the table by a particular column by clicking on that column's label. syntax console.table(data [, columns]); parameters data the data to display. this must be either an array or an object. columns an array containing the names of columns to include in the output. specifications specification status comment console apithe definition of 'console.table()' in that specification. living standard initial definition ...
Console.time() - Web APIs
Web › API › Console › time
imer was started. see timers in the console documentation for details and examples. note: this feature is available in web workers. syntax console.time(label); parameters label the name to give the new timer. this will identify the timer; use the same name when calling console.timeend() to stop the timer and get the time output to the console. specifications specification status comment console apithe definition of 'console.time()' in that specification. living standard initial definition ...
Console.timeEnd() - Web APIs
Web › API › Console › timeEnd
living standard initial definition ...
Console.timeLog() - Web APIs
Web › API › Console › timeLog
living standard initial definition ...
console.trace() - Web APIs
Web › API › Console › trace
y, ...data optional zero or more objects to be output to console along with the trace. these are assembled and formatted the same way they would be if passed to the console.log() method. example function foo() { function bar() { console.trace(); } bar(); } foo(); in the console, the following trace will be displayed: bar foo <anonymous> specifications specification status comment console apithe definition of 'console.trace()' in that specification. living standard initial definition ...
Console.warn() - Web APIs
Web › API › Console › warn
ed together in the order listed and output. msg a javascript string containing zero or more substitution strings. subst1 ... substn javascript objects with which to replace substitution strings within msg. this gives you additional control over the format of the output. see outputting text to the console in the documentation of console for details. specifications specification status comment console apithe definition of 'console.warn()' in that specification. living standard initial definition ...
console - Web APIs
Web › API › Console
ou see in the console output. stack traces the console object also supports outputting a stack trace; this will show you the call path taken to reach the point at which you call console.trace(). given code like this: function foo() { function bar() { console.trace(); } bar(); } foo(); the output in the console looks something like this: specifications specification status comment console api living standard initial definition. ...
Console API - Web APIs
which is used to log the current value contained inside a specific variable. interfaces console provides rudimentary debugging functionality, including logging, stack traces, timers, and counters. examples let mystring = 'hello world'; // output "hello world" to the console console.log(mystring) see the console reference page for more examples. specifications specification status comment console api living standard initial definition. ...
ConstantSourceNode() - Web APIs
+infinity. example in this example, an audio context is created, then a constantsourcenode is established with its offset initialized to 0.5. let audiocontext = new audiocontext(); let myconstantsource = new constantsourcenode(audiocontext, { offset: 0.5 }); note: the new constantsourcenode created by the constructor has a channelcount of 2. specifications specification status comment web audio apithe definition of 'constantsourcenode: constantsourcenode' in that specification. working draft ...
ConstantSourceNode.offset - Web APIs
working draft ...
ConstantSourceNode - Web APIs
o destination (typically speakers or headphones). now, whenever the value of constantnode.offset changes, the gain on both gainnode2 and gainnode3 will change to have that same value. to see this example in action, as well as to read the rest of the code from which these snippets were derived, see controlling multiple parameters with constantsourcenode. specification specification status comment web audio apithe definition of 'constantsourcenode' in that specification. working draft ...
ConstrainBoolean - Web APIs
s value will be used, but the user agent will use the other value if it needs to in order to come up with a workable configuration. you can also specify the value of the property as simply true or false, in which case the user agent will use that value if possible once all efforts have been made to match the exact and ideal values for other properties. specifications specification status comment media capture and streamsthe definition of 'constrainboolean' in that specification. candidate recommendation initial definition technically, constrainboolean is actually based on an intermediary dictionary named constrainbooleanparameters, which adds exact and ideal to the simple boolean type. however, for the sake of documentation clarity, the intermediate type...
ConstrainDOMString - Web APIs
s one of which must be the property's value. if the property can't be set to one of the listed values, matching will fail. ideal either a single domstring or an arrray of domstrings specifying ideal values for the property. if possible, one of the listed values will be used, but if it's not possible, the user agent will use the closest possible match. specifications specification status comment media capture and streamsthe definition of 'constraindomstring' in that specification. candidate recommendation initial definition technically, constraindomstring is actually based on an intermediary dictionary named constraindomstringparameters, which adds exact and ideal to domstring. however, for the sake of documentation clarity, the intermediate type (presen...
ConstrainDouble - Web APIs
the properties it inherits from doublerange. exact a double-precision floating-point number specifying a specific, required, value the property must have to be considered acceptable. ideal a double-precision floating-point number specifying a value the property would ideally have, but which can be considered optional if necessary to find a match. specifications specification status comment media capture and streamsthe definition of 'constraindouble' in that specification. candidate recommendation initial definition technically, constraindouble is actually based on an intermediary dictionary named constraindoublerange, which adds exact and ideal to doublerange, with constraindouble being a type that can be either a long integer or a doublerange. how...
ConstrainULong - Web APIs
r than a number, it may have the properties below in addition to the properties it inherits from ulongrange. exact an integer specifying precise, required, value the property must have to be considered acceptable. ideal an integer specifying a value the property would ideally have, but which can be considered optional if necessary to find a match. specifications specification status comment media capture and streamsthe definition of 'constrainulong' in that specification. candidate recommendation initial definition technically, constrainulong is actually based on an intermediary dictionary named constrainulongrange, which adds exact and ideal to ulongrange, with constrainulong being a type that can be either a long integer or a ulongrange. however, ...
ContentIndex.add() - Web APIs
Web › API › ContentIndex › add
e. // our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; self.registration.index.add(item); specifications specification status comment unknownthe definition of 'add' in that specification. unknown initial definition. ...
ContentIndex.delete() - Web APIs
unknown initial definition. ...
ContentIndex.getAll() - Web APIs
unknown initial definition. ...
ContentIndex - Web APIs
x await registration.index.delete(article.id); } all the above methods are available within the scope of the service worker. they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentindexitems = self.registration.index.getall(); specifications specification status comment unknownthe definition of 'contentindex' in that specification. unknown initial definition. ...
ContentIndexEvent() - Web APIs
tentindexevent to remove. return value a contentindexevent object configured using the given inputs. examples this examples constructs a new contentindexevent with the relevant id. var removedata = { id : 'unique-content-id' } var cievent = new contentindexevent('contentdelete', removedata); cievent.id; // should return 'unique-content-id' specifications specification status comment unknownthe definition of 'contentindexevent' in that specification. unknown initial definition. ...
ContentIndexEvent.id - Web APIs
e event and logs the removed content index id. the contentindexevent is only available to the {domxref('serviceworkerglobalscope','global scope')}} of a serviceworker. self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'id' in that specification. unknown initial definition. ...
ContentIndexEvent - Web APIs
parent interface, extendableevent. examples this example shows the sevice worker script listening for the contentdelete event and logs the removed content index id. self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'contentindexevent' in that specification. unknown initial definition. ...
Content Index API - Web APIs
...
ConvolverNode() - Web APIs
e scaled by an equal-power normalization, or not. the default is 'false'. return value a new convolvernode object instance. exceptions exception explanation notsupportederror the referenced audiobuffer does not have the correct number of channels, or it has a different sample rate to the associated audiocontext. specifications specification status comment web audio apithe definition of 'convolvernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
ConvolverNode.buffer - Web APIs
working draft ...
ConvolverNode.normalize - Web APIs
working draft ...
ConvolverNode - Web APIs
working draft ...
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
gstrategy object. exceptions none. examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy()' in that specification. living standard initial definition. ...
CountQueuingStrategy.size() - Web APIs
parameters none. return value 1. examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'size' in that specification. living standard initial definition. ...
CountQueuingStrategy - Web APIs
uingstrategy.size() returns 1. examples const queueingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queueingstrategy); var size = queueingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
CrashReportBody - Web APIs
editor's draft ...
Credential.id - Web APIs
Web › API › Credential › id
...
Credential.name - Web APIs
Web › API › Credential › name
...
Credential.type - Web APIs
Web › API › Credential › type
the type property of the credential interface returns a domstring containing the credential's type. valid values are password, federated and public-key. syntax var credtype = credential.type; value a domstring contains a credential's given name. example // tbd specifications specification status comment credential management level 1 working draft initial definition. ...
Credential - Web APIs
ng the credential's identifier. this might be any one of a guid, username, or email address. credential.type read only returns a domstring containing the credential's type. valid values are password, federated and public-key. (for passwordcredential, federatedcredential and publickeycredential) event handlers none. methods none. examples // tbd specifications specification status comment credential management level 1 working draft initial definition. ...
Credential Management API - Web APIs
sts to correctly authenticate a user, and which provides an api for that purpose. openid connect is an example of such a framework. passwordcredential provides information about a username/password pair. publickeycredential provides a credential for logging in using an un-phishable and data-breach resistant asymmetric key pair instead of a password. specifications specification status comment credential management level 1 working draft initial definition. web authentication: an api for accessing public key credentials level 1 recommendation initial definition. ...
CredentialsContainer.create() - Web APIs
tbd provider: (required) usvstring tbd protocol: optional usvstring tbd publickey: optional an publickeycredentialcreationoptions object that describes the options for creating a webauthn credential. returns a promise that resolves with a credential instance, such as passwordcredential, federatedcredential, or publickeycredential. specifications specification status comment credential management level 1the definition of 'get()' in that specification. working draft initial definition. web authentication: an api for accessing public key credentials level 1 recommendation initial definition. ...
CredentialsContainer.get() - Web APIs
alted. an aborted operation may complete normally (generally if the abort was received after the operation finished) or reject with an "aborterror" domexception. returns a promise that resolves with a credential instance that matches the provided parameters. if a single credential cannot be unambigiously obtained, the promise will resolve to null. specifications specification status comment credential management level 1the definition of 'get()' in that specification. working draft initial definition. web authentication: an api for accessing public key credentials level 1 recommendation initial definition. ...
CredentialsContainer.store() - Web APIs
a promise. this method is restricted to top-level contexts. calls to it within an <iframe> element will resolve without effect. syntax credentialscontainer.store(credential).then(function(credential) { ... } ) parameters credentials a valid credential instance. returns a promise, resolving to the passed credential instance. example // tbd specifications specification status comment credential management level 1 working draft initial definition. ...
CredentialsContainer - Web APIs
e isn't automatically signed in on the next site visit. earlier versions of the spec called this method requireusermediation(). see browser compatibility for support details. credentialscontainer.store()secure context stores a set of credentials for a user, inside a provided credential instance and returns that instance in a promise. examples // tbd specifications specification status comment credential management level 1 working draft initial definition. web authentication: an api for accessing public key credentials level 1 recommendation initial definition. ...
Crypto.getRandomValues() - Web APIs
fic random number function, the unix /dev/urandom device, or other source of random or pseudorandom data. examples /* assuming that window.crypto.getrandomvalues is available */ var array = new uint32array(10); window.crypto.getrandomvalues(array); console.log("your lucky numbers:"); for (var i = 0; i < array.length; i++) { console.log(array[i]); } specification specification status comment web cryptography api recommendation initial definition ...
Crypto.subtle - Web APIs
Web › API › Crypto › subtle
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations. syntax var crypto = crypto.subtle; value a subtlecrypto object you can use to interact with the web crypto api's low-level cryptography features. specifications specification status comment web cryptography apithe definition of 'crypto.subtle' in that specification. recommendation initial definition. ...
Crypto - Web APIs
Web › API › Crypto
recommendation initial definition ...
CryptoKey - Web APIs
Web › API › CryptoKey
ap a key. examples the examples for subtlecrypto methods often use cryptokey objects. for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokey' in that specification. recommendation initial definition. ...
CryptoKeyPair - Web APIs
gnatures. examples the examples for subtlecrypto methods often use cryptokeypair objects. for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokeypair' in that specification. recommendation initial definition. ...
CustomElementRegistry.define() - Web APIs
living standard initial definition. ...
CustomElementRegistry.get() - Web APIs
living standard initial definition. ...
CustomElementRegistry.upgrade() - Web APIs
thrown. return value void. examples taken from the html spec: const el = document.createelement("spider-man"); class spiderman extends htmlelement {} customelements.define("spider-man", spiderman); console.assert(!(el instanceof spiderman)); // not yet upgraded customelements.upgrade(el); console.assert(el instanceof spiderman); // upgraded! specifications specification status comment html living standardthe definition of 'customelements.upgrade()' in that specification. living standard initial definition. ...
CustomElementRegistry.whenDefined() - Web APIs
of menu that are not yet defined. const undefinedelements = container.queryselectorall(':not(:defined)'); const promises = [...undefinedelements].map( button => customelements.whendefined(button.localname) ); // wait for all the children to be upgraded, // then remove the placeholder. await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification. living standard initial definition. ...
CustomElementRegistry - Web APIs
living standard initial definition. ...
CustomEvent() - Web APIs
dictionary (if one was provided). example // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event var event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); additional examples can be found at creating and triggering events. specifications specification status comment domthe definition of 'customevent()' in that specification. living standard initial definition. ...
CustomEvent.detail - Web APIs
d with. example // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event let event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); // will return an object contaning the hazcheeseburger property let mydetail = event.detail; specifications specification status comment domthe definition of 'detail' in that specification. living standard initial definition. ...
CustomEvent.initCustomEvent() - Web APIs
. syntax event.initcustomevent(type, canbubble, cancelable, detail); parameters type is a domstring containing the name of the event. canbubble is a boolean indicating whether the event bubbles up through the dom or not. cancelable is a boolean indicating whether the event is cancelable. detail the data passed when initializing the event. specifications specification status comment domthe definition of 'customevent' in that specification. living standard initial definition, but already deprecated in favor of the use of a constructor, customevent() ...
CustomEvent - Web APIs
event.getpreventdefault() non-standard; use event.defaultprevented instead. (returns the value of event.defaultprevented.) event.preventbubble() obsolete since gecko 24 obsolete; use event.stoppropagation instead. (prevents the event from bubbling.) event.preventcapture() obsolete since gecko 24 obsolete; use event.stoppropagation instead. specifications specification status comment domthe definition of 'customevent' in that specification. living standard initial definition. ...
DOMException() - Web APIs
); var domexception = new domexception(message, name); parameters message optional a description of the exception. if not present, the empty string '' is used. name optional returns a domstring that contains one of the strings associated with an error constant. return value domexception a newly created domexception object. example tbd specifications specification status comment web idlthe definition of 'domexception()' in that specification. candidate recommendation adds the constructor for the domexception class. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. de...
DOMException.code - Web APIs
Web › API › DOMException › code
d-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match. this field is used for historical reasons. new dom exceptions don't use this anymore: they put this info in the domexception.name attribute. syntax var domexceptioncode = domexceptioninstance.code; value a short number. specifications specification status comment web idlthe definition of 'code' in that specification. candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafaria...
DOMException.message - Web APIs
candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. ...
DOMException.name - Web APIs
Web › API › DOMException › name
candidate recommendation ...
DOMException - Web APIs
g version (no legacy code value and constant name). operationerror the operation failed for an operation-specific reason (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). specifications specification status comment web idlthe definition of 'constructor' in that specification. candidate recommendation adds the constructor for the domexception class. adds the notreadableerror, unknownerror, constrainterror, dataerror, transactioninactiveerror, readonlyerror, versionerror, operationerror, and notallowederror values. ...
DOMHighResTimeStamp - Web APIs
much time has elapsed since a particular point in your code, you can do something like this: let starttime = performance.now(); /* ... do things for a while ... */ let elapsedtime = performance.now() - starttime; upon completion, the value of elapsedtime is the number of milliseconds that have elapsed since you recorded the starting time in line 1. specifications specification status comment high resolution time level 2the definition of 'domhighrestimestamp' in that specification. recommendation stricter definitions of interfaces and types. high resolution timethe definition of 'domhighrestimestamp' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated fro...
DOMImplementation.createDocument() - Web APIs
be created. it defaults to null. example var doc = document.implementation.createdocument ('http://www.w3.org/1999/xhtml', 'html', null); var body = document.createelementns('http://www.w3.org/1999/xhtml', 'body'); body.setattribute('id', 'abc'); doc.documentelement.appendchild(body); alert(doc.getelementbyid('abc')); // [object htmlbodyelement] specifications specification status comment domthe definition of 'domimplementation.createdocument' in that specification. living standard modified the return type of createdocument() from document to xmldocument. the third argument of createdocument(), doctype, is now optional and default to null. document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocumen...
DOMImplementation.createDocumentType() - Web APIs
mid is a domstring containing the system identifiers. example var dt = document.implementation.createdocumenttype('svg:svg', '-//w3c//dtd svg 1.1//en', 'http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd'); var d = document.implementation.createdocument('http://www.w3.org/2000/svg', 'svg:svg', dt); alert(d.doctype.publicid); // -//w3c//dtd svg 1.1//en specifications specification status comment domthe definition of 'domimplementation.createdocumenttype' in that specification. living standard no change from document object model (dom) level 3 core specification document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification. obsolete no change from document object model (dom) lev...
DOMImplementation.createHTMLDocument() - Web APIs
o lines handle importing the contents of our new document into the new document's context. finally, line 20 actually replaces the contents of the frame with the new document's contents. view live examples the returned document is pre-constructed with the following html: <!doctype html> <html> <head> <title>title</title> </head> <body> </body> </html> specifications specification status comment domthe definition of 'domimplementation.createhtmldocument' in that specification. living standard initial definition. ...
DOMImplementation.hasFeature() - Web APIs
t version of the spec settled to force this method to always return true, where the functionality was accurate and in use. syntax const flag = document.implementation.hasfeature(feature, version); parameters feature a domstring representing the feature name. version a domstring representing the version of the specification defining the feature. specifications specification status comment domthe definition of 'domimplementation.hasfeature' in that specification. living standard modified to always return true except for svg features. document object model (dom) level 3 core specificationthe definition of 'domimplementation.hasfeature' in that specification. obsolete no change from document object model (dom) level 2 core specification ...
DOMImplementation - Web APIs
mplementation.createhtmldocument() creates and returns an html document. domimplementation.hasfeature() returns a boolean indicating if a given feature is supported or not. this function is unreliable and kept for compatibility purpose alone: except for svg-related queries, it always returns true. old browsers are very inconsistent in their behavior. specifications specification status comment domthe definition of 'domimplementation' in that specification. living standard removed the getfeature() method. added the createhtmldocument() method. modified the return type of createdocument() from document to xmldocument. document object model (dom) level 3 core specificationthe definition of 'domimplementation' in that specification. obsolete ...
DOMImplementationList - Web APIs
returned by domimplementationsource.getdomimplementationlist() and domimplementationregistry.getdomimplementationlist() . can be iterated with 0-based index. properties domimplementationlist.length read only returns an integer. methods domimplementationlist.item() returns the pos item. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domimplementationlist' in that specification. obsolete initial definition. ...
DOMLocator - Web APIs
nteger or -1. domlocator.byteoffset read only returns a positive integer or -1. domlocator.utf16offset read only returns a positive integer or -1. domlocator.relatednode read only returns a positive integer or -1. domlocator.uri read only returns a positive integer or -1. methods this interface neither implements, nor inherits, any method. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domlocator' in that specification. obsolete initial definition ...
DOMMatrix() - Web APIs
candidate recommendation initial definition. ...
DOMMatrix - Web APIs
Web › API › DOMMatrix
candidate recommendation initial definition ...
DOMMatrixReadOnly() - Web APIs
the dommatrixreadonly constructor creates a new dommatrixreadonly object which represents 4x4 matrices, suitable for 2d and 3d operations. syntax var dommatrixreadonly = new dommatrixreadonly([init]) parameters init optional either a string containing a sequence of numbers or an array of integers specifying the matrix you want to create. specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly' in that specification. candidate recommendation initial definition. ...
DOMMatrixReadOnly.flipX() - Web APIs
ethod to create a new matrix, which is then applied to the blue triangle, inverting it across the x-axis. the red triangle is left in place. const flipped = document.getelementbyid('flipped'); const matrix = new dommatrixreadonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.flipx()' in that specification. candidate recommendation initial definition ...
DOMMatrixReadOnly.scale() - Web APIs
candidate recommendation initial definition ...
DOMMatrixReadOnly.translate() - Web APIs
eates an identity matrix, then uses the translate() method to create a new, translated matrix — which is then applied to the blue square as a transform. the red square is left in place. const matrix = new dommatrixreadonly().translate(25, 25); document.queryselector('#transformed').setattribute('transform', matrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.translate()' in that specification. candidate recommendation initial definition ...
DOMMatrixReadOnly - Web APIs
x() creates a new mutable dommatrix object given an existing matrix or a dommatrixinit dictionary which provides the values for its properties. if no matrix is specified, the matrix is initialized with every element set to 0 except the bottom-right corner and the element immediately above and to its left: m33 and m34. these have the default value of 1. specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly' in that specification. candidate recommendation initial definition ...
DOMObject - Web APIs
Web › API › DOMObject
the obsolete domobject interface was used in earlier versions of the dom specification as the base class for any object data type. the specifications now simply use the javascript object type. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domobject' in that specification. obsolete initial specification ...
DOMParser - Web APIs
Web › API › DOMParser
living standard ...
DOMPoint.fromPoint() - Web APIs
candidate recommendation initial definition ...
DOMPoint.DOMPoint() - Web APIs
Web › API › DOMPoint › DOMPoint
candidate recommendation initial definition ...
DOMPoint.w - Web APIs
Web › API › DOMPoint › w
property holds the point's perspective value, w, for a point in space. syntax var perspective = dompoint.w; value a double-precision floating-point value indicating the w perspective value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). the default is 1.0. specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification. candidate recommendation initial definition ...
DOMPoint.x - Web APIs
Web › API › DOMPoint › x
of x means to the left, barring any transforms that may have altered the orientation of the axes. syntax var xpos = dompoint.x; value a double-precision floating-point value indicating the x coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification. candidate recommendation initial definition ...
DOMPoint.y - Web APIs
Web › API › DOMPoint › y
ve been applied to alter the orientation, the value of y increases downward and decreases upward. syntax var ypos = dompoint.y; value a double-precision floating-point value indicating the y coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification. candidate recommendation initial definition ...
DOMPoint.z - Web APIs
Web › API › DOMPoint › z
oward the user from the screen, and negative values receding into the distance behind the screen. syntax var zpos = dompoint.z; value a double-precision floating-point value indicating the z coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification. candidate recommendation initial definition ...
DOMPoint - Web APIs
Web › API › DOMPoint
candidate recommendation ...
DOMPointInit.w - Web APIs
Web › API › DOMPointInit › w
by inheritance, also available as dompoint.frompoint(). the dompointreadonly.tojson() method returns a dompointinit object that describes the same point as the original point. by inheritance, this method is also available as dompoint.tojson(). this value is assumed to be 1 by default if not included in the dompointinit object passed into frompoint(). specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification. candidate recommendation initial definition ...
DOMPointInit.x - Web APIs
Web › API › DOMPointInit › x
is, its value may be nan or ±infinity). if this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default. dompointinit is used as an input when calling either dompointreadonly.frompoint() or dompoint.frompoint(), and is returned by the dompointreadonly.tojson() and dompoint.tojson() methods. specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification. candidate recommendation initial definition ...
DOMPointInit.y - Web APIs
Web › API › DOMPointInit › y
ut parameter, to specify the coordinates and perspective value of the new point to be created. this method is, by inheritance, also available as dompoint.frompoint(). the dompointreadonly.tojson() method returns a dompointinit object that describes the same point as the original point. by inheritance, this method is also available as dompoint.tojson(). specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification. candidate recommendation initial definition ...
DOMPointInit.z - Web APIs
Web › API › DOMPointInit › z
also available as dompoint.frompoint(). the dompointreadonly.tojson() method returns a dompointinit object that describes the same point as the original point. by inheritance, this method is also available as dompoint.tojson(). if this property is missing when the dompointinit object is passed into frompoint(), the value is assumed to be 0 by default. specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification. candidate recommendation initial definition ...
DOMPointInit - Web APIs
point representing the top-left corner of the current window, with a z component added to move the point closer to the user. this same code will work to create a dompointreadonly object; just change the interface name in the code. const pointdesc = { x: window.screenx, y: window.screeny, z: 5.0 }; const windtopleft = dompoint.frompoint(pointdesc) specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.frompoint()' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly() - Web APIs
alues such as ±infinity and nan. return value a new dompointreadonly object representing the specified location in space. examples the following code demonstrates creating both 2d and 3d points. var point2d = new dompointreadonly(50, 25); var point3d = new dompointreadonly(50, 0, 10); var perspectivepoint3d = new dompointreadonly(50, 50, 25, 0.5); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.fromPoint() - Web APIs
intreadonly.frompoint({x: 25, y: 25}) creating a 3d point using an existing point this example creates a point, origpoint, of type dompoint, using new dompoint(). that point is then used as the input for frompoint() to create a new point, newpoint. const origpoint = new dompoint(25, 25, 100, 0.5) const newpoint = dompointreadonly.frompoint(origpoint) specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.toJSON() - Web APIs
ose properties are set to the values in the dompoint or dompointreadonly on which the method was called. example this example creates a dompoint object representing the top-left corner of the current window, in screen coordinates, then converts that to json. var topleft = new dompoint(window.screenx, window.screeny); var pointjson = topleft.tojson(); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.tojson()' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.w - Web APIs
this property, you should instead use the dompoint object. syntax const perspective = somedompointreadonly.w value a double-precision floating-point value indicating the w perspective value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). the default is 1.0. specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.x - Web APIs
values of x means to the left, assuming no transforms have resulted in a reversal. syntax const xpos = somedompointreadonly.x; value a double-precision floating-point value indicating the x coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.y - Web APIs
gative values of y mean upward, assuming no transforms have resulted in a reversal. syntax const ypos = somedompointreadonly.y; value a double-precision floating-point value indicating the y coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly.z - Web APIs
rom the user (into the screen), assuming no transforms have resulted in a reversal. syntax const zpos = somedompointreadonly.z; value a double-precision floating-point value indicating the z coordinate's value for the point. this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity). specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification. candidate recommendation initial definition ...
DOMPointReadOnly - Web APIs
intreadonly.frompoint() a static method that creates a new dompointreadonly object given the coordinates provided in the specified dompointinit object. methods matrixtransform() applies a matrix transform specified as a dommatrixinit object to the dompointreadonly object. tojson() returns a json representation of the dompointreadonly object. specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification. candidate recommendation latest spec version is an ed. ...
DOMQuad - Web APIs
Web › API › DOMQuad
omquad.fromrect() returns a new domquad object based on the passed set of coordinates. domquad.fromquad() returns a new domquad object based on the passed set of coordinates. domquad.getbounds() returns a domrect object with the coordinates and dimensions of the domquad object. domquad.tojson() returns a json representation of the domquad object. specifications specification status comment geometry interfaces module level 1the definition of 'domquad' in that specification. candidate recommendation initial definition. ...
DOMRect.DOMRect() - Web APIs
Web › API › DOMRect › DOMRect
the domrect's origin. width the width of the domrect. height the height of the domrect. examples to create a new domrect, you could run a line of code like so: mydomrect = new domrect(0,0,100,100); // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrect()' in that specification. candidate recommendation initial definition. ...
DOMRect - Web APIs
Web › API › DOMRect
candidate recommendation initial definition. ...
DOMRectReadOnly() - Web APIs
e width of the domrectreadonly. height the height of the domrectreadonly. examples to create a new dompoint, you could run a line of code like so: const mydomrect = new domrectreadonly(0, 0, 100, 100) // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly()' in that specification. candidate recommendation initial definition. ...
DOMRectReadOnly.bottom - Web APIs
the bottom read-only property of the domrectreadonly interface returns the bottom coordinate value of the domrect. (has the same value as y + height, or y if height is negative.) syntax var recbottom = domrect.bottom; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'bottom' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.fromRect() - Web APIs
optional an object specifying the location and dimensions of a rectangle. all properties default to 0. the properties are: x: the coordinate of the left side of the rectangle. y: the coordinate of the top side of the rectangle. width: the width of the rectangle. height: the height of the rectangle. return value an instance of domrect. specifications specification status comment geometry interfaces module level 1the definition of 'fromrect()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktop...
DOMRectReadOnly.height - Web APIs
the height read-only property of the domrectreadonly interface represents the height of the domrect. syntax var recheight = domrect.height; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'height' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.left - Web APIs
the left read-only property of the domrectreadonly interface returns the left coordinate value of the domrect. (has the same value as x, or x + width if width is negative.) syntax var recleft = domrect.left; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'left' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.right - Web APIs
the right read-only property of the domrectreadonly interface returns the right coordinate value of the domrect. (has the same value as x + width, or x if width is negative.) syntax var recright = domrect.right; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'right' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.top - Web APIs
the top read-only property of the domrectreadonly interface returns the top coordinate value of the domrect. (has the same value as y, or y + height if height is negative.) syntax var rectop = domrect.top; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'top' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.width - Web APIs
the width read-only property of the domrectreadonly interface represents the width of the domrect. syntax var recwidth = domrect.width; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'width' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.x - Web APIs
Web › API › DOMRectReadOnly › x
the x read-only property of the domrectreadonly interface represents the x coordinate of the domrect's origin. syntax var recx = domrect.x; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly.y - Web APIs
Web › API › DOMRectReadOnly › y
the y read-only property of the domrectreadonly interface represents the y coordinate of the domrect's origin. syntax var recy = domrect.y; value a double. specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification. candidate recommendation latest spec version is an ed. ...
DOMRectReadOnly - Web APIs
x + width). domrectreadonly.bottom read only returns the bottom coordinate value of the domrect (usually the same as y + height). domrectreadonly.left read only returns the left coordinate value of the domrect (usually the same as x). static methods domrectreadonly.fromrect() creates a new domrect object with a given location and dimensions. specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly' in that specification. candidate recommendation initial definition. ...
DOMString - Web APIs
Web › API › DOMString
domstring is a utf-16 string. as javascript already uses such strings, domstring is mapped directly to a string. passing null to a method or parameter accepting a domstring typically stringifies to "null". specifications specification status comment web idlthe definition of 'domstring' in that specification. candidate recommendation ...
DOMStringList - Web APIs
a type returned by some apis which contains a list of domstring (strings). properties domstringlist.length read only returns the length of the list. methods domstringlist.item() returns a domstring. domstringlist.contains() returns boolean indicating if the given string is in the list specifications specification status comment html living standardthe definition of 'domstringlist' in that specification. living standard initial specification ...
DOMStringMap - Web APIs
the domstringmap interface is used for the htmlelement.dataset attribute, to represent data for custom attributes added to elements. specifications specification status comment html living standardthe definition of 'domstringmap' in that specification. living standard ...
DOMTimeStamp - Web APIs
the domtimestamp type represents an absolute or relative number of milliseconds, depending on the specification in which it appears. specifications specification status comment web idlthe definition of 'domtimestamp' in that specification. candidate recommendation initial specification ...
DOMTokenList.add() - Web APIs
Web › API › DOMTokenList › add
list, and write the list into the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.add("d"); span.textcontent = classes; the output looks like this: you can add multiple tokens as well: span.classlist.add("d", "e", "f"); specifications specification status comment domthe definition of 'add()' in that specification. living standard initial definition ...
DOMTokenList.contains() - Web APIs
extcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.contains("c"); if (result) { span.textcontent = "the classlist contains 'c'"; } else { span.textcontent = "the classlist does not contain 'c'"; } the output looks like this: specifications specification status comment domthe definition of 'contains()' in that specification. living standard initial definition ...
DOMTokenList.entries() - Web APIs
each one using a for...of loop, writing them to the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.entries(); for (let value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'entries() (as iterable<node>)' in that specification. living standard initial definition. ...
DOMTokenList.forEach() - Web APIs
living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
DOMTokenList.item() - Web APIs
Web › API › DOMTokenList › item
trieve the last item in the list using item(tokenlist.length - 1), and write it into the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let item = classes.item(classes.length-1); span.textcontent = item; the output looks like this: specifications specification status comment domthe definition of 'item()' in that specification. living standard initial definition ...
DOMTokenList.keys() - Web APIs
Web › API › DOMTokenList › keys
e keys using a for ... of loop, writing each one to the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.keys(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'keys() (as iterable<node>)' in that specification. living standard initial definition ...
DOMTokenList.length - Web APIs
okenlist using element.classlist, then write the length of the list to the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let length = classes.length; span.textcontent = `classlist length = ${length}`; the output looks like this: specifications specification status comment domthe definition of 'length' in that specification. living standard initial definition ...
DOMTokenList.remove() - Web APIs
.textcontent = classes; the output looks like this: to remove multiple classes at once, you can supply multiple tokens. the order you supply the tokens doesn't have to match the order they appear in the list: let span2 = document.getelementsbytagname("span")[0] let classes2 = span.classlist; classes2.remove("c", "b"); span2.textcontent = classes; specifications specification status comment domthe definition of 'remove()' in that specification. living standard initial definition ...
DOMTokenList.replace() - Web APIs
d the replace method to the domtokenlist class. the following code will only work with ie10-11. to use with earlier versions of ie, refer to the polyfill at element.classlist#polyfill domtokenlist.prototype.replace = function (a, b) { if (this.contains(a)) { this.add(b); this.remove(a); return true; } return false; } specifications specification status comment domthe definition of 'replace()' in that specification. living standard initial definition ...
DOMTokenList.supports() - Web APIs
...
DOMTokenList.toggle() - Web APIs
living standard initial definition ...
DOMTokenList.value - Web APIs
living standard initial definition ...
DOMTokenList.values() - Web APIs
lues using a for ... of loop, writing each one to the <span>'s node.textcontent. first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.values(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'values() (as iterable<node>)' in that specification. living standard initial definition ...
DOMTokenList - Web APIs
mtokenlist (such as domtokenlist.add()) automatically trim any excess whitespace and remove duplicate values from the list. for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classlist; span.classlist.add("x"); span.textcontent = `span classlist is "${classes}"`; the output looks like this: specifications specification status comment domthe definition of 'domtokenlist' in that specification. living standard initial definition ...
DOMUserData - Web APIs
object, in mozilla, it may be returned as a string or other type, if it was set as such a type (e.g., node.setuserdata() and node.getuserdata()). domuserdata is not persisted nor serialized and will not be present after the application has restarted or after a crash. if you are interested in persisting data you might rather need to use nsisessionstore. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domuserdata' in that specification. obsolete initial specification ...
DataTransfer() - Web APIs
the datatransfer constructor creates a new datatransfer object instance. syntax var datatrans = new datatransfer() parameters none. specifications specification status comment html living standardthe definition of 'the datatransfer() constructor' in that specification. living standard initial definition. ...
DataTransfer.dropEffect - Web APIs
living standard html 5.1the definition of 'dropeffect' in that specification. recommendation initial definition ...
DataTransfer.effectAllowed - Web APIs
living standard html 5.1the definition of 'effectallowed' in that specification. recommendation initial definition ...
DataTransfer.files - Web APIs
s desktop to the browser. syntax datatransfer.files; return value a list of the files in a drag operation, one list item for each file in the operation. if the drag operation had no files, the list is empty. example there are two live examples of this interface: firefox only: http://jsfiddle.net/9c2ef/ all browsers: https://jsbin.com/hiqasek/ specifications specification status comment html living standardthe definition of 'files' in that specification. living standard html 5.1the definition of 'files' in that specification. recommendation initial definition ...
DataTransfer.getData() - Web APIs
living standard html 5.1the definition of 'getdata()' in that specification. recommendation initial definition ...
DataTransfer.items - Web APIs
living standard html 5.1the definition of 'items' in that specification. recommendation initial definition ...
DataTransfer.setData() - Web APIs
living standard html 5.1the definition of 'setdata()' in that specification. recommendation initial definition ...
DataTransfer.setDragImage() - Web APIs
living standard html 5.1the definition of 'setdragimage()' in that specification. recommendation not included in w3c html5 recommendation ...
DataTransfer.types - Web APIs
living standard html 5.1the definition of 'types' in that specification. recommendation initial definition ...
DataTransfer - Web APIs
n item at the specified index. if the index is not in the range from 0 to the number of items minus one, an empty string list is returned. removed in firefox 71. examples every method and property listed in this document has its own reference page and each reference page either directly includes an example of the interface or has a link to an example. specifications specification status comment html living standardthe definition of 'datatransfer' in that specification. living standard mozcursor, mozitemcount, mozsourcenode, mozusercancelled, addelement(), mozcleardataat(), mozgetdataat(), mozsetdataat() and moztypesat are gecko specific. html 5.1the definition of 'datatransfer' in that specification. recommendation not included in w3c html5 recom...
DataTransferItem.getAsFile() - Web APIs
].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("... drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasfile()' in that specification. living standard initial value html 5.1the definition of 'getasfile()' in that specification. recommendation snapshot of the html whatwg document ...
DataTransferItem.getAsString() - Web APIs
].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("... drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasstring()' in that specification. living standard initial definition. html 5.1the definition of 'getasstring()' in that specification. recommendation snapshot fo html whatwg document ...
DataTransferItem.kind - Web APIs
[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("... drop: html"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("... drop: file "); } } } specifications specification status comment html living standardthe definition of 'kind' in that specification. living standard initial version html 5.1the definition of 'kind' in that specification. recommendation w3c snapshot of the whatwg document. ...
DataTransferItem.type - Web APIs
].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("... drop: file "); } } } specifications specification status comment html living standardthe definition of 'type' in that specification. living standard initial version html 5.1the definition of 'type' in that specification. recommendation snapshot of the html whatwg document ...
DataTransferItem.webkitGetAsEntry() - Web APIs
ry representing the file. if that's successful, we call scanfiles() to process the item—either by adding it to the list if it's just a file or by adding it and walking down into it if it's a directory. result you can see how this works by trying it out below. find some files and directories and drag them in, and take a look at the resulting output. specifications specification status comment file and directory entries apithe definition of 'webkitgetasentry()' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-co...
DataTransferItem - Web APIs
em.webkitgetasentry() returns an object based on filesystementry representing the selected file's entry in its file system. this will generally be either a filesystemfileentry or filesystemdirectoryentry object. example all of this interface's methods and properties have their own reference page, and each reference page has an example of its usage. specifications specification status comment html living standardthe definition of 'datatransferitem' in that specification. living standard initial definition. html 5.1the definition of 'datatransferitem' in that specification. recommendation w3c snapshot of whatwg file and directory entries apithe definition of 'datatransferitem.webkitgetasentry()' in that specification. draft defini...
DataTransferItemList.DataTransferItem() - Web APIs
living standard ...
DataTransferItemList.add() - Web APIs
living standard html 5.1the definition of 'add()' in that specification. recommendation not included in w3c html5 recommendation ...
DataTransferItemList.clear() - Web APIs
living standard html 5.1the definition of 'clear()' in that specification. recommendation not included in w3c html5 recommendation ...
DataTransferItemList.length - Web APIs
living standard html 5.1the definition of 'length' in that specification. recommendation not included in w3c html5 recommendation ...
DataTransferItemList.remove() - Web APIs
living standard html 5.1the definition of 'remove()' in that specification. recommendation not included in w3c html5 recommendation ...
DataTransferItemList - Web APIs
e drag item from the list at the given index. datatransferitemlist.clear() removes all of the drag items from the list. datatransferitemlist.datatransferitem() getter that returns a datatransferitem at the given index. example each of this interface's methods and properties has a reference page, and each reference page has an example of its usage. specifications specification status comment html living standardthe definition of 'datatransferitemlist' in that specification. living standard html 5.1the definition of 'datatransferitemlist' in that specification. recommendation not included in w3c html5 recommendation ...
DedicatedWorkerGlobalScope.close() - Web APIs
living standard ...
DedicatedWorkerGlobalScope: message event - Web APIs
// inside static/scripts/worker.js self.addeventlistener('message', (event) => { console.log(`received message from parent: ${event.data}`); }); alternatively, it could listen using the onmessage event handler property: // static/scripts/worker.js self.onmessage = (event) => { console.log(`received message from parent: ${event.data}`); }; specifications specification status html living standard living standard ...
DedicatedWorkerGlobalScope: messageerror event - Web APIs
er(): // inside worker.js self.addeventlistener('messageerror', (event) => { self.postmessage('error receiving message'); console.error(event); }); the same, but using the onmessageerror event handler property: // inside worker.js self.onmessageerror = (event) => { self.postmessage('error receiving message'); console.error(event); }; specifications specification status html living standard living standard ...
DedicatedWorkerGlobalScope.name - Web APIs
nce to the dedicatedworkerglobalscope. syntax var nameobj = self.name; value a domstring. example if a worker is created using a constructor with a name option: var myworker = new worker("worker.js", { name : "myworker" }); the dedicatedworkerglobalscope will now have a name of "myworker", returnable by running self.name from inside the worker. specifications specification status comment html living standardthe definition of 'name' in that specification. living standard ...
DedicatedWorkerGlobalScope.onmessage - Web APIs
living standard ...
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
living standard ...
DedicatedWorkerGlobalScope.postMessage() - Web APIs
whereas inside the worker script you just need onmessage because the worker is effectively the global scope (dedicatedworkerglobalscope). for a full example, see ourbasic dedicated worker example (run dedicated worker). note: postmessage() can only send a single object at once. as seen above, if you want to pass multiple values you can send an array. specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.postmessage()' in that specification. living standard ...
DedicatedWorkerGlobalScope - Web APIs
function every x milliseconds. windowtimers.settimeout() sets a delay for executing a function. events message fired when the worker receives a message from its parent. also available via the onmessage property. messageerror fired when a worker receives a message that can't be deserialized. also available via the onmessageerror property. specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope' in that specification. living standard ...
DelayNode() - Web APIs
members: delaytime: the initial delay time for the node, in seconds. the default is 0. maxdelaytime: the maximum delay time for the node, in seconds. defaults to 1. return value a new delaynode object instance. example const audioctx = new audiocontext(); const delaynode = new delaynode(audioctx, { delaytime: 0.5, maxdelaytime: 2, }); specifications specification status comment web audio apithe definition of 'delaynode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet...
DelayNode.delayTime - Web APIs
working draft ...
DelayNode - Web APIs
Web › API › DelayNode
working draft ...
DeprecationReportBody - Web APIs
editor's draft ...
Detecting device orientation - Web APIs
nts a rotation rate along the axis going from left to right of the plane of the screen (or keyboard for desktop). gamma: represents a rotation rate along the axis going from bottom to top of the plane of the screen (or keyboard for desktop). finally, interval represents the interval of time, in milliseconds, at which data are obtained from the device. specifications specification status comment deviceorientation event specification editor's draft initial specification. ...
Using light sensors - Web APIs
or="#fff"; } }); this example shows how the api can actually be used in the wild. if your app contains a lot of white in the ui, it is usually beneficial to the user to change the ui to a darker color in a darker environment. the code alerts the user that they are working in a dark environment and then changes the page's background to a darker color. specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification. candidate recommendation initial specification ...
DeviceLightEvent.value - Web APIs
the value property provides the current level of the ambient light. syntax var light = instanceofdevicelightevent.value; value a positive number representing a light intensity expressed in lux. specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification. candidate recommendation initial definition ...
DeviceMotionEvent.acceleration - Web APIs
is an object providing information about acceleration on three axis. each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition. ...
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
is an object providing information about acceleration on three axis. each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition. ...
DeviceMotionEvent.interval - Web APIs
returns the interval, in milliseconds, at which data is obtained from the underlaying hardware. you can use this to determine the granularity of motion events. syntax var interval = devicemotionevent.interval; specifications specification status comment deviceorientation event specification editor's draft initial definition. ...
DeviceMotionEvent.rotationRate - Web APIs
...
DeviceMotionEvent - Web APIs
ee orientation axis alpha, beta and gamma. rotation rate is expressed in degrees per seconds. devicemotionevent.intervalread only a number representing the interval of time, in milliseconds, at which data is obtained from the device. example window.addeventlistener('devicemotion', function(event) { console.log(event.acceleration.x + ' m/s2'); }); specifications specification status comment deviceorientation event specificationthe definition of 'devicemotionevent' in that specification. editor's draft initial definition. ...
DeviceMotionEventAcceleration: x - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the x axis in a devicemotioneventacceleration object. syntax var xaccel = devicemotioneventacceleration.x; return value x a double indicating the amount of acceleration along the x axis. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: x' in that specification. editor's draft ...
DeviceMotionEventAcceleration: y - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the y axis in a devicemotioneventacceleration object. syntax var yaccel = devicemotioneventacceleration.y; return value y a double indicating the amount of acceleration along the y axis. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: y' in that specification. editor's draft ...
DeviceMotionEventAcceleration: z - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the z axis in a devicemotioneventacceleration object. syntax var zaccel = devicemotioneventacceleration.z; return value z a double indicating the amount of acceleration along the z axis. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: z' in that specification. editor's draft ...
DeviceMotionEventAcceleration - Web APIs
is experiencing along all three axes. properties devicemotioneventacceleration.x read only the amount of acceleration along the x axis. read only. devicemotioneventacceleration.y read only the amount of acceleration along the y axis. read only. devicemotioneventacceleration.z read only the amount of acceleration along the z axis. read only. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration' in that specification. editor's draft initial definition ...
DeviceMotionEventRotationRate: alpha - Web APIs
rty indicates the rate of rotation around the z axis -- in degrees per second -- in a devicemotioneventrotationrate object. syntax var alpha = devicerotationrate.alpha; this property is read-only. return value alpha a double indicating the rate of rotation around the z axis, in degrees per second. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: alpha' in that specification. editor's draft ...
DeviceMotionEventRotationRate: beta - Web APIs
operty indicates the rate of rotation around the x axis -- in degrees per second -- in a devicemotioneventrotationrate object. syntax var beta = devicerotationrate.beta; this property is read-only. return value beta a double indicating the rate of rotation around the x axis, in degrees per second. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: beta' in that specification. editor's draft ...
DeviceMotionEventRotationRate: gamma - Web APIs
rty indicates the rate of rotation around the y axis -- in degrees per second -- in a devicemotioneventrotationrate object. syntax var gamma = devicerotationrate.gamma; this property is read-only. return value gamma a double indicating the rate of rotation around the y axis, in degrees per second. see accelerometer values explained for details. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: gamma' in that specification. editor's draft ...
DeviceMotionEventRotationRate - Web APIs
properties devicemotioneventrotationrate.alpha read only the amount of rotation around the z axis, in degrees per second. devicemotioneventrotationrate.beta read only the amount of rotation around the x axis, in degrees per second. devicemotioneventrotationrate.gamma read only the amount of rotation around the y axis, in degrees per second. specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate' in that specification. editor's draft ...
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
to 180. this represents a front to back motion of the device. gamma: a number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90. this represents a left to right motion of the device. absolute: a boolean that indicates whether or not the device is providing orientation data absolutely. specifications specification status comment deviceorientation event specification editor's draft initial definition. ...
DeviceOrientationEvent.absolute - Web APIs
...
DeviceOrientationEvent.alpha - Web APIs
...
DeviceOrientationEvent.beta - Web APIs
...
DeviceOrientationEvent.gamma - Web APIs
...
DeviceOrientationEvent - Web APIs
express in degrees with values ranging from 0 to 360. deviceorientationevent.webkitcompassaccuracy read only the accuracy of the compass means that the deviation is positive or negative. it's usually 10. example window.addeventlistener('deviceorientation', function(event) { console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma); }); specifications specification status comment deviceorientation event specification editor's draft initial specification. ...
Device Memory API - Web APIs
. javascript api you may query the approximate amount of ram device has by retreiving navigator.devicememory var ram1 = window.navigator.devicememory; var ram2 = navigator.devicememory; both of these will return the same result. client hints header you also may use client hints directive device-memory to retreive the same approximate ram capacity. specifications specification status comment device memory 1 editor's draft initial definition. ...
DisplayMediaStreamConstraints.audio - Web APIs
audio track matching the settings given in the constraints object is included in the mediastream returned by getdisplaymedia(). if no audio source is available, or the user agent doesn't support audio tracks with getdisplaymedia(), the returned mediastream has no audio track, but no error occurs. the audio track is always considered optional. example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.audio' in that specification. unknown initial definition ...
DisplayMediaStreamConstraints.video - Web APIs
to allow the user to choose source surfaces which do not directly correspond to display areas. these may include backing buffers for windows to allow capture of window contents that are hidden by other windows in front of them, or buffers containing larger documents that need to be scrolled through to see the entire contents in their windows. example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.video' in that specification. unknown initial definition ...
DisplayMediaStreamConstraints - Web APIs
e default), the display contents are included in a mediastreamtrack within the stream provided by getdisplaymedia(). optionally, a mediatrackconstraints object may be given, providing options specifying processing to be performed on the video data before adding it to the stream. a value of false is not permitted, and results in a typeerror being thrown. specifications specification status comment unknownthe definition of 'displaymediastreamconstraints' in that specification. unknown initial definition ...
Document: DOMContentLoaded event - Web APIs
living standard html5the definition of 'domcontentloaded' in that specification. recommendation ...
Document() - Web APIs
Web › API › Document › Document
living standard initial definition. ...
Document.URL - Web APIs
Web › API › Document › URL
the url read-only property of the document interface returns the document location as a string. syntax const url = document.url example javascript document.getelementbyid("url").textcontent = document.url; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'document.url' in that specification. living standard defines that the property is a usvstring instead of a domstring. ...
Document.adoptNode() - Web APIs
living standard ...
Document.all - Web APIs
Web › API › Document › all
htmlallcollection which contains every element in the document. conversion to boolean document.all is the only falsy object accessible to javascript, because it has the [[ishtmldda]] internal slot. this was done because of compatibility with older versions of internet explorer. more information about this can be found in this answer from stackoverflow. specifications specification status comment html living standardthe definition of 'all' in that specification. living standard initial definition. defined in the obsolete and legacy apis section. ...
Document.anchors - Web APIs
Web › API › Document › anchors
living standard obsoleted. document object model (dom) level 2 html specificationthe definition of 'document.anchors' in that specification. obsolete initial definition. ...
Document: animationcancel event - Web APIs
examples this code adds a listener to the animationcancel event. ...
Document: animationend event - Web APIs
e page on htmlelement: animationend. ...
Document: animationiteration event - Web APIs
on', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); the same, but using the onanimationiteration event handler property: let iterationcount = 0; document.onanimationiteration = () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }; see a live example of this event. specifications specification status comment css animations working draft initial definition ...
Document: animationstart event - Web APIs
ment: animationstart. ...
Document.applets - Web APIs
Web › API › Document › applets
oved in gecko 56 and chrome in late 2015. since then, calling document.applets in those browsers always returns an empty htmlcollection. removal is being considered in webkit and edge. syntax var nodelist = document.applets; value an htmlcollection. example // when you know the second applet is the one you want my_java_app = document.applets[1]; specifications specification status comment html living standardthe definition of 'document.applets' in that specification. living standard obsoleted. document object model (dom) level 2 html specificationthe definition of 'document.applets' in that specification. obsolete initial definition. ...
Document.body - Web APIs
Web › API › Document › body
ent.body is the element that contains the content for the document. in documents with <body> contents, returns the <body> element, and in frameset documents, this returns the outermost <frameset> element. though the body property is settable, setting a new body on a document will effectively remove all the current children of the existing <body> element. specification specification status comment html living standardthe definition of 'document.body' in that specification. living standard html 5.1the definition of 'document.body' in that specification. recommendation html5the definition of 'document.body' in that specification. recommendation ...
Document.characterSet - Web APIs
t.charset and document.inputencoding are legacy aliases for document.characterset. do not use them any more. syntax var string = document.characterset; examples <button onclick="console.log(document.characterset);"> log character encoding </button> <!-- displays document's character encoding in the dev console, such as "iso-8859-1" or "utf-8" --> specifications specification status comment domthe definition of 'characterset' in that specification. living standard initial definition. ...
Document.close() - Web APIs
Web › API › Document › close
the document.close() method finishes writing to a document, opened with document.open(). syntax document.close(); example // open a document to write to it document.open(); // write the content of the document document.write("<p>the one and only content.</p>"); // close the document document.close(); specifications specification status comment html living standardthe definition of 'document.close()' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.close()' in that specification. obsolete ...
Document.compatMode - Web APIs
living standard ...
Document.contentType - Web APIs
that the document is being rendered as. this may come from http headers or other sources of mime information, and might be affected by automatic type conversions performed by either the browser or extensions. note: this property is unaffected by <meta> elements. syntax contenttype = document.contenttype; value contenttype is a read-only property. specifications specification status comment domthe definition of 'document.contenttype' in that specification. living standard initial definition ...
Document.cookie - Web APIs
Web › API › Document › cookie
obsolete initial definition cookie prefixes draft ...
Document: copy event - Web APIs
event is the element that was the intended target of the copy action. ...
Document.createAttribute() - Web APIs
me of the attribute. return value a attr node. exceptions invalid_character_err if the parameter contains invalid characters for xml attribute. example var node = document.getelementbyid("div1"); var a = document.createattribute("my_attrib"); a.value = "newval"; node.setattributenode(a); console.log(node.getattribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.createattribute()' in that specification. living standard precised behavior with uppercase characters document object model (dom) level 3 core specificationthe definition of 'document.createattribute()' in that specification. obsolete no change. document object model (dom) level 2 core specificationthe definition of ...
Document.createCDATASection() - Web APIs
attempting it on an html document will throw not_supported_err. will throw a ns_error_dom_invalid_character_err exception if one tries to submit the closing cdata sequence ("]]>") as part of the data, so unescaped user-provided data cannot be safely used without with this method getting this exception (createtextnode() can often be used in its place). specifications specification status comment domthe definition of 'document.createcdatasection' in that specification. living standard ...
Document.createComment() - Web APIs
living standard ...
Document.createDocumentFragment() - Web APIs
living standard initial definition in the dom 1 specification. ...
Document.createElement() - Web APIs
('ul', { is : 'expanding-list' }) the new element will be given an is attribute whose value is the custom element's tag name. note: for backwards compatibility with previous versions of the custom elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name. specifications specification status comment domthe definition of 'document.createelement' in that specification. living standard ...
Document.createElementNS() - Web APIs
living standard ...
Document.createEvent() - Web APIs
ay to create event object instances. gecko supports some non-standard event object aliases, which are listed below. event module standard event object gecko also supports text event module textevent textevents keyboard event module keyboardevent keyevents basic events module event events specifications specification status comment domthe definition of 'document.createevent' in that specification. living standard ...
Document.createNSResolver() - Web APIs
he namespaces might not be known) or use prefixed name tests, and create a namespace resolver mapping the prefix to the namespace. read more on how to create a user defined namespace resolver if you wish to take the latter approach. creatensresolver was introduced in dom level 3. see also document.evaluate introduction to using xpath in javascript specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.creatensresolver' in that specification. recommendation ...
Document.createNodeIterator() - Web APIs
living standard ...
Document.createProcessingInstruction() - Web APIs
ta. example var doc = new domparser().parsefromstring('<foo />', 'application/xml'); var pi = doc.createprocessinginstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'); doc.insertbefore(pi, doc.firstchild); console.log(new xmlserializer().serializetostring(doc)); // displays: <?xml-stylesheet href="mycss.css" type="text/css"?><foo/> specifications specification status comment domthe definition of 'createprocessinginstruction()' in that specification. living standard no change dom4the definition of 'createprocessinginstruction()' in that specification. obsolete added more explicit definition of how the data parameter is validated. document object model (dom) level 3 core specificationthe definition of 'createprocess...
Document.createRange() - Web APIs
ge() method returns a new range object. syntax range = document.createrange(); range is the created range object. example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); notes once a range is created, you need to set its boundary points before you can make use of most of its methods. specifications specification status comment domthe definition of 'document.createrange' in that specification. living standard ...
Document.createTextNode() - Web APIs
living standard ...
Document.createTouch() - Web APIs
xample illustrates using the document.createtouch() method to create touch objects. in following code snippet, two touch objects are created for the target element. var target = document.getelementbyid("target"); var touch1 = document.createtouch(window, target, 1, 15, 20, 35, 40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); specifications specification status comment touch eventsthe definition of 'document.createtouch()' in that specification. recommendation initial definition. ...
Document.createTouchList() - Web APIs
recommendation initial definition. ...
Document.createTreeWalker() - Web APIs
and push them into an array. var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var nodelist = []; var currentnode = treewalker.currentnode; while(currentnode) { nodelist.push(currentnode); currentnode = treewalker.nextnode(); } specifications specification status comment domthe definition of 'document.createtreewalker' in that specification. living standard removed the expandentityreferences parameter. made the whattoshow and filter parameters optionals. document object model (dom) level 2 traversal and range specificationthe definition of 'document.createtreewalker' in that specification. obsolete initial definition ...
Document.currentScript - Web APIs
y reference the element while it's initially being processed. syntax var curscriptelement = document.currentscript; example this example checks to see if the script is being executed asynchronously: if (document.currentscript.async) { console.log("executing asynchronously"); } else { console.log("executing synchronously"); } view live examples specifications specification status comment html living standardthe definition of 'document.currentscript' in that specification. living standard initial definition ...
Document: cut event - Web APIs
this event is the element that was the intended target of the cut action. you can listen for this event on the document interface to handle it in the capture or bubbling phases. for full details on this event please see the page on the element: cut event. examples document.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Document.defaultView - Web APIs
in browsers, document.defaultview returns the window object associated with a document, or null if none is available. syntax var win = document.defaultview; this property is read-only. specifications specification status comment html living standardthe definition of 'document.defaultview' in that specification. living standard no change html5the definition of 'document.defaultview' in that specification. recommendation initial definition ...
Document.designMode - Web APIs
ff" and "inherit" is no longer supported. in ie6-10, the value is capitalized. syntax var mode = document.designmode; document.designmode = value; value a string indicating whether designmode is (or should be) set to on or off. valid values are on and off. example make an <iframe>'s document editable: iframenode.contentdocument.designmode = "on"; specifications specification status comment html living standardthe definition of 'designmode' in that specification. living standard initial definition. ...
Document.dir - Web APIs
Web › API › Document › dir
the document.dir property is a domstring representing the directionality of the text of the document, whether left to right (default) or right to left. possible values are 'rtl', right to left, and 'ltr', left to right. syntax dirstr = document.dir document.dir = dirstr specifications specification status comment html living standardthe definition of 'document.dir' in that specification. living standard initial specification ...
Document.doctype - Web APIs
Web › API › Document › doctype
living standard ...
Document.documentElement - Web APIs
living standard ...
Document.documentURI - Web APIs
the documenturi read-only property of the document interface returns the document location as a string. syntax const uri = document.documenturi example javascript document.getelementbyid("url").textcontent = document.documenturi; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'documenturi' in that specification. living standard ...
Document.domain - Web APIs
Web › API › Document › domain
lla.org". const currentdomain = document.domain; closing a window if a document, such as www.example.xxx/good.html, has the domain of "www.example.xxx", this example attempts to close the window. const baddomain = "www.example.xxx"; if (document.domain === baddomain) { // just an example: window.close() sometimes has no effect window.close(); } specifications specification status comment html living standardthe definition of 'document.domain' in that specification. living standard ...
Document: drag event - Web APIs
living standard ...
Document: dragend event - Web APIs
dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key). bubbles yes cancelable no default action varies interface dragevent event handler property ondragend examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragend' in that specification. living standard ...
Document: dragenter event - Web APIs
ted by the user as the drop target), or the <body> element. bubbles yes cancelable yes default action reject immediate user selection as potential target element. interface dragevent event handler property ondragenter examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragenter' in that specification. living standard ...
Document: dragexit event - Web APIs
the dragexit event is fired when an element is no longer the drag operation's immediate selection target. bubbles yes cancelable no default action none. interface dragevent event handler property ondragexit examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragexit' in that specification. living standard ...
Document: dragleave event - Web APIs
the dragleave event is fired when a dragged element or text selection leaves a valid drop target. bubbles yes cancelable no default action none. interface dragevent event handler property ondragleave examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragleave' in that specification. living standard ...
Document: dragover event - Web APIs
(every few hundred milliseconds). the event is fired on the drop target(s). bubbles yes cancelable yes default action reset the current drag operation to "none". interface dragevent event handler property ondragover examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragover' in that specification. living standard ...
Document: dragstart event - Web APIs
agstart event is fired when the user starts dragging an element or text selection. bubbles yes cancelable yes default action initiate the drag-and-drop operation. interface dragevent event handler property ondragstart examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'dragstart' in that specification. living standard ...
Document: drop event - Web APIs
the drop event is fired when an element or text selection is dropped on a valid drop target. bubbles yes cancelable yes default action varies interface dragevent event handler property ondrop examples see the drag event for example code or this jsfiddle demo. specifications specification status comment html living standardthe definition of 'drop event' in that specification. living standard ...
Document.embeds - Web APIs
Web › API › Document › embeds
the embeds read-only property of the document interface returns a list of the embedded <object> elements within the current document. syntax nodelist = document.embeds value an htmlcollection. specifications specification status comment html living standardthe definition of 'document.embeds' in that specification. living standard ...
Document.evaluate() - Web APIs
Web › API › Document › evaluate
types are snapshots, which are essentially lists of matched nodes. you can make changes to the document by altering snapshot nodes. modifying the document doesn't invalidate the snapshot; however, if the document is changed, the snapshot may not correspond to the current state of the document, since nodes may have moved, been changed, added, or removed. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.evaluate' in that specification. recommendation initial specification browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a...
Document.execCommand() - Web APIs
s argument is logically backwards (i.e. ...
Document.exitFullscreen() - Web APIs
living standard initial definition ...
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. syntax document.exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification. candidate recommendation extend the document interface ...
Document.featurePolicy - Web APIs
...
Document.fonts - Web APIs
Web › API › Document › fonts
the fonts property of the document interface returns the fontfaceset interface of the document. syntax let fontfaceset = document.fonts; value the returned value is the fontfaceset interface of the document. the fontfaceset interface is useful for loading new fonts, checking the status of previously loaded fonts etc. examples doing operation after all fonts are loaded document.fonts.ready.then(function() { // any operation that needs to be done only after all the fonts // have finished loading can go here. }); specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification. working draft initial definition browser compatibility the compatibility table on this page is generate...
Document.forms - Web APIs
Web › API › Document › forms
living standard document object model (dom) level 2 html specificationthe definition of 'document.forms' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like t...
Document.fullscreen - Web APIs
living standard initial definition (as an obsolete property). ...
Document.fullscreenEnabled - Web APIs
living standard initial definition ...
Document: fullscreenchange event - Web APIs
that // is in fullscreen mode if there is one. ...
Document: fullscreenerror event - Web APIs
hat element. ...
Document.getAnimations() - Web APIs
objects, each representing one animation currently associated with elements which are descendants of the document on which it's called. examples the following code snippet will slow down all animations on a page by halving their animation.playbackrate. document.getanimations().foreach( function (animation) { animation.playbackrate *= .5; } ); specifications specification status comment web animationsthe definition of 'document.getanimations()' in that specification. working draft ...
Document.getElementById() - Web APIs
entation must have information that says which attributes are of type id. attributes with the name "id" are not of type id unless so defined in the document's dtd. the id attribute is defined to be of id type in the common cases of xhtml, xul, and other. implementations that do not know whether attributes are of type id or not are expected to return null. specification specification status comment document object model (dom) level 1 specificationthe definition of 'getelementbyid' in that specification. obsolete initial definition for the interface document object model (dom) level 2 core specificationthe definition of 'getelementbyid' in that specification. obsolete supersede dom 1 document object model (dom) level 3 core specificationt...
Document.getElementsByClassName() - Web APIs
living standard ...
Document.getElementsByName() - Web APIs
ns elements that have an id attribute with the specified value. be careful not to use the same string as both a name and an id. the getelementsbyname method works differently in ie. there, getelementsbyname() does not return all elements which may not have a name attribute (such as <span>). both ie and edge return an htmlcollection, not a nodelist specifications specification status comment html living standardthe definition of 'document.getelementsbyname()' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.getelementsbyname()' in that specification. obsolete initial definition ...
Document.getElementsByTagName() - Web APIs
) lower-cases its argument before proceeding. this is undesirable when trying to match camelcase svg elements in a subtree in an html document. document.getelementsbytagnamens() is useful in that case. see also bug 499656. document.getelementsbytagname() is similar to element.getelementsbytagname(), except that its search encompasses the whole document. specifications specification status comment domthe definition of 'document.getelementsbytagname' in that specification. living standard ...
Document.getElementsByTagNameNS() - Web APIs
living standard ...
Document: gotpointercapture event - Web APIs
(event) => { para.setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); document.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
Document.hasFocus() - Web APIs
Web › API › Document › hasFocus
living standard initial definition ...
Document.head - Web APIs
Web › API › Document › head
>example: using document.head</title> </head> <script> var thehead = document.head; console.log(thehead.id); // "my-document-head"; console.log( thehead === document.queryselector("head") ); // true </script> notes document.head is read-only. trying to assign a value to this property will fail silently or, in strict mode, throws a typeerror . specifications specification status comment html 5.1the definition of 'document.head' in that specification. recommendation html5the definition of 'document.head' in that specification. recommendation html living standardthe definition of 'document.head' in that specification. living standard initial definition. ...
Document.hidden - Web APIs
Web › API › Document › hidden
the document.hidden read-only property returns a boolean value indicating if the page is considered hidden or not. syntax var boolean = document.hidden examples document.addeventlistener("visibilitychange", function() { console.log( document.hidden ); // modify behavior... }); specifications specification status comment page visibility (second edition)the definition of 'document.hidden' in that specification. recommendation initial definition ...
Document.images - Web APIs
Web › API › Document › images
llection. the following are equivalent: firstimage = imagecollection.item(0); firstimage = imagecollection[0]; example this example looks through the list of images and finds one whose name is "banner.gif". var ilist = document.images; for(var i = 0; i < ilist.length; i++) { if(ilist[i].src == 'banner.gif') { // found the banner } } specifications specification status comment html living standardthe definition of 'document.images' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.images' in that specification. obsolete initial definition. ...
Document.implementation - Web APIs
r (see example above and what does your user agent claim to support?). if available, other domimplementation methods provide services for controlling things outside of a single document. for example, the domimplementation interface includes a createdocumenttype method with which dtds can be created for one or more documents managed by the implementation. specifications specification status comment domthe definition of 'document.implementation' in that specification. living standard ...
Document.importNode() - Web APIs
e current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode(). best practice: although firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility. for more on the node.ownerdocument issues, see the w3c dom faq. specifications specification status comment domthe definition of 'document.importnode()' in that specification. living standard document object model (dom) level 2 core specificationthe definition of 'document.importnode()' in that specification. obsolete initial definition ...
Document: keydown event - Web APIs
eydown example this example logs the keyboardevent.code value whenever you press down a key. <p>focus the iframe first (e.g. by clicking in it), then try pressing some keys.</p> <p id="log"></p> document.addeventlistener('keydown', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeydown equivalent document.onkeydown = logkey; specifications specification status ui events working draft ...
Document: keypress event - Web APIs
nt.code value whenever you press a key. ...
Document: keyup event - Web APIs
ver you release a key. ...
Document.lastModified - Web APIs
s been changed!"); } } note: webkit returns the time string in utc; gecko and internet explorer return a time in the local timezone. (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. specifications specification status comment html living standardthe definition of 'document.lastmodified' in that specification. living standard ...
Document.links - Web APIs
Web › API › Document › links
alue for the href attribute. syntax nodelist = document.links value an htmlcollection. example var links = document.links; for(var i = 0; i < links.length; i++) { var linkhref = document.createtextnode(links[i].href); var linebreak = document.createelement("br"); document.body.appendchild(linkhref); document.body.appendchild(linebreak); } specifications specification status comment html living standardthe definition of 'document.links' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.links' in that specification. obsolete initial definition ...
Document.location - Web APIs
Web › API › Document › location
t.url property can also be used. if the current document is not in a browsing context, the returned value is null. syntax locationobj = document.location document.location = 'http://www.mozilla.org' // equivalent to document.location.href = 'http://www.mozilla.org' examples console.log(document.location); // prints a location object to the console specifications specification status comment html living standardthe definition of 'document.location' in that specification. living standard no change from html5. html5the definition of 'document.location' in that specification. recommendation initial definition. ...
Document: lostpointercapture event - Web APIs
) => { para.setpointercapture(event.pointerid); }); the same example, but using the onlostpointercapture event handler property: const para = document.queryselector('p'); document.onlostpointercapture = () => { console.log('i\'ve been released!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
Document.onfullscreenchange - Web APIs
of full-screen mode. otherwise, the specified element is about to take over the screen. example document.onfullscreenchange = function ( event ) { console.log("full screen change") }; document.documentelement.onclick = function () { // requestfullscreen() must be in an event handler or it will fail document.documentelement.requestfullscreen(); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification. living standard initial definition. ...
Document.onfullscreenerror - Web APIs
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.onfullscreenerror = function ( event ) { displaywarning("unable to switch into full-screen mode."); }; //.... document.documentelement.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification. living standard initial definition. ...
Document.onvisibilitychange - Web APIs
andler that is called when a visibilitychange event reaches this object. syntax obj.onvisibilitychange = function; function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration. example document.onvisibilitychange = function() { console.log("visibility of page has changed!"); }; specifications specification status comment page visibility (second edition)the definition of 'onvisibilitychange' in that specification. recommendation initial definition. ...
Document.open() - Web APIs
Web › API › Document › open
of "replace") specified that the history entry for the new document would replace the current history entry of the document being written to. this form is now obsolete; it won't throw an error, but instead just forwards to document.open() (i.e. is the equivalent of just running it with no arguments). the history-replacement behavior now always happens. specifications specification status comment html living standardthe definition of 'document.open()' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.open()' in that specification. obsolete ...
Document: paste event - Web APIs
nt is the element that was the intended target of the paste action. ...
Document.plugins - Web APIs
Web › API › Document › plugins
living standard ...
Document: pointercancel event - Web APIs
event is fired, the browser will also send pointerout followed by pointerleave. examples using addeventlistener(): document.addeventlistener('pointercancel', (event) => { console.log('pointer event cancelled') }); using the onpointercancel event handler property: document.onpointercancel = (event) => { console.log('pointer event cancelled') }; specifications specification status pointer events obsolete ...
Document: pointerdown event - Web APIs
yes interface pointerevent event handler property onpointerdown examples using addeventlistener(): document.addeventlistener('pointerdown', (event) => { console.log('pointer down event'); }); using the onpointerdown event handler property: document.onpointerdown = (event) => { console.log('pointer down event'); }; specifications specification status pointer events obsolete ...
Document: pointerenter event - Web APIs
interface pointerevent event handler property onpointerenter examples using addeventlistener(): document.addeventlistener('pointerenter', (event) => { console.log('pointer entered element'); }); using the onpointerenter event handler property: document.onpointerenter = (event) => { console.log('pointer entered element'); }; specifications specification status pointer events obsolete ...
Document: pointerleave event - Web APIs
interface pointerevent event handler property onpointerleave examples using addeventlistener(): document.addeventlistener('pointerleave', (event) => { console.log('pointer left element'); }); using the onpointerleave event handler property: document.onpointerleave = (event) => { console.log('pointer left element'); }; specifications specification status pointer events obsolete ...
Document: pointerlockchange event - Web APIs
ace event event handler property onpointerlockchange examples using addeventlistener(): document.addeventlistener('pointerlockchange', (event) => { console.log('pointer lock changed'); }); using the onpointerlockchange event handler property: document.onpointerlockchange = (event) => { console.log('pointer lock changed'); }; specifications specification status pointer lock candidate recommendation ...
Document: pointerlockerror event - Web APIs
rty onpointerlockerror examples using addeventlistener(): const para = document.queryselector('p'); document.addeventlistener('pointerlockerror', (event) => { console.log('error locking pointer'); }); using the onpointerlockerror event handler property: document.onpointerlockerror = (event) => { console.log('error locking pointer'); }; specifications specification status pointer lock candidate recommendation ...
Document: pointermove event - Web APIs
ncelable yes interface pointerevent event handler property onpointermove examples using addeventlistener(): document.addeventlistener('pointermove', (event) => { console.log('pointer moved'); }); using the onpointermove event handler property: document.onpointermove = (event) => { console.log('pointer moved'); }; specifications specification status pointer events obsolete ...
Document: pointerout event - Web APIs
able yes interface pointerevent event handler property onpointerout examples using addeventlistener(): document.addeventlistener('pointerout', (event) => { console.log('pointer moved out'); }); using the onpointerout event handler property: document.onpointerout = (event) => { console.log('pointer moved out'); }; specifications specification status pointer events obsolete ...
Document: pointerover event - Web APIs
le yes interface pointerevent event handler property onpointerover examples using addeventlistener(): document.addeventlistener('pointerover', (event) => { console.log('pointer moved in'); }); using the onpointerover event handler property: document.onpointerover = (event) => { console.log('pointer moved in'); }; specifications specification status pointer events obsolete ...
Document: pointerup event - Web APIs
es cancelable yes interface pointerevent event handler property onpointerup examples using addeventlistener(): document.addeventlistener('pointerup', (event) => { console.log('pointer up'); }); using the onpointerup event handler property: document.onpointerup = (event) => { console.log('pointer up'); }; specifications specification status pointer events obsolete ...
Document.queryCommandEnabled() - Web APIs
en called from a user-initiated thread. ...
Document.queryCommandState() - Web APIs
switch (state) { case true: alert("the bold formatting will be removed from the selected text."); break; case false: alert("the selected text will be displayed in bold."); break; case null: alert("the state of the 'bold' command is indeterminable."); break; } document.execcommand('bold'); } result specifications specification status comment execcommand ...
Document.queryCommandSupported() - Web APIs
rns a boolean which is true if the command is supported and false if the command isn't. notes the 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action [1] example var flg = document.querycommandsupported("selectall"); if(flg) { // ...do something } specifications specification status comment execcommand ...
Document.querySelector() - Web APIs
living standard ...
Document.querySelectorAll() - Web APIs
y default, queryselectorall() only verifies that the last element in the selector is within the search scope. the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification. living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification. obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification. obsolete initial definition sele...
Document.readyState - Web APIs
living standard html 5.1the definition of 'document readiness' in that specification. recommendation html5the definition of 'document readiness' in that specification. recommendation initial specification. ...
Document: readystatechange event - Web APIs
living standard ...
Document.referrer - Web APIs
Web › API › Document › referrer
e user navigated to the page directly (not through a link, but, for example, by using a bookmark). because this property returns only a string, it doesn't give you document object model (dom) access to the referring page. inside an <iframe>, the document.referrer will initially be set to the same value as the href of the parent window's window.location. specifications specification status comment html living standardthe definition of 'document.referrer' in that specification. living standard ...
Document.rootElement - Web APIs
oot element of the document if it is an <svg> element, otherwise null. it is deprecated in favor of document.documentelement, which returns the root element for all documents. syntax const element = document.rootelement notes if the document is a non-empty svg document, then the rootelement will be an svgsvgelement, identical to the documentelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdocument.rootelement' in that specification. candidate recommendation deprecated scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdocument.rootelement' in that specification. recommendation initial definition ...
Document.scripts - Web APIs
Web › API › Document › scripts
the returned object is an htmlcollection. syntax var scriptlist = document.scripts; value an htmlcollection. you can use this just like an array to get all the elements in the list. example this example looks to see if the page has any <script> elements. let scripts = document.scripts; if (scripts.length) { alert('this page has scripts!'); } specifications specification status comment html living standardthe definition of 'document.scripts' in that specification. living standard ...
Document: scroll event - Web APIs
mething 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. specifications specification status css object model (cssom) view module working draft ...
Document.scrollingElement - Web APIs
, this is the root element of the document, document.documentelement. when in quirks mode, the scrollingelement attribute returns the html body element if it exists and is not potentially scrollable, otherwise it returns null. syntax var element = document.scrollingelement; example var scrollelm = document.scrollingelement; scrollelm.scrolltop = 0; specifications specification status comment css object model (cssom) view modulethe definition of 'scrollingelement' in that specification. working draft initial definition ...
Document: selectionchange event - Web APIs
working draft initial definition. ...
Document: selectstart event - Web APIs
working draft initial definition. ...
Document.timeline - Web APIs
Web › API › Document › timeline
ed delta known as the origin time. prior to establishing the navigationstart moment, the document timeline is inactive. note: a document timeline that is associated with a non-active document is also considered to be inactive. syntax var pagetimeline = document.timeline; var thismoment = pagetimeline.currenttime; value a documenttimeline object. specifications specification status comment web animationsthe definition of 'document.timeline' in that specification. working draft editor's draft. ...
Document.title - Web APIs
Web › API › Document › title
initial value of document.title is the text content of the <title> element. for xul it's the value of the title attribute of the <xul:window> or other top-level xul element. in xul, accessing document.title before the document is fully loaded has undefined behavior: document.title may return an empty string and setting document.title may have no effect. specifications specification status comment html living standardthe definition of 'document.title' in that specification. living standard ...
Document: touchcancel event - Web APIs
more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created). bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Document: touchend event - Web APIs
the touchend event fires when one or more touch points are removed from the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Document: touchmove event - Web APIs
the touchmove event is fired when one or more touch points are moved along the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Document: touchstart event - Web APIs
the touchstart event is fired when one or more touch points are placed on the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Document: transitioncancel event - Web APIs
working draft initial definition. ...
Document: transitionend event - Web APIs
sitionend. examples this code adds a listener to the transitionend event: document.addeventlistener('transitionend', () => { console.log('transition ended'); }); the same, but using the ontransitionend property instead of addeventlistener(): document.ontransitionend = () => { console.log('transition ended'); }; see a live example of this event. specifications specification status comment css transitionsthe definition of 'transitionend' in that specification. working draft initial definition. ...
Document: transitionrun event - Web APIs
working draft initial definition. ...
Document: transitionstart event - Web APIs
working draft initial definition. ...
Document.visibilityState - Web APIs
this can be to prevent the download of some assets when the document is solely prerendered, or stop some activities when the document is in the background or minimized. syntax var string = document.visibilitystate examples document.addeventlistener("visibilitychange", function() { console.log( document.visibilitystate ); // modify behavior... }); specifications specification status comment page visibility (second edition)the definition of 'document.visibilitystate' in that specification. recommendation initial definition. ...
Document: wheel event - Web APIs
working draft ...
Document.write() - Web APIs
Web › API › Document › write
d" in the error console. note: in edge only, calling document.write() more than once in an <iframe> causes the error "script70: permission denied". note: starting with version 55, chrome will not execute <script> elements injected via document.write() when specific conditions are met. for more information, refer to intervening against document.write(). specifications specification status comment html living standardthe definition of 'document.write(...)' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.write(...)' in that specification. obsolete ...
Document.writeln() - Web APIs
Web › API › Document › writeln
riteln (like document.write) does not work in xhtml documents (you'll get a "operation is not supported" (ns_error_dom_not_supported_err) error on the error console). this is the case if opening a local file with a .xhtml file extension or for any document served with an application/xhtml+xml mime type. more information is available in the w3c xhtml faq. specifications specification status comment html living standardthe definition of 'document.writeln()' in that specification. living standard document object model (dom) level 2 html specificationthe definition of 'document.writeln()' in that specification. obsolete ...
DocumentFragment() - Web APIs
the documentfragment() constructor returns a new, empty documentfragment object . syntax fragment = new documentfragment() example let fragment = new documentfragment(); specification specification status comment domthe definition of 'documentfragment()' in that specification. living standard initial definition. ...
DocumentFragment.querySelector() - Web APIs
obsolete no change from selectors api level 1 selectors api level 1the definition of 'documentfragment.queryselector' in that specification. obsolete initial definition. browser compatibility the compatibility table in this page is generated from structur...
DocumentFragment.querySelectorAll() - Web APIs
ementlist = documentfragment.queryselectorall(selectors); parameters selectors is a domstring containing one or more css selectors separated by commas. examples this example returns a list of all div elements within the documentfragment with a class of either "note" or "alert": var matches = documentfrag.queryselectorall("div.note, div.alert"); specifications specification status comment selectors api level 1the definition of 'documentfragment.queryselectorall' in that specification. obsolete initial definition. ...
DocumentFragment - Web APIs
ctor. example html <ul id="list"></ul> javascript var list = document.queryselector('#list') var fruits = ['apple', 'orange', 'banana', 'melon'] var fragment = new documentfragment() fruits.foreach(function (fruit) { var li = document.createelement('li') li.innerhtml = fruit fragment.appendchild(li) }) list.appendchild(fragment) result specifications specification status comment domthe definition of 'documentfragment' in that specification. living standard added the constructor and the implementation of parentnode. selectors api level 1the definition of 'documentfragment' in that specification. obsolete added the queryselector() and queryselectorall() methods. document object model (dom) level 3 core specificationthe ...
DocumentOrShadowRoot.activeElement - Web APIs
living standard ...
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
working draft initial definition. ...
DocumentOrShadowRoot.elementFromPoint() - Web APIs
olor specified by the newcolor parameter. html <p id="para1">some text here</p> <button onclick="changecolor('blue');">blue</button> <button onclick="changecolor('red');">red</button> the html provides the paragraph whose color will be affected, as well as two buttons: one to change the color to blue, and another to change the color to red. result specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification. obsolete css object model (cssom) view modulethe definition of 'elementsfrompoint()' in that specification. working draft ...
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
obsolete css object model (cssom) view modulethe definition of 'elementsfrompoint()' in that specification. working draft ...
DocumentOrShadowRoot.fullscreenElement - Web APIs
living standard initial definition ...
DocumentOrShadowRoot.getSelection() - Web APIs
selection(), which works identically to document.getselection(). it is worth noting that currently getselection() doesn't work on the content of <input> elements in firefox. htmlinputelement.setselectionrange()) could be used to work around this. notice also the difference between selection and focus. document.activeelement returns the focused element. specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinterne...
DocumentOrShadowRoot.pointerLockElement - Web APIs
the pointerlockelement property of the document and shadowroot interfaces provides the element set as the target for mouse events while the pointer is locked. it is null if lock is pending, pointer is unlocked, or the target is in another document. syntax var element = document.pointerlockelement; return value an element or null. specifications specification status comment pointer lockthe definition of 'pointerlockelement' in that specification. candidate recommendation extend the document interface ...
DocumentOrShadowRoot.styleSheets - Web APIs
obsolete initial definition. ...
DocumentOrShadowRoot - Web APIs
. documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret. documentorshadowroot.nodefrompoint() returns the topmost node at the specified coordinates. documentorshadowroot.nodesfrompoint() returns an array of all nodes at the specified coordinates. specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification. obsolete implementation in shadow dom. domthe definition of 'documentorshadowroot' in that specification. living standard initial definition. ...
DocumentTimeline.DocumentTimeline() - Web APIs
working draft editor's draft. ...
DocumentTimeline - Web APIs
working draft editor's draft. ...
DocumentType - Web APIs
ly a domstring, eg "-//w3c//dtd html 4.01//en", empty string for html5. documenttype.systemid read only a domstring, eg "http://www.w3.org/tr/html4/strict.dtd", empty string for html5. methods inherits methods from its parent, node, and implements the childnode interface. childnode.remove() removes the object from its parent children list. specifications specification status comment domthe definition of 'documenttype' in that specification. living standard added implemention of the childnode interface. removed the internalsubset, entities, and notation properties. document object model (dom) level 3 core specificationthe definition of 'documenttype' in that specification. obsolete no change from document object model (dom) level 2 ...
Document Object Model (DOM) - Web APIs
es getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgtransformable svgunittypes svguseelementshadowroot svgurireference svgviewspec svgzoomandpan svgzoomevent specifications specification status comment dom living standard ...
DoubleRange - Web APIs
s well. properties max a floating-point value specifying the largest permissible value of the property it describes. min a floating-point value specifying the smallest permissible value of the property it describes. the specified min and/or and max values are required. if no match can be found that is within the given range, an error will occur. specifications specification status comment media capture and streamsthe definition of 'doublerange' in that specification. candidate recommendation initial definition ...
DragEvent() - Web APIs
ventinit); arguments type is a domstring representing the name of the event (see dragevent event types). drageventinitoptional is a drageventinit dictionary, having the following fields: "datatransfer", optional and defaults to "null". the type is datatransfer. the drageventinit dictionary inherits from the mouseeventinit dictionary. specifications specification status comment html living standardthe definition of 'dragevent' in that specification. living standard html 5.1the definition of 'dragevent' in that specification. recommendation initial definition ...
DragEvent.dataTransfer - Web APIs
the drag event's data. example this example illustrates accessing the drag and drop data within the dragend event handler. function processdata(d) { // process the data ... } dragtarget.addeventlistener("dragend", function(ev) { // call the drag and drop data processor if (ev.datatransfer !== null) processdata(ev.datatransfer); }, false); specifications specification status comment html living standardthe definition of 'dragevent.datatransfer' in that specification. living standard html 5.1the definition of 'dragevent.datatransfer' in that specification. recommendation initial definition ...
DragEvent - Web APIs
Web › API › DragEvent
dlers.ondragover a global event handler for the dragover event. globaleventhandlers.ondragstart a global event handler for the dragstart event. globaleventhandlers.ondrop a global event handler for the drop event. example an example of each property, constructor, event type and global event handlers is included in their respective reference page. specifications specification status comment html living standardthe definition of 'dragevent' in that specification. living standard html 5.1the definition of 'dragevent' in that specification. recommendation initial definition ...
DynamicsCompressorNode() - Web APIs
nominal range is [1, 20]. release: the amount of time (in seconds) to increase the gain by 10db. its default value is 0.250. this parameter is k-rate. its nominal range is [0, 1]. threshold: the decibel value above which the compression will start taking effect. its default value is -24. this parameter is k-rate. its nominal range is [-100, 0]. specifications specification status comment web audio apithe definition of 'dynamicscompressornode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefi...
DynamicsCompressorNode.attack - Web APIs
working draft ...
DynamicsCompressorNode.knee - Web APIs
working draft ...
DynamicsCompressorNode.ratio - Web APIs
working draft ...
DynamicsCompressorNode.reduction - Web APIs
in db, or 0 (no gain reduction) if no signal is fed into the dynamicscompressornode. the range of this value is between -20 and 0 (in db). syntax var myreduction = compressornodeinstance.reduction; value a float. example var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); var myreduction = compressor.reduction; specifications specification status comment web audio apithe definition of 'reduction' in that specification. working draft ...
DynamicsCompressorNode.release - Web APIs
working draft ...
DynamicsCompressorNode.threshold - Web APIs
working draft ...
DynamicsCompressorNode - Web APIs
working draft ...
EXT_blend_minmax - Web APIs
ext.min_ext produces the minimum color components of the source and destination colors. ext.max_ext produces the maximum color components of the source and destination colors. examples var ext = gl.getextension('ext_blend_minmax'); gl.blendequation(ext.min_ext); gl.blendequation(ext.max_ext); gl.blendequationseparate(ext.min_ext, ext.max_ext); specifications specification status comment ext_blend_minmaxthe definition of 'ext_blend_minmax' in that specification. recommendation initial definition. ...
EXT_color_buffer_float - Web APIs
erbufferstorage() method now accepts these formats. framebuffers with attached textures of these formats may now be framebuffer_complete. examples gl must be a webgl2renderingcontext. this extension does not work in webgl 1 contexts. var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification. recommendation initial definition for webgl. ...
EXT_color_buffer_half_float - Web APIs
recommendation initial definition. ...
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
query); parameters target a glenum specifying the target of the time query. must be ext.time_elapsed_ext. query a webglquery object for which to start the time querying. return value none. examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); ext.beginqueryext(ext.time_elapsed_ext, query); // ... specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.createQueryEXT() - Web APIs
atequeryext() method of the webgl api creates and initializes webglquery objects, which track the time needed to fully complete a set of gl commands. syntax webgltimerqueryext ext.createqueryext(); parameters none. return value a webglquery object. examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.deleteQueryEXT() - Web APIs
e ext_disjoint_timer_query.deletequeryext() method of the webgl api deletes a given webglquery object. syntax void ext.deletequeryext(query); parameters query a webglquery object to delete. return value none. examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); // ... ext.deletequeryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.endQueryEXT() - Web APIs
ax void ext.endqueryext(target); parameters target a glenum specifying the target of the time query. must be ext.time_elapsed_ext. return value none. examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); ext.beginqueryext(ext.time_elapsed_ext, query); // ... ext.endqueryext(ext.time_elapsed_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
t indicating the number of bits used to hold the query result for the given target. examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
working draft initial definition. ...
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
webglquery object. syntax glboolean ext.isqueryext(query); parameters query a webglquery object to test. return value a glboolean indicating whether the given object is a webglquery object (true) or not (false). examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); // ... ext.isqueryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
et a glenum specifying the target of the time query. must be ext.timestamp_ext. return value none. examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); var endquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); // ... ext.querycounterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_disjoint_timer_query - Web APIs
mer stops when all commands prior to endqueryext have been fully executed. ext.querycounterext() records the current time into the corresponding query object. ext.getqueryext() returns information about a query target. ext.getqueryobjectext() return the state of a query object. examples var ext = gl.getextension('ext_disjoint_timer_query'); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification. working draft initial definition. ...
EXT_float_blend - Web APIs
re_2d, 0, gl.rgba32f, 1, 1, 0, gl.rgba, gl.float, null); const fb = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, fb); gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, tex, 0); // enable blending gl.enable(gl.blend); gl.drawarrays(gl.points, 0, 1); // won't throw gl.invalid_operation with the extension enabled specifications specification status ext_float_blend draft ...
EXT_frag_depth - Web APIs
it requires glsl #version 300 es. examples enable the extension: gl.getextension('ext_frag_depth'); now the output variable gl_fragdepthext is available to set a depth value of a fragment from within the fragment shader: <script type="x-shader/x-fragment"> void main() { gl_fragcolor = vec4(1.0, 0.0, 1.0, 1.0); gl_fragdepthext = 0.5; } </script> specifications specification status comment ext_frag_depththe definition of 'ext_frag_depth' in that specification. recommendation initial definition. ...
EXT_sRGB - Web APIs
Web › API › EXT sRGB
ext.framebuffer_attachment_color_encoding_ext returns the framebuffer color encoding (gl.linear or ext.srgb_ext). examples var ext = gl.getextension('ext_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, ext.srgb_ext, 512, 512, 0, ext.srgb_ext, gl.unsigned_byte, image); specifications specification status comment ext_srgbthe definition of 'ext_srgb' in that specification. recommendation initial definition. ...
EXT_shader_texture_lod - Web APIs
recommendation initial definition. ...
EXT_texture_compression_bptc - Web APIs
bits of rgb data. ...
EXT_texture_compression_rgtc - Web APIs
pressed signed red image data followed by 64 bits of compressed signed green image data. see also bc5 signed. examples var ext = gl.getextension('ext_texture_compression_rgtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_red_rgtc1_ext, 128, 128, 0, texturedata); specifications specification status ext_texture_compression_rgtc community approved ...
EXT_texture_filter_anisotropic - Web APIs
recommendation initial definition. ...
EcKeyGenParams - Web APIs
ecdh. properties name a domstring. this should be set to ecdsa or ecdh, depending on the algorithm you want to use. namedcurve a domstring representing the name of the elliptic curve to use. this may be any of the following names for nist-approved curves: p-256 p-384 p-521 examples see the examples for subtlecrypto.generatekey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeygenparams' in that specification. recommendation ...
EcKeyImportParams - Web APIs
r ecdh. properties name a domstring. this should be set to ecdsa or ecdh, depending on the algorithm you want to use. namedcurve a domstring representing the name of the elliptic curve to use. this may be any of the following names for nist-approved curves: p-256 p-384 p-521 examples see the examples for subtlecrypto.importkey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeyimportparams' in that specification. recommendation ...
EcdhKeyDeriveParams - Web APIs
recommendation ...
EcdsaParams - Web APIs
one of the following: sha-256: selects the sha-256 algorithm. sha-384: selects the sha-384 algorithm. sha-512: selects the sha-512 algorithm. warning: sha-1 is also supported here but the sha-1 algorithm is considered vulnerable and should no longer be used. examples see the examples for subtlecrypto.sign() or subtlecrypto.verify(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdsaparams' in that specification. recommendation ...
EffectTiming.delay - Web APIs
working draft editor's draft. ...
EffectTiming.direction - Web APIs
working draft editor's draft. ...
EffectTiming.duration - Web APIs
working draft editor's draft. ...
EffectTiming.easing - Web APIs
working draft editor's draft. ...
EffectTiming.endDelay - Web APIs
working draft editor's draft. ...
EffectTiming.fill - Web APIs
Web › API › EffectTiming › fill
working draft editor's draft. ...
EffectTiming.iterationStart - Web APIs
its first iteration or loop. meanwhile, a value of 1.2 means the animation will begin playback 20% of the way through its second iteration, and so forth. it's currently undefined what happens if you specify a value of iterationstart which is greater than the value of animationeffecttimingproperties.iterations. see issue 170 in the web animations api specification's issue tracker for details and status of any changes to the specification in this regard. specifications specification status comment web animationsthe definition of 'iterationstart' in that specification. working draft editor's draft. ...
EffectTiming.iterations - Web APIs
working draft editor's draft. ...
EffectTiming - Web APIs
working draft initial definition ...
Element: DOMActivate event - Web APIs
working draft ...
Element.animate() - Web APIs
Web › API › Element › animate
e for an animation only (i.e. a single keyframe), and the browser will infer the other end of the animation if it is able to. for example, consider this simple animation — the keyframe object looks like so: let rotate360 = [ { transform: 'rotate(360deg)' } ]; we have only specified the end state of the animation, and the beginning state is implied. specifications specification status comment web animations level 2the definition of 'keyframeanimationoptions.iterationcomposite' in that specification. draft added the iterationcomposite option. web animationsthe definition of 'animate()' in that specification. working draft initial definition ...
Element.attachShadow() - Web APIs
living standard ...
Element.attributes - Web APIs
living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.attributes' in that specification. obsolete no change from document object model (dom) level 2 core spec...
Element: auxclick event - Web APIs
working draft ...
Element: blur event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element.classList - Web APIs
Web › API › Element › classList
operty on all elements to allow garbage collection and boost performance. in all polyfilled browsers (ie6-9), an additional element[" uclp"] property is added to element to ensure standards compliant prototyping, and a domtokenlist[" ucl"] property is added to each element["classlist"] object to ensure that the domtokenlist is bounded to its own element. specifications specification status comment domthe definition of 'element.classlist' in that specification. living standard initial definition dom4the definition of 'element.classlist' in that specification. obsolete ...
Element.className - Web APIs
Web › API › Element › className
of an element using element.getattribute and element.setattribute if you are dealing with svg elements. however, take into account that element.getattribute returns null instead of "" if the element has an empty class attribute. elm.setattribute('class', elm.getattribute('class')) the class is an html attribute, while the classname is a dom property. specifications specification status comment domthe definition of 'element.classname' in that specification. living standard dom4the definition of 'element.classname' in that specification. obsolete document object model (dom) level 2 html specificationthe definition of 'element.classname' in that specification. obsolete initial definition ...
Element: click event - Web APIs
s on a <button>. html <button>click</button> javascript const button = document.queryselector('button'); button.addeventlistener('click', event => { button.innerhtml = `click count: ${event.detail}`; }); result try making rapid, repeated clicks on the button to increase the click count. if you take a break between clicks, the count will reset. specifications specification status ui events working draft document object model (dom) level 3 events specificationthe definition of 'click' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'click' in that specification. obsolete ...
Element.clientHeight - Web APIs
pecial case of clientheight. note: this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). syntax var intelemclientheight = element.clientheight; intelemclientheight is an integer corresponding to the clientheight of element in pixels. the clientheight property is read–only. example specification specification status comment css object model (cssom) view modulethe definition of 'clientheight' in that specification. working draft notes clientheight is a property introduced in the internet explorer object model. ...
Element.clientLeft - Web APIs
mco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'clientleft' in that specification. working draft ...
Element.clientTop - Web APIs
Web › API › Element › clientTop
lor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom notes clienttop was first introduced in the ms ie dhtml object model. specifications specification status comment css object model (cssom) view modulethe definition of 'clienttop' in that specification. working draft ...
Element.clientWidth - Web APIs
is a special case of clientwidth. note: this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). syntax var intelemclientwidth = element.clientwidth; intelemclientwidth is an integer corresponding to the clientwidth of element in pixels. the clientwidth property is read–only. example specification specification status comment css object model (cssom) view modulethe definition of 'clientwidth' in that specification. working draft notes clientwidth was first introduced in the ms ie dhtml object model. ...
Element.closest() - Web APIs
Web › API › Element › closest
living standard initial definition. ...
Element: compositionend event - Web APIs
'click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionstart event - Web APIs
'click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionupdate event - Web APIs
'click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element.computedStyleMap() - Web APIs
ist.appendchild(cssvalue); } in browsers that support computedstylemap(), you'll see a list of all the css properties and values. in other browsers you'll just see a link. did you realize how many default css properties a link had? update the 'a' to the 'p', and you'll notice a difference in the margin-top and margin-bottom default computed values. specifications specification status comment css typed om level 1the definition of 'computedstylemap()' in that specification. working draft initial definition. ...
Element: contextmenu event - Web APIs
graph will show the standard context menu offered by your browser. html <p id="nocontextmenu">the context menu has been disabled on this paragraph.</p> <p>but it has not been disabled on this one.</p> javascript nocontext = document.getelementbyid('nocontextmenu'); nocontext.addeventlistener('contextmenu', e => { e.preventdefault(); }); result specifications specification status comment html living standardthe definition of 'contextmenu' in that specification. living standard ...
Element: copy event - Web APIs
.5rem; padding: .5rem; height: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('copy', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element: cut event - Web APIs
Web › API › Element › cut event
ht: 1rem; background-color: #e9eef1; } js const source = document.queryselector('div.source'); source.addeventlistener('cut', (event) => { const selection = document.getselection(); event.clipboarddata.setdata('text/plain', selection.tostring().touppercase()); selection.deletefromdocument(); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element: dblclick event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'dblclick' in that specification. obsolete ...
Element: error event - Web APIs
st badimg = document.queryselector('.bad-img'); badimg.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: loading image\n`; console.log(event) }); const imgerror = document.queryselector('#img-error'); imgerror.addeventlistener('click', () => { badimg.setattribute('src', 'i-dont-exist'); }); result specifications specification status ui events working draft ...
Element: focus event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element: focusin event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element: focusout event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element: fullscreenerror event - Web APIs
at element. ...
Element.getAnimations() - Web APIs
is called, or one of its descendant elements if { subtree: true } is specified. examples the following code snippet will wait for all animations on elem and its descendants to finish before removing the element from the document. promise.all( elem.getanimations({ subtree: true }) .map(animation => animation.finished) ).then(() => elem.remove()); specifications specification status comment web animationsthe definition of 'animatable.getanimations()' in that specification. working draft editor's draft. ...
Element.getAttribute() - Web APIs
he specified element. retrieving nonce values for security reasons, csp nonces from non-script sources, such as css selectors, and .getattribute("nonce") calls are hidden. let nonce = script.getattribute('nonce'); // returns empty string instead of retrieving the nonce from the content attribute, use the nonce property: let nonce = script.nonce; specifications specification status comment domthe definition of 'getattribute()' in that specification. living standard ...
Element.getAttributeNS() - Web APIs
living standard document object model (dom) level 3 core specificationthe definition of 'element.getattributens()' in that specification. obsolete specifies that a not_supported_err exception is thrown if the ua does not support the "xml" feature. also specifies that null must be ...
Element.getAttributeNames() - Web APIs
living standard initial definition ...
Element.getAttributeNode() - Web APIs
living standard ...
Element.getAttributeNodeNS() - Web APIs
living standard ...
Element.getBoundingClientRect() - Web APIs
para.textcontent = `${ key } : ${ rect[key] }`; document.body.appendchild(para); } } notice how the width/height are equal to the equal to its width/height + padding. also note how the values of x/left, y/top, right, and bottom are equal to the absolute distance from the relevant edge of the viewport to that side of the element, in each case. specifications specification status comment css object model (cssom) view modulethe definition of 'element.getboundingclientrect()' in that specification. working draft initial definition notes the returned domrect object can be modified in modern browsers. this was not true with older versions which effectively returned domrectreadonly. with ie and edge, not being able to add missing properties to the...
Element.getClientRects() - Web APIs
working draft initial definition notes getclientrects() was first introduced in the ms ie dhtml object model. ...
Element.getElementsByClassName() - Web APIs
methods of array.prototype on any htmlcollection by passing the htmlcollection as the method's this value. here we'll find all <div> elements that have a class of test: var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement) { return testelement.nodename === 'div'; }); specifications specification status comment domthe definition of 'element.getelementsbyclassname()' in that specification. living standard initial definition ...
Element.getElementsByTagNameNS() - Web APIs
check the alignment on a number of cells in a table in an xhtml document. var table = document.getelementbyid("forecast-table"); var cells = table.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "td"); for (var i = 0; i < cells.length; i++) { var axis = cells[i].getattribute("axis"); if (axis == "year") { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagnamens()' in that specification. living standard changed the return value from nodelist to htmlcollection. document object model (dom) level 3 core specificationthe definition of 'element.getelementsbytagnamens()' in that specification. obsolete no change from document object model (dom) level 2 core specificat...
Element.hasAttribute() - Web APIs
living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.hasattribute()' in that specification. obsolete no change from document object model (dom) level 2 core ...
Element.hasAttributeNS() - Web APIs
living standard ...
Element.hasAttributes() - Web APIs
eturn value result holds the return value true or false. examples let foo = document.getelementbyid('foo'); if (foo.hasattributes()) { // do something with 'foo.attributes' } polyfill ;(function(prototype) { prototype.hasattributes = prototype.hasattributes || function() { return (this.attributes.length > 0); } })(element.prototype); specifications specification status comment domthe definition of 'element.hasattributes()' in that specification. living standard moved from the node interface to the more specialized element interface. document object model (dom) level 3 core specificationthe definition of 'hasattributes()' in that specification. obsolete no change from document object model (dom) level 2 core specification ...
Element.hasPointerCapture() - Web APIs
recommendation ...
Element.id - Web APIs
Web › API › Element › id
particular element. another common case is to use an element's id as a selector when styling the document with css. note: identifiers are case-sensitive, but you should avoid creating ids that differ only in the capitalization. syntax var idstr = element.id; // get the id element.id = idstr; // set the id idstr is the identifier of the element. specifications specification status comment domthe definition of 'id' in that specification. living standard no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'id' in that specification. obsolete no change from document object model (dom) level 1 specification. document object model (dom) level ...
Element.innerHTML - Web APIs
Web › API › Element › innerHTML
xample content. .box { width: 600px; height: 300px; border: 1px solid black; padding: 2px 4px; overflow-y: scroll; overflow-x: auto; } .log { margin-top: 8px; font-family: monospace; } result the resulting content looks like this. you can see output into the log by moving the mouse in and out of the box, clicking in it, and so forth. specification specification status comment dom parsing and serializationthe definition of 'element.innerhtml' in that specification. working draft initial definition ...
Element.insertAdjacentElement() - Web APIs
living standard ...
Element.insertAdjacentHTML() - Web APIs
ml into a page by using insertadjacenthtml(), be careful not to use user input that hasn't been escaped. it is not recommended you use insertadjacenthtml() when inserting plain text; instead, use the node.textcontent property or the element.insertadjacenttext() method. this doesn't interpret the passed content as html, but instead inserts it as raw text. specification specification status comment dom parsing and serializationthe definition of 'element.insertadjacenthtml()' in that specification. working draft ...
Element.insertAdjacentText() - Web APIs
living standard ...
Element: keydown event - Web APIs
side the <input> element. ...
Element: keypress event - Web APIs
the input and type something:</label> <input type="text" name="text" id="sample"> </div> <p id="log"></p> const log = document.getelementbyid('log'); const input = document.queryselector('input'); input.addeventlistener('keypress', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeypress equivalent input.onkeypress = logkey; specifications specification status ui events working draft ...
Element: keyup event - Web APIs
ide the <input> element. ...
Element.localName - Web APIs
Web › API › Element › localName
tml elements in html doms (as opposed to xhtml elements in xml doms). in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms. the tagname property continues to return in the upper case for html elements in html doms. specifications specification status comment domthe definition of 'element.localname' in that specification. living standard initial definition ...
Element.matches() - Web APIs
Web › API › Element › matches
living standard initial definition ...
Element: mousedown event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mousedown' in that specification. obsolete ...
Element: mouseenter event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseenter' in that specification. obsolete ...
Element: mouseleave event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseleave' in that specification. obsolete ...
Element: mousemove event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mousemove' in that specification. obsolete ...
Element: mouseout event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseout' in that specification. obsolete ...
Element: mouseover event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseover' in that specification. obsolete ...
Element: mouseup event - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseup' in that specification. obsolete ...
Element.namespaceURI - Web APIs
xhtml. you can create an element with the specified namespaceuri using the dom level 2 method document.createelementns. the dom does not handle or enforce namespace validation per se. it is up to the dom application to do any validation necessary. also note that the namespace prefix, once it is associated with a particular element, cannot be changed. specifications specification status comment domthe definition of 'element: namespaceuri' in that specification. living standard ...
Element.onfullscreenchange - Web APIs
living standard initial definition. ...
Element.onfullscreenerror - Web APIs
living standard initial definition. ...
Element.outerHTML - Web APIs
Web › API › Element › outerHTML
working draft ...
Element.part - Web APIs
Web › API › Element › part
s are clicked. let tabs = []; let children = this.shadowroot.children; for(let elem of children) { if(elem.getattribute('part')) { tabs.push(elem); } } tabs.foreach((tab) => { tab.addeventlistener('click', (e) => { tabs.foreach((tab) => { tab.part = 'tab'; }) e.target.part = 'tab active'; }) console.log(tab.part); }) specifications specification status comment shadow partsthe definition of 'element.part' in that specification. working draft ...
Element: paste event - Web APIs
{ let paste = (event.clipboarddata || window.clipboarddata).getdata('text'); paste = paste.touppercase(); const selection = window.getselection(); if (!selection.rangecount) return false; selection.deletefromdocument(); selection.getrangeat(0).insertnode(document.createtextnode(paste)); event.preventdefault(); }); result specifications specification status clipboard api and events working draft ...
Element.prefix - Web APIs
Web › API › Element › prefix
ed. before dom4 this api was defined within the node interface. syntax string = element.prefix examples the following logs "x" to the console. <x:div onclick="console.log(this.prefix)"/> notes this will only work when a namespace-aware parser is used, i.e. when a document is served with an xml mime type. this will not work for html documents. specifications specification status comment domthe definition of 'element: prefix' in that specification. living standard ...
Element.querySelector() - Web APIs
html); result the result looks like this: notice how the "div span" selector still successfully matches the <span> element, even though the baseelement's child nodes do not include the div element (it is still part of the specified selector). more examples see document.queryselector() for additional examples of the proper format for the selectors. specifications specification status comment domthe definition of 'queryselector()' in that specification. living standard selectors api level 2the definition of 'queryselectorall()' in that specification. obsolete selectors api level 1the definition of 'queryselectorall()' in that specification. obsolete ...
Element.querySelectorAll() - Web APIs
y default, queryselectorall() only verifies that the last element in the selector is within the search scope. the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification. living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification. obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification. obsolete initial definition selector...
Element.releasePointerCapture() - Web APIs
recommendation non-stable version. pointer eventsthe definition of 'releasepointercapture' in that specification. obsolete initial definition. ...
Element.removeAttribute() - Web APIs
living standard ...
Element.removeAttributeNS() - Web APIs
living standard ...
Element.removeAttributeNode() - Web APIs
living standard ...
Element.requestFullscreen() - Web APIs
don't need to do anything special if successful, but if the request fails, our promise's catch() handler presents an alert with an appropriate error message. if, on the other hand, full-screen mode is already in effect, we call document.exitfullscreen() to disable full-screen mode. you can see this example in action or view or remix the code on glitch. specifications specification status comment fullscreen apithe definition of 'element.requestfullscreen()' in that specification. living standard initial definition ...
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. candidate recommendation ...
Element.scroll() - Web APIs
Web › API › Element › scroll
per left. y-coord the pixel along the vertical axis of the element that you want displayed in the upper left. calling with options options a scrolltooptions dictionary. examples // put the 1000th vertical pixel at the top of the element element.scroll(0, 1000); using options: element.scroll({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scroll()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
Element.scrollBy() - Web APIs
Web › API › Element › scrollBy
(options) parameters x-coord is the horizontal pixel value that you want to scroll by. y-coord is the vertical pixel value that you want to scroll by. - or - options is a scrolltooptions dictionary. examples // scroll an element element.scrollby(300, 300); using options: element.scrollby({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollby()' in that specification. working draft initial definition. ...
Element.scrollHeight - Web APIs
working draft initial definition ...
Element.scrollIntoView() - Web APIs
t. example var element = document.getelementbyid("box"); element.scrollintoview(); element.scrollintoview(false); element.scrollintoview({block: "end"}); element.scrollintoview({behavior: "smooth", block: "end", inline: "nearest"}); notes the element may not be scrolled completely to the top or bottom depending on the layout of other elements. specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollintoview()' in that specification. working draft initial definition ...
Element.scrollLeft - Web APIs
working draft ...
Element.scrollTo() - Web APIs
Web › API › Element › scrollTo
horizontal axis of the element that you want displayed in the upper left. y-coord is the pixel along the vertical axis of the element that you want displayed in the upper left. - or - options is a scrolltooptions dictionary. examples element.scrollto(0, 1000); using options: element.scrollto({ top: 100, left: 100, behavior: 'smooth' }); specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollto()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. deskt...
Element.scrollTop - Web APIs
Web › API › Element › scrollTop
p is > 0 duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. if you can see this, scrolltop is maxed-out padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltop' in that specification. working draft ...
Element.scrollWidth - Web APIs
working draft initial definition ...
Element: scroll event - Web APIs
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. specifications specification status css object model (cssom) view module working draft ...
Element: select event - Web APIs
working draft ...
Element.setAttribute() - Web APIs
living standard ...
Element.setAttributeNS() - Web APIs
living standard ...
Element.setAttributeNode() - Web APIs
living standard ...
Element.setAttributeNodeNS() - Web APIs
living standard ...
Element.setPointerCapture() - Web APIs
recommendation non-stable version. pointer eventsthe definition of 'setpointercapture' in that specification. obsolete initial definition. ...
Element.shadowRoot - Web APIs
living standard ...
Element: show event - Web APIs
recommendation ...
Element.slot - Web APIs
Web › API › Element › slot
h example: <my-paragraph> <span slot="my-text">let's have some different text!</span> </my-paragraph> in our javascript file we get a reference to the <span> shown above, then log a reference to the name of the corresponding <slot> element. let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.slot); // logs 'my-text' specifications specification status comment domthe definition of 'slot' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webvi...
Element.tagName - Web APIs
Web › API › Element › tagName
living standard ...
Element.toggleAttribute() - Web APIs
living standard ...
Element: touchcancel event - Web APIs
more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created). bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Element: touchend event - Web APIs
the touchend event fires when one or more touch points are removed from the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Element: touchmove event - Web APIs
the touchmove event is fired when one or more touch points are moved along the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Element: touchstart event - Web APIs
the touchstart event is fired when one or more touch points are placed on the touch surface. bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events. specifications specification status touch events recommendation ...
Element: wheel event - Web APIs
working draft ...
Element - Web APIs
Web › API › Element
r more touch points are removed from the touch surface. also available via the ontouchend property touchmove fired when one or more touch points are moved along the touch surface. also available via the ontouchmove property touchstart fired when one or more touch points are placed on the touch surface. also available via the ontouchstart property specifications specification status comment css pseudo-elements level 4the definition of 'element' in that specification. working draft added the pseudo() method. web animations working draft added the getanimations() method. undomanager and domtransactionthe definition of 'element' in that specification. editor's draft added the undoscope and undomanager properties. poin...
ElementCSSInlineStyle.style - Web APIs
p)) { out += " " + prop + " = '" + elementstyle[prop] + "' > '" + computedstyle[prop] + "'\n"; } } console.log(out) the output would be something like: ... fontweight = '' > 'bold' color = 'red' > 'rgb(255, 0, 0)' ... note the presence of the value bold for font-weight in the computed style and the absence of it in the element's style property specifications specification status comment css object model (cssom)the definition of 'the elementcssinlinestyle.style property' in that specification. working draft initial definition. ...
ElementCSSInlineStyle - Web APIs
style. propertiesstylethe style property is used to get as well as set the inline style of an element. when getting, it returns a cssstyledeclaration object that contains a list of all styles properties for that element with values assigned for the attributes that are defined in the element's inline style attribute.methodsthis interface has no methods. specifications specification status comment css object model (cssom)the definition of 'htmlorforeignelement' in that specification. working draft initial definition. ...
ElementTraversal - Web APIs
her in the document tree. it proved useless, as very few types of node were able to implement all its methods and properties. it has been split into two interfaces, containing the useful methods and properties for each kind of nodes: childnode parentnode as it was a pure interface, with no object of this type, this change has no effect on the web. specifications specification status comment domthe definition of 'childnode' in that specification. living standard splitted the elementtraversal interface in parentnode and childnode element traversal specificationthe definition of 'elementtraversal' in that specification. obsolete initial definition ...
Encoding API - Web APIs
gs. the api provides four interfaces: textdecoder, textencoder, textdecoderstream and textencoderstream. interfaces textdecoder textencoder textdecoderstream textencoderstream tutorials & tools a shim allowing to use this interface in browsers that don't support it. stringview – a c-like representation of strings based on typed arrays. specifications specification status comment encoding living standard initial definition. ...
ErrorEvent - Web APIs
r occurred. errorevent.colno read only is an integer containing the column number of the script file on which the error occurred. errorevent.error read only is a javascript object that is concerned by the event. constructor errorevent() creates an errorevent event with the given parameters. methods inherits methods from its parent event. specifications specification status comment html living standardthe definition of 'errorevent' in that specification. living standard added the error property and the 5th parameter to the constructor. html5the definition of 'errorevent' in that specification. recommendation initial definition. ...
Event() - Web APIs
Web › API › Event › Event
outside of a shadow root (see event.composed for more details). the default is false. example // create a look event that bubbles up and cannot be canceled const evt = new event("look", {"bubbles":true, "cancelable":false}); document.dispatchevent(evt); // event can be dispatched from any element, not only the document mydiv.dispatchevent(evt); specifications specification status comment domthe definition of 'event()' in that specification. living standard initial definition ...
Event.bubbles - Web APIs
Web › API › Event › bubbles
einput(e) { // checks whether the event bubbles and ... if (!e.bubbles) { // ... passes the event along if does not passiton(e); } // already bubbling dooutput(e); } note: only certain events can bubble. events that do bubble have this property set to true. you can use this property to check if an event is allowed to bubble or not. specifications specification status comment domthe definition of 'event.bubbles' in that specification. living standard document object model (dom) level 2 events specificationthe definition of 'event.bubbles' in that specification. obsolete initial definition. ...
Event.cancelBubble - Web APIs
re returning from an event handler prevents propagation of the event. in later implementations, setting this to false does nothing. see browser compatibility for details. syntax event.cancelbubble = bool; var bool = event.cancelbubble; value a boolean. example elem.onclick = function(event) { // do cool things here event.cancelbubble = true; } specifications specification status comment domthe definition of 'cancelbubble' in that specification. living standard ...
Event.cancelable - Web APIs
Web › API › Event › cancelable
le.dir(event); } } document.addeventlistener('wheel', preventscrollwheel); notes whether an event can be canceled or not is something that's determined when that event is initialized. to cancel an event, call the preventdefault() method on the event. this keeps the implementation from executing the default action that is associated with the event. specifications specification status comment domthe definition of 'event.cancelable' in that specification. living standard document object model (dom) level 2 events specificationthe definition of 'event.cancelable' in that specification. obsolete initial definition. ...
Event.composed - Web APIs
Web › API › Event › composed
living standard ...
Event.composedPath() - Web APIs
living standard ...
Event.currentTarget - Web APIs
() the event object, storing it in a variable, and then look for the currenttarget key in the console, its value will be null. instead, you can either directly console.log(event.currenttarget) to be able to view it in the console or use the debugger statement, which will pause the execution of your code thus showing you the value of event.currenttarget. specifications specification status comment domthe definition of 'event.currenttarget' in that specification. living standard dom4the definition of 'event.currenttarget' in that specification. obsolete document object model (dom) level 3 events specificationthe definition of 'current event target' in that specification. obsolete document object model (dom) level 2 events s...
Event.defaultPrevented - Web APIs
living standard ...
Event.eventPhase - Web APIs
Web › API › Event › eventPhase
living standard dom4the definition of 'event.eventphase' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'event.eventphase' in that specification. obsolete initial definition ...
Event.initEvent() - Web APIs
Web › API › Event › initEvent
ent.cancelable will give its value. example // create the event. var event = document.createevent('event'); // create a click event that bubbles up and // cannot be canceled event.initevent('click', true, false); // listen for the event. elem.addeventlistener('click', function (e) { // e.target matches elem }, false); elem.dispatchevent(event); specifications specification status comment domthe definition of 'event.initevent()' in that specification. living standard from document object model (dom) level 2 events specification, deprecated it, superseded by event constructors. document object model (dom) level 2 events specificationthe definition of 'event.initevent()' in that specification. obsolete initial definition. browser compa...
Event.isTrusted - Web APIs
Web › API › Event › isTrusted
interface is a boolean that is true when the event was generated by a user action, and false when the event was created or modified by a script or dispatched via eventtarget.dispatchevent(). syntax var eventistrusted = event.istrusted; value boolean example if (e.istrusted) { /* the event is trusted */ } else { /* the event is not trusted */ } specification specification status comment domthe definition of 'event.istrusted' in that specification. living standard document object model (dom) level 3 events specificationthe definition of 'trusted events' in that specification. obsolete adds requirements regarding trusted and untrusted events, though it does not itself define the istrusted property. ...
Event.preventDefault() - Web APIs
-1; }, 2000); } result notes calling preventdefault() during any stage of event flow cancels the event, meaning that any default action normally taken by the implementation as a result of the event will not occur. you can use event.cancelable to check if the event is cancelable. calling preventdefault() for a non-cancelable event has no effect. specifications specification status comment domthe definition of 'event.preventdefault()' in that specification. living standard document object model (dom) level 2 events specificationthe definition of 'event.preventdefault()' in that specification. obsolete initial definition. ...
Event.returnValue - Web APIs
Web › API › Event › returnValue
explorer 6, and due to that browser's ubiquity became so commonly used that other browsers eventually implemented it as well. it has been adopted into the dom specification, primarily to ensure that existing web content continues to function going forward. new projects should generally avoid using returnvalue, although they may if they choose to do so. specifications specification status comment domthe definition of 'returnvalue' in that specification. living standard added for legacy compatibility. ...
Event.srcElement - Web APIs
Web › API › Event › srcElement
living standard ...
Event.stopImmediatePropagation() - Web APIs
vent interface prevents other listeners of the same event from being called. if several listeners are attached to the same element for the same event type, they are called in the order in which they were added. if stopimmediatepropagation() is invoked during one such call, no remaining listeners will be called. syntax event.stopimmediatepropagation(); specifications specification status comment domthe definition of 'event.stopimmediatepropagation()' in that specification. living standard ...
Event.stopPropagation() - Web APIs
occurring; for instance, clicks on links are still processed. if you want to stop those behaviors, see the preventdefault() method. syntax event.stoppropagation(); parameters none. return value undefined. examples see example 5: event propagation in the examples chapter for a more detailed example of this method and event propagation in the dom. specifications specification status comment domthe definition of 'event.stoppropagation()' in that specification. living standard dom4the definition of 'event.stoppropagation()' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'event.stoppropagation()' in that specification. obsolete initial definition ...
Event.target - Web APIs
Web › API › Event › target
living standard dom4the definition of 'event.target' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'event.target' in that specification. obsolete initial definition ...
Event.timeStamp - Web APIs
Web › API › Event › timeStamp
9211811670 // ... // reduced time precision with `privacy.resistfingerprinting` enabled event.timestamp; // 1519129853500 // 1519129858900 // 1519129864400 // ... in firefox, if you also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment domthe definition of 'event.timestamp' in that specification. living standard ...
Event.type - Web APIs
Web › API › Event › type
living standard document object model (dom) level 2 events specificationthe definition of 'event.type' in that specification. obsolete initial definition. ...
Event - Web APIs
Web › API › Event
event created. if the event has already been dispatched, this method does nothing. event.getpreventdefault() returns the value of event.defaultprevented. event.preventbubble() prevents the event from bubbling. use event.stoppropagation instead. event.preventcapture() prevents the event from bubbling. use event.stoppropagation instead. specifications specification status comment domthe definition of 'event' in that specification. living standard ...
EventListener.handleEvent() - Web APIs
d by the user agent when an event is sent to the eventlistener, in order to handle events that occur on an observed eventtarget. syntax eventlistener.handleevent(event); parameters event an event object describing the event that has been fired and needs to be processed. return value undefined. if you return a value, the browser will ignore it. specifications specification status comment domthe definition of 'eventlistener.handleevent()' in that specification. living standard no change. document object model (dom) level 2 events specificationthe definition of 'eventlistener.handleevent()' in that specification. obsolete initial definition. ...
EventListener - Web APIs
rt('element clicked through function!'); }); // for compatibility, a non-function object with a `handleevent` property is // treated just the same as a function itself. buttonelement.addeventlistener('click', { handleevent: function (event) { alert('element clicked through handleevent property!'); } }); result see also: addeventlistener specifications specification status comment domthe definition of 'eventlistener' in that specification. living standard no change. document object model (dom) level 2 events specificationthe definition of 'eventlistener' in that specification. obsolete initial definition. ...
EventSource() - Web APIs
living standard initial definition ...
EventSource.close() - Web APIs
Web › API › EventSource › close
s nothing. syntax eventsource.close(); parameters none. return value void. examples var button = document.queryselector('button'); var evtsource = new eventsource('sse.php'); button.onclick = function() { console.log('connection closed'); evtsource.close(); } note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'close()' in that specification. living standard initial definition ...
EventSource: error event - Web APIs
living standard ...
EventSource: message event - Web APIs
living standard ...
EventSource.onerror - Web APIs
rror property of the eventsource interface is an eventhandler called when an error occurs and the error event is dispatched on an eventsource object. syntax eventsource.onerror = function examples evtsource.onerror = function() { console.log("eventsource failed."); }; note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'onerror' in that specification. living standard initial definition ...
EventSource.onmessage - Web APIs
message event handers are of type messageevent. syntax eventsource.onmessage = function examples evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'onmessage' in that specification. living standard initial definition ...
EventSource.onopen - Web APIs
n property of the eventsource interface is an eventhandler called when an open event is received, that is when the connection was just opened. syntax eventsource.onopen = function examples evtsource.onopen = function() { console.log("connection to server opened."); }; note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'onopen' in that specification. living standard initial definition ...
EventSource: open event - Web APIs
living standard ...
EventSource.readyState - Web APIs
tion. syntax var myreadystate = eventsource.readystate; value a number representing the state of the connection. possible values are: 0 — connecting 1 — open 2 — closed examples var evtsource = new eventsource('sse.php'); console.log(evtsource.readystate); note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'readystate' in that specification. living standard initial definition ...
EventSource.url - Web APIs
Web › API › EventSource › url
nly property of the eventsource interface returns a domstring representing the url of the source. syntax var myurl = eventsource.url; value a domstring representing the url of the source. examples var evtsource = new eventsource('sse.php'); console.log(evtsource.url); note: you can find a full example on github — see simple sse demo using php. specifications specification status comment html living standardthe definition of 'url' in that specification. living standard initial definition ...
EventSource.withCredentials - Web APIs
living standard initial definition ...
EventTarget() - Web APIs
living standard ...
EventTarget.addEventListener() - Web APIs
rted ); on older browsers that don't support the options parameter to addeventlistener(), attempting to use it prevents the use of the usecapture argument without proper use of feature detection. you don't need to worry about the value of passive for the basic scroll event. since it can't be canceled, event listeners can't block page rendering anyway. specifications specification status comment domthe definition of 'eventtarget.addeventlistener()' in that specification. living standard dom4the definition of 'eventtarget.addeventlistener()' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'eventtarget.addeventlistener()' in that specification. obsolete initial definition...
EventTarget.dispatchEvent() - Web APIs
and return before the code continues on after the call to dispatchevent(). dispatchevent() is the last step of the create-init-dispatch process, which is used for dispatching events into the implementation's event model. the event can be created using event constructor. see also the event object reference. example see creating and triggering events. specifications specification status comment domthe definition of 'eventtarget.dispatchevent()' in that specification. living standard initial definition in the dom 2 events specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull req...
EventTarget.removeEventListener() - Web APIs
living standard dom4the definition of 'eventtarget.removeeventlistener()' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'eventtarget.removeeventlistener()' in that specification. obsolete initial d...
EventTarget - Web APIs
living standard no change. document object model (dom) level 3 events specificationthe definition of 'eventtarget' in that specification. obsolete a few parameters are now optional (listener), or accepts the null value (usecapture). document object model (dom) level 2 events specificati...
ExtendableEvent() - Web APIs
eevent(type, init); parameters type the type of the extendableevent, for example install, activate. init optional an options object containing any custom settings that you want to apply to the event object. currently no possible options exist inside the spec, but this has been defined for forward compatibility across the different derived events. specifications specification status comment service workersthe definition of 'extendableevent' in that specification. working draft initial definition. ...
ExtendableEvent.waitUntil() - Web APIs
promise. return value undefined. example using waituntil() within a service worker's install event: addeventlistener('install', event => { const precache = async () => { const cache = await caches.open('static-v1'); return cache.addall([ '/', '/about/', '/static/styles.css' ]); }; event.waituntil(precache()); }); specifications specification status comment service workersthe definition of 'waituntil()' in that specification. working draft initial definition ...
ExtendableEvent - Web APIs
working draft initial definition. ...
ExtendableMessageEvent() - Web APIs
ageport that sent the message. ports: an array containing the messageport objects connected to the channel sending the message. examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myeme = new extendablemessageevent('message', init); specifications specification status comment service workersthe definition of 'extendablemessageevent()' in that specification. working draft initial definition. ...
ExtendableMessageEvent.data - Web APIs
working draft initial definition. ...
ExtendableMessageEvent.lastEventId - Web APIs
working draft initial definition. ...
ExtendableMessageEvent.origin - Web APIs
working draft initial definition. ...
ExtendableMessageEvent.ports - Web APIs
xtendablemessageevent. var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.ports' in that specification. working draft initial definition. ...
ExtendableMessageEvent.source - Web APIs
working draft initial definition. ...
ExtendableMessageEvent - Web APIs
working draft initial definition. ...
FeaturePolicy.allowedFeatures() - Web APIs
that these features might be restricted by the permissions api, if the user did not grant the corrsponding permission yet. // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowedfeatures() for (const directive of allowed){ console.log(directive) } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification. editor's draft initial definition. ...
FeaturePolicy.allowsFeature() - Web APIs
rmissions api, if the user did not grant the corresponding permission yet. // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowsfeature("camera") if (allowed){ console.log("fp allows camera.") } else { console.log("fp does not allows camera.") } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification. editor's draft initial definition. ...
FeaturePolicy.features() - Web APIs
the supported directives in the console. // get the feature policy object const featurepolicy = document.featurepolicy // retreive the list of all supported feature policy directives const supporteddirectives = featurepolicy.features() // print out each directive into the console for (const directive of supporteddirectives){ console.log(directive) } specification specification status comment feature policythe definition of 'features' in that specification. editor's draft initial definition. ...
FeaturePolicy.getAllowlistForFeature() - Web APIs
mera api might be restricted by the permissions api, if the user did not grant the corrsponding permission yet. // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowlist = featurepolicy.getallowlistforfeature("camera") for (const origin of allowlist){ console.log(origin) } specification specification status comment feature policythe definition of 'getallowlistforfeature' in that specification. editor's draft initial definition. ...
FeaturePolicy - Web APIs
t be accessible because of user's permissions. featurepolicy.allowedfeatures returns a list of names of all features supported by the user agent and allowed by the feature policy. note that features appearing on this list might still be behind a user permission. featurepolicy.getallowlistforfeature returns the allow list for the specified feature. specification specification status comment feature policy editor's draft initial definition. ...
FederatedCredential - Web APIs
tedcredential constructor creates a new federatedcredential object. in supporting browsers, an instance of this class may be passed the credential received from the init object for global fetch. syntax var mycredential = new federatedcredential(init) parameters init options are: provider: a usvstring; identifying the credential provider. specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchro...
FederatedCredential.protocol - Web APIs
e returns a read-only domstring containing a credential's federated identity protocol. if this property is null, the protocol may be inferred from the federatedcredential.provider property. syntax var protocol = federatedcredential.protocol value a domstring containing a credential's federated identity protocol (e.g. openidconnect). examples // tbd specifications specification status comments credential management level 1the definition of 'protocol' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeed...
FederatedCredential.provider - Web APIs
the provider property of the federatedcredential interface returns a usvstring containing a credential's federated identity provider. syntax var provider = federatedcredential.provider value a usvstring containing a credential's federated identity provider. example // tbd specifications specification status comments credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung...
FederatedCredential - Web APIs
d only returns a domstring containing a credential's federated identity protocol. event handlers none. methods none. examples var cred = new federatedcredential({ id: id, name: name, provider: 'https://account.google.com', iconurl: iconurl }); // store it navigator.credentials.store(cred) .then(function() { // do something else. }); specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchro...
FetchEvent() - Web APIs
sponse to the client. replacesclientid read only a domstring which identifies the client which is being replaced by resultingclientid. resultingclientid read only a domstring containing the new clientid if the client changes as a result of the page load. request read only the request object that would have triggered the event handler. specifications specification status comment service workersthe definition of 'fetchevent() constructor' in that specification. working draft initial definition. ...
FetchEvent.preloadResponse - Web APIs
working draft initial definition. ...
FetchEvent.clientId - Web APIs
ns the id of the client that the current service worker is controlling. the clients.get() method could then be passed this id to retrieve the associated client. syntax var myclientid = fetchevent.clientid; value a domstring that represents the client id. example self.addeventlistener('fetch', function(event) { console.log(event.clientid); ​}); specifications specification status comment service workersthe definition of 'clientid' in that specification. working draft initial definition. ...
FetchEvent.navigationPreload - Web APIs
spond 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. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
FetchEvent.replacesClientId - Web APIs
navigation, replacesclientid will be an empty string. this could be used to access/communicate with a client that will imminently be replaced, right before a navigation. syntax var myreplacedclientid = fetchevent.replacesclientid; value a domstring. example self.addeventlistener('fetch', function(event) { console.log(event.replacesclientid); }); specifications specification status comment service workersthe definition of 'replacesclientid' in that specification. working draft initial definition. ...
FetchEvent.request - Web APIs
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 'request' in that specification. working draft initial definition. ...
FetchEvent.respondWith() - Web APIs
if we found one. if (cachedresponse) return cachedresponse; // if we didn't find a match in the cache, use the network. return fetch(event.request); }()); }); note: caches.match() is a convenience method. equivalent functionality is to call cache.match() on each cache (in the order returned by caches.keys()) until a response is returned. specifications specification status comment service workersthe definition of 'respondwith()' in that specification. working draft initial definition. ...
FetchEvent.resultingClientId - Web APIs
of the client associated with page b. if the fetch request is a subresource request or the request's destination is report, resultingclientid will be an empty string. syntax var myresultingclientid = fetchevent.resultingclientid; value a domstring. example self.addeventlistener('fetch', function(event) { console.log(event.resultingclientid); }); specifications specification status comment service workersthe definition of 'resultingclientid' in that specification. working draft initial definition. ...
FetchEvent - Web APIs
working draft initial definition. ...
File.File() - Web APIs
Web › API › File › File
mstring representing the mime type of the content that will be put into the file. ...
File.lastModified - Web APIs
Web › API › File › lastModified
70 // ... // reduced time precision with `privacy.resistfingerprinting` enabled somefile.lastmodified; // 1519129853500 // 1519129858900 // 1519129864400 // ... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger. specifications specification status comment file apithe definition of 'lastmodified' in that specification. working draft initial definition. ...
File.name - Web APIs
Web › API › File › name
e a string, containing the name of the file without path, such as "my resume.rtf". example <input type="file" multiple onchange="processselectedfiles(this)"> function processselectedfiles(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert("filename " + files[i].name); } } try the results out below: specifications specification status comment file apithe definition of 'name' in that specification. working draft initial definition. ...
File.type - Web APIs
Web › API › File › type
r, file.type is generally reliable only for common file types like images, html documents, audio and video. uncommon file extensions would return an empty string. client configuration (for instance, the windows registry) may result in unexpected values even for common types. developers are advised not to rely on this property as a sole validation scheme. specifications specification status comment file apithe definition of 'type' in that specification. working draft initial definition. ...
File.webkitRelativePath - Web APIs
draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-co...
File - Web APIs
Web › API › File
a readablestream that can be used to read the file contents. blob.prototype.text() transforms the file into a stream and reads it to completion. it returns a promise that resolves with a usvstring (text). blob.prototype.arraybuffer() transforms the file into a stream and reads it to completion. it returns a promise that resolves with an arraybuffer. specifications specification status comment file apithe definition of 'the file interface' in that specification. working draft initial definition. ...
FileList - Web APIs
Web › API › FileList
working draft html living standardthe definition of 'selected files' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn...
FileReader() - Web APIs
eader = new filereader(); parameters none. ...
FileReader.abort() - Web APIs
Web › API › FileReader › abort
the abort method aborts the read operation. upon return, the readystate will be done. syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading). specifications specification status comment file apithe definition of 'abort()' in that specification. working draft initial definition ...
FileReader: abort event - Web APIs
ent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.error - Web APIs
Web › API › FileReader › error
the filereader error property returns the error that occurred while reading the file. syntax var error = instanceoffilereader.error value a domerror containing the relevant error. in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard. specifications specification status comment file apithe definition of 'filereader: error' in that specification. working draft initial definition ...
FileReader: error event - Web APIs
er('error', () => { console.error(`error occurred reading file: ${selectedfile.name}`); }); reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name} read successfully`); }); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); specifications specification status file api working draft ...
FileReader: load event - Web APIs
er('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
er('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
er('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: progress event - Web APIs
er('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.readAsArrayBuffer() - Web APIs
done, and the loadend is triggered. at that time, the result attribute contains an arraybuffer representing the file's data. newer api available the blob.arraybuffer() method is a newer promise-based api to read a file as an array buffer. syntax instanceoffilereader.readasarraybuffer(blob); parameters blob the blob or file from which to read. specifications specification status comment file apithe definition of 'filereader.readasarraybuffer' in that specification. working draft initial definition ...
FileReader.readAsBinaryString() - Web APIs
working draft ...
FileReader.readAsDataURL() - Web APIs
working draft initial definition ...
FileReader.readAsText() - Web APIs
i avaliable the blob.text() method is a newer promise-based api to read a file as text. syntax instanceoffilereader.readastext(blob[, encoding]); parameters blob the blob or file from which to read. encoding optional a string specifying the encoding to use for the returned data. by default, utf-8 is assumed if this parameter is not specified. specifications specification status comment file apithe definition of 'readastext()' in that specification. working draft initial definition ...
FileReader.readyState - Web APIs
working draft initial definition ...
FileReader.result - Web APIs
Web › API › FileReader › result
d and passed to the callback function provided to read(). the content is handled as raw text data. var fileinput = document.queryselector('input[type="file"]'); function read(callback) { var file = fileinput.files.item(0); var reader = new filereader(); reader.onload = function() { callback(reader.result); } reader.readastext(file); } specifications specification status comment file apithe definition of 'result' in that specification. working draft initial definition ...
FileReader - Web APIs
s completed successfully. also available via the onload property. loadend fired when a read has completed, successfully or not. also available via the onloadend property. loadstart fired when a read has started. also available via the onloadstart property. progress fired periodically as data is read. also available via the onprogress property. specifications specification status comment file apithe definition of 'filereader' in that specification. working draft initial definition ...
FileReaderSync.readAsArrayBuffer() - Web APIs
are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file). notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock. encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser. specifications specification status comment file apithe definition of 'readasarraybuffersync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
FileReaderSync.readAsBinaryString() - Web APIs
are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file). notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock. encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser. specifications specification status comment file apithe definition of 'readasbinarystringsync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxin...
FileReaderSync.readAsDataURL() - Web APIs
are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file). notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock. encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser. specifications specification status comment file apithe definition of 'readasdataurl' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ex...
FileReaderSync.readAsText() - Web APIs
are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file). notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock. encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser. specifications specification status comment file apithe definition of 'readastext' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explo...
FileReaderSync - Web APIs
tring representing the input data as a text string. the optional encoding parameter indicates the encoding to be used (e.g., iso-8859-1 or utf-8). if not present, the method will apply a detection algorithm for it. filereadersync.readasdataurl() this method converts a specified blob or a file into a domstring representing the input data as a data url. specifications specification status comment file apithe definition of 'filereadersync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet e...
FileRequest.lockedFile - Web APIs
facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary the lockedfile property represents the lockedfile object from which the request was started. syntax var lockedfile = instanceoffilerequest.lockedfile value a lockedfile object. specifications specification status comment filesystem api editor's draft draft proposal. ...
FileRequest.onprogress - Web APIs
time the function callback is called, it gets an object as its first parameter. those objects contain two properties: loaded a number representing the current amount of bytes processed by the operation. total a number representing the total amount of bytes that will be processed by the operation. 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. ...
FileRequest - Web APIs
ry 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. methods none. specifications specification status comment filesystem api editor's draft draft proposal. ...
FileSystem.name - Web APIs
Web › API › FileSystem › name
the read-only name property of the filesystem interface indicates the file system's name. this usvstring is unique among all file systems currently exposed by the file and directory entries api. syntax var fsname = filesystem.name; value a usvstring representing the file system's name. example // tbd specifications specification status comment file and directory entries apithe definition of 'name' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
FileSystem.root - Web APIs
Web › API › FileSystem › root
the read-only root property of the filesystem interface specifies a filesystemdirectoryentry object representing the root directory of the file system, for use with the file and directory entries api. syntax var rootdirent = filesystem.root; value a filesystemdirectoryentry representing the file system's root directory. example // tbd specifications specification status comment file and directory entries apithe definition of 'root' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet e...
FileSystem - Web APIs
ties filesystem.name read only a usvstring representing the file system's name. this name is unique among the entire list of exposed file systems. filesystem.root read only a filesystemdirectoryentry object which represents the file system's root directory. through this object, you can gain access to all files and directories in the file system. specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification. draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explore...
FileSystemDirectoryEntry.createReader() - Web APIs
), which calls itself recursively to get all the entries in the directory, concatenating each batch to the array. each iteration, readentries() is called to get more entries. when it returns an empty array, the end of the directory has beenr reached, and the recursion ends. once control is returned to readdirectory(), the array is returned to the caller. specifications specification status comment file and directory entries apithe definition of 'createreader()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
FileSystemDirectoryEntry.getDirectory() - Web APIs
e() to get a filesystemfileentry object representing the dictionary file; the success callback for this, in turn, creates a new filereader and uses it to load the contents of the file. when that is loaded successfully (as indicated by the loadend event being fired), the loaded text is passed into json.parse() to be reconstituted into a javascript object. specifications specification status comment file and directory entries apithe definition of 'getdirectory()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
FileSystemDirectoryEntry.getFile() - Web APIs
e() to get a filesystemfileentry object representing the dictionary file; the success callback for this, in turn, creates a new filereader and uses it to load the contents of the file. when that is loaded successfully (as indicated by the loadend event being fired), the loaded text is passed into json.parse() to be reconstituted into a javascript object. specifications specification status comment file and directory entries apithe definition of 'getfile()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefi...
FileSystemDirectoryEntry - Web APIs
called. getfile() returns a filesystemfileentry object representing a file located within the directory's hierarchy, given a path relative to the directory on which the method is called. obsolete methods removerecursively() deletes a directory and all of its contents, including the contents of subdirectories. this has been removed from the spec. specifications specification status comment file and directory entries apithe definition of 'filesystemdirectoryentry' in that specification. draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxin...
FileSystemDirectoryReader.readEntries() - Web APIs
ry representing the file. if that's successful, we call scanfiles() to process the item—either by adding it to the list if it's just a file or by adding it and walking down into it if it's a directory. result you can see how this works by trying it out below. find some files and directories and drag them in, and take a look at the resulting output. specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
FileSystemDirectoryReader - Web APIs
sers implement it, and those that do may implement only small portions of it. check the browser compatibility section for details. methods readentries() returns an array containing some number of the directory's entries. each item in the array is an object based on filesystementry—typically either filesystemfileentry or filesystemdirectoryentry. specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
FileSystemEntry.filesystem - Web APIs
resides. syntax var filesystem = filesystementry.filesystem; value a filesystem representing the file system on which the file or directory described by the filesystementry is located.. example this example obtains a filesystemdirectoryentry for the root directory of the file system containing a file. let rootdirentry = fileentry.filesystem.root; specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
FileSystemEntry.fullPath - Web APIs
= ""; fs.root.getfile("data.json", { create: true, exclusive: true }, function(entry) { path = fullpath; }, handleerror(error)); return path; } obviously, this is somewhat contrived, since we know that the file's full path is "/data.json", having just looked it up ourselves, but the concept holds up for scenarios in which you don't know it. specifications specification status comment file and directory entries apithe definition of 'fullpath' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data ...
FileSystemEntry.getParent() - Web APIs
g promises currently, there isn't a promise-based version of this method. you can, however, create a simple helper function to adapt it, like this: function getparentpromise(entry) { return new promise((resolve, reject) => { entry.getparent(resolve, reject); }); } a similar approach can be taken elsewhere in the file and directory entries api. specifications specification status comment file and directory entries apithe definition of 'getparent()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
FileSystemEntry.isDirectory - Web APIs
is property might be used to determine whether to process the entry as a directory or file. if the entry is neither, an error handler is called with an appropriate message. if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isdirectory' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
FileSystemEntry.isFile - Web APIs
is property might be used to determine whether to process the entry as a directory or file. if the entry is neither, an error handler is called with an appropriate message. if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isfile' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
FileSystemEntry.name - Web APIs
name; value a usvstring indicating the entry's name. example this example shows a function called isfilewithextension() which returns true if the specified filesystementry is both a file and the file's name ends with a given extension. function isfilewithextension(entry, extension) { return (entry.isfile && entry.name.endswith("." + extension)); } specifications specification status comment file and directory entries apithe definition of 'name' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
FileSystemEntry - Web APIs
nting the entry's parent directory. moveto() moves the file or directory to a new location on the file system, or renames the file or directory. remove() removes the specified file or directory. you can only remove directories which are empty. tourl() creates and returns a url which identifies the entry. this url uses the url scheme "filesystem:". specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedg...
FileSystemFileEntry.file() - Web APIs
this function calls file(), specifying as its success callback a method which proceeds to use a filereader to read the file as text. the filereader's load event handler is set up to deliver the loaded string to the successcallback specified when the readfile() method was called; similarly, its error handler is set up to call the errorcallback specified. specifications specification status comment file and directory entries apithe definition of 'file()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
FileSystemFileEntry - Web APIs
e) { console.log('write failed: ' + e.tostring()); }; // create a new blob and write it to log.txt. var bb = new blobbuilder(); bb.append('meow'); filewriter.write(bb.getblob('text/plain')); }, errorhandler); }, errorhandler); } window.requestfilesystem(window.temporary, 1024*1024, oninitfs, errorhandler); specifications specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification. draft draft of proposed api browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechr...
FileSystemFlags.create - Web APIs
errorcallback is called with an appropriate error, such as fileerror.path_exists_err. true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrome...
FileSystemFlags.exclusive - Web APIs
errorcallback is called with an appropriate error, such as fileerror.path_exists_err. true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrome...
FileSystemFlags - Web APIs
errorcallback is called with an appropriate error, such as fileerror.path_exists_err. true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrome...
FileHandle API - Web APIs
case of different entities writing concurrently to the same file. ...
Introduction to the File and Directory Entries API - Web APIs
edictably when they are passed to asynchronous apis. persistent storage persistent storage is storage that stays in the browser unless the user expunges it or the app deletes it. temporary storage transient storage is available to any web app. it is automatic and does not need to be requested, but the browser can delete the storage without warning. specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. ...
File and Directory Entries API - Web APIs
oogle chrome). they're available on the worker object and implemented in localfilesystemsync: requestfilesystemsync() and resolvelocalfilesystemsyncurl(). other interfaces localfilesystem gives you access to a sandboxed file system. localfilesystemsync lockedfile provides tools to deal with a given file with all the necessary locks. metadata specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. ...
FocusEvent() - Web APIs
representing the name of the event. focuseventinit optional is a focuseventinit dictionary, having the following fields: "relatedtarget", optional and defaulting to null, is an eventtarget representing the secondary target of a focusevent. the focuseventinit dictionary also accepts fields from the uieventinit and eventinit dictionaries. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'focusevent()' in that specification. obsolete initial definition ...
FocusEvent.relatedTarget - Web APIs
e eventtarget receiving focus (if any) note that many elements can't have focus, which is a common reason for relatedtarget to be null. relatedtarget may also be set to null for security reasons, like when tabbing in or out of a page. mouseevent.relatedtarget is a similar property for mouse events. syntax secondtarget = focusevent.relatedtarget specifications specification status comment ui eventsthe definition of 'focusevent.relatedtarget' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'focusevent.relatedtarget' in that specification. obsolete initial definition. ...
FocusEvent - Web APIs
, and indirectly from event. focusevent.relatedtarget is an eventtarget representing a secondary target for this event. in some cases (such as when tabbing in or out a page), this property may be set to null for security reasons. methods this interface has no specific methods. it inherits methods from its parent uievent, and indirectly from event. specifications specification status comment ui eventsthe definition of 'focusevent' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'focusevent' in that specification. obsolete initial definition. ...
FontFace.FontFace() - Web APIs
Web › API › FontFace › FontFace
working draft initial definition ...
FontFace.display - Web APIs
Web › API › FontFace › display
or less for the block period and 3 seconds for the swap period, though these values may vary from browser to browser. 'optional': gives the font face a short block period and no swap period. the spec recommends 100 ms or less, though this may vary from browser to browser. 'swap': gives the font face a 0 second block period and an infinite swap period. specifications specification status comment css font loading module level 3the definition of 'display' in that specification. working draft initial definition. css fonts module level 4the definition of 'font-display' in that specification. working draft defines the values for the display property. (they are the same as for font-display.) browser compatibility the compatibility table on this...
FontFace.family - Web APIs
Web › API › FontFace › family
syntax instanceoffontface.family = 'font family name'; var fontface = instanceoffontface.family; // "font family name" value a domstring. example var fontface = new fontface('roboto', 'url(https://fonts.example.com/roboto.woff2)'); console.log(fontface.family); // 'roboto' fontface.family = 'newroboto'; console.log(fontface.family); // 'newroboto' specifications specification status comment css font loading module level 3the definition of 'family' in that specification. working draft initial definition ...
FontFace.featureSettings - Web APIs
of the fontface interface retrieves or sets infrequently used font features that are not available from a font's variant properties. it is equivalent to the font-feature-settings descriptor. syntax var featuresettingdescriptor = fontface.featuresettings; fontface.featuresettings = featuresettingdescriptor; value a cssomstring containing a descriptor. specifications specification status comment css font loading module level 3the definition of 'featuresettings' in that specification. working draft initial definition. ...
FontFace.load - Web APIs
Web › API › FontFace › load
that resolves with the current fontface object. syntax var promise = fontface.load(); parameters none. return value a promise that resolves with a reference to the current fontface object when the font loads or rejects with a networkerror if the loading process fails. exceptions networkerror indicates that the attempt to load the font failed. specifications specification status comment css font loading module level 3the definition of 'load' in that specification. working draft initial definition. ...
FontFace.loaded - Web APIs
Web › API › FontFace › loaded
working draft initial definition. ...
FontFace.stretch - Web APIs
Web › API › FontFace › stretch
the stretch property of the fontface interface retrieves or sets how the font stretches. it is equivalent to the font-stretch descriptor. syntax var stretchdescriptor = fontface.stretch; fontface.stretch = stretchdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule. specifications specification status comment css font loading module level 3the definition of 'stretch' in that specification. working draft initial definition. ...
FontFace.style - Web APIs
Web › API › FontFace › style
the style property of the fontface interface retrieves or sets the font's style. it is equivalent to the font-style descriptor. syntax var style = fontface.style; fontface.style = value; value a cssomstring containing the descriptors defined in the style sheet's @font-face rule. specifications specification status comment css font loading module level 3the definition of 'style' in that specification. working draft initial definition. ...
FontFace.unicodeRange - Web APIs
the fontface interface retrieves or sets the range of unicode codepoints encompassing the font. it is equivalent to the unicode-range descriptor. syntax var unicoderangedescriptor = fontface.unicoderange; fontface.unicoderange = unicoderangedescriptor; value a cssomstring containing a descriptor as it would appear in a style sheet's @font-face rule. specifications specification status comment css font loading module level 3the definition of 'unicoderange' in that specification. working draft initial definition. ...
FontFace.variant - Web APIs
Web › API › FontFace › variant
the variant property of the fontface interface programatically retrieves or sets font variant values. it is equivalent to the font-variant descriptor. syntax var variantsubproperty = fontface.variant; fontface.variant = variantsubproperty; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule. specifications specification status comment css font loading module level 3the definition of 'variant' in that specification. working draft initial definition. ...
FontFace.weight - Web APIs
Web › API › FontFace › weight
the weight property of the fontface interface retrieves or sets the weight of the font. it is equivalent to the font-weight descriptor. syntax var weightdescriptor = fontface.weight; fontface.weight = weightdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule. specifications specification status comment css font loading module level 3the definition of 'weight' in that specification. working draft initial definition. ...
FontFaceSet.check() - Web APIs
Web › API › FontFaceSet › check
mit the font faces to those whose unicode range contains at least one of the characters in text. this does not check for individual glyph coverage. examples document.fonts.check("12px courier"); // returns true if the font courier is available at 12px document.fonts.check("12px myfont", "ß"); // returns true if the font 'myfont' has a ß character. specifications specification status comment css font loading module level 3the definition of 'check' in that specification. working draft initial definition ...
FontFaceSet.load() - Web APIs
Web › API › FontFaceSet › load
aces to those whose unicode range contains at least one of the characters in text. this does not check for individual glyph coverage. examples // returns a promise that will be fulfilled or rejected according the success to load myfont // the code in 'then' can assume the availability of that font. document.fonts.load("12px myfont", "ß").then(…); specifications specification status comment css font loading module level 3the definition of 'load' in that specification. working draft initial definition ...
FontFaceSet.ready - Web APIs
Web › API › FontFaceSet › ready
the ready readonly property of the fontfaceset interface returns a promise that resolves to the given fontfaceset. syntax fontfaceset.ready.then(function(fontfaceset) { // ... }); returns a promise that resolves to the given fontfaceset. parameters none. specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification. working draft initial definition ...
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
esetloadevent constructor creates a new fontfaceloadevent object which is fired whenever a fontfaceset loads. syntax var fontfacesetloadevent = new fontfacesetloadevent(type[, options]) parameters type the literal value 'type' (quotation marks included). options optional options are as follows: fontfaces: an array of fontface instances. specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmo...
FontFaceSetLoadEvent.fontfaces - Web APIs
working draft initial definition. ...
FontFaceSetLoadEvent - Web APIs
the fontfacesetloadevent interface of the the css font loading api is fired whenever a fontfaceset loads. constructor fontfacesetloadevent() creates a new fontfacesetloadevent object. properties fontfacesetloadevent.fontfacesread only returns an array of fontface instances each of which represents a single usable font. specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxi...
FormData() - Web APIs
Web › API › FormData › FormData
rfile"> </div> <input type="submit" value="submit!"> </form> note: only successful form controls are included in a formdata object, i.e. those with a name, not disabled and checked (radio buttons and checkboxes) or selected (one or more options within a select). let myform = document.getelementbyid('myform'); let formdata = new formdata(myform); specifications specification status comment xmlhttprequestthe definition of 'formdata()' in that specification. living standard initial definition ...
FormData.append() - Web APIs
Web › API › FormData › append
kes it simpler to process multi-file uploads because the resultant data structure is more conducive to looping. if the sent value is different than string or blob it will be automatically converted to string: formdata.append('name', true); formdata.append('name', 74); formdata.append('name', 'john'); formdata.getall('name'); // ["true", "74", "john"] specifications specification status comment xmlhttprequestthe definition of 'append()' in that specification. living standard initial definition ...
FormData.delete() - Web APIs
Web › API › FormData › delete
rkers. syntax formdata.delete(name); parameters name the name of the key you want to delete. returns void. 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. living standard ...
FormData.entries() - Web APIs
Web › API › FormData › entries
formdata.entries(); return value returns an iterator. example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification. living standard initial definition ...
FormData.get() - Web APIs
Web › API › FormData › get
ull. example the following line 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. living standard ...
FormData.getAll() - Web APIs
Web › API › FormData › getAll
living standard ...
FormData.has() - Web APIs
Web › API › FormData › has
living standard ...
FormData.keys() - Web APIs
Web › API › FormData › keys
: this method is available in web workers. syntax formdata.keys(); return value returns an iterator. example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification. living standard initial definition ...
FormData.set() - Web APIs
Web › API › FormData › set
living standard ...
FormData.values() - Web APIs
Web › API › FormData › values
is available in web workers. syntax formdata.values(); return value returns an iterator. example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification. living standard initial definition ...
FormData - Web APIs
Web › API › FormData
ey. formdata.keys() returns an iterator allowing to go through all keys of the key/value pairs contained in this object. formdata.set() sets a new value for an existing key inside a formdata object, or adds the key/value if it does not already exist. formdata.values() returns an iterator allowing to go through all values contained in this object. specifications specification status comment xmlhttprequestthe definition of 'formdata' in that specification. living standard formdata defined in xhr spec ...
FormDataEvent() - Web APIs
fault is false. formdata: a formdata object to pre-populate the formdataevent with. this would then be accessed through the formdataevent.formdata property. examples let fd = new formdata(); fd.append('test', 'test'); let fdev = new formdataevent('formdata', { formdata: fd }); for (let value of fdev.formdata.values()) { console.log(value); } specifications specification status comment html living standardthe definition of 'formdataevent' in that specification. living standard initial definition ...
FormDataEvent.formData - Web APIs
living standard ...
FormDataEvent - Web APIs
living standard ...
FullscreenOptions.navigationUI - Web APIs
lement. 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(). specifications specification status comment fullscreen apithe definition of 'fullscreenoptions' in that specification. living standard initial definition ...
Guide to the Fullscreen API - Web APIs
browser compatibility document.fullscreen the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid w...
Fullscreen API - Web APIs
ode, so we need to switch to full-screen mode; otherwise, it's the element that's currently in full-screen mode. switching to full-screen mode is done by calling element.requestfullscreen() on the <video> element. if full-screen mode is already active (fullscreenelement is not null), we call exitfullscreen() on the document to shut off full-screen mode. specifications specification status fullscreen api living standard browser compatibility document.fullscreen the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox...
GainNode() - Web APIs
Web › API › GainNode › GainNode
ainnode(context, options) parameters inherits parameters from the audionodeoptions dictionary. context a reference to an audiocontext. options optional options are as follows: gain: the amount of gain to apply. this parameter is a-rate and it's nominal range is (-∞,+∞). the default is 1. return value a new gainnode object instance. specifications specification status comment web audio apithe definition of 'gainnode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ...
GainNode.gain - Web APIs
Web › API › GainNode › gain
ear something, make sure you haven't // connected your source into the output in addition to using the gainnode. gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gain' in that specification. working draft ...
GainNode - Web APIs
Web › API › GainNode
ear something, make sure you haven't // connected your source into the output in addition to using the gainnode. gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gainnode' in that specification. working draft ...
Gamepad.axes - Web APIs
Web › API › Gamepad › axes
working draft initial definition ...
Gamepad.buttons - Web APIs
Web › API › Gamepad › buttons
working draft initial definition ...
Gamepad.connected - Web APIs
Web › API › Gamepad › connected
pad.connected property of the gamepad interface returns a boolean indicating whether the gamepad is still connected to the system. if the gamepad is connected, the value is true; if not, it is false. syntax readonly attribute boolean connected; example var gp = navigator.getgamepads()[0]; console.log(gp.connected); value a boolean. specifications specification status comment gamepadthe definition of 'gamepad.connected' in that specification. working draft initial definition ...
Gamepad.hand - Web APIs
Web › API › Gamepad › hand
in, or is most likely to be held in. syntax var myhand = gamepadinstance.hand; value a gamepadhand enum; possible values are: left — the left hand. right — the right hand. empty string ("") — this value is returned if the other values are not applicable, e.g. the controller is held in both hands, or would be fine in either. examples tbc specifications specification status comment gamepad extensionsthe definition of 'hand' in that specification. editor's draft initial definition ...
Gamepad.hapticActuators - Web APIs
editor's draft initial definition ...
Gamepad.id - Web APIs
Web › API › Gamepad › id
pping for the controls on the device as well as display useful feedback to the user. syntax readonly attribute domstring id; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a string. specifications specification status comment gamepadthe definition of 'gamepad.id' in that specification. working draft initial definition ...
Gamepad.index - Web APIs
Web › API › Gamepad › index
llers; a gamepad that is disconnected and reconnected will retain the same index. syntax readonly attribute long index; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a number. specifications specification status comment gamepadthe definition of 'gamepad.index' in that specification. working draft initial definition ...
Gamepad.mapping - Web APIs
Web › API › Gamepad › mapping
yout. currently there is only one supported known layout–the standard gamepad. if the browser is able to map controls on the device to that layout the mapping property will be set to the string standard. syntax readonly attribute domstring mapping; example var gp = navigator.getgamepads()[0]; console.log(gp.mapping); value a string. specifications specification status comment gamepadthe definition of 'gamepad.mapping' in that specification. working draft initial definition ...
Gamepad.timestamp - Web APIs
Web › API › Gamepad › timestamp
they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values. note: this property is not currently supported anywhere. syntax readonly attribute domhighrestimestamp timestamp; example var gp = navigator.getgamepads()[0]; console.log(gp.timestamp); value a domhighrestimestamp. specifications specification status comment gamepadthe definition of 'gamepad.timestamp' in that specification. working draft initial definition ...
Gamepad - Web APIs
Web › API › Gamepad
rray containing gamepadhapticactuator objects, each of which represents haptic feedback hardware available on the controller. example window.addeventlistener("gamepadconnected", function(e) { console.log("gamepad connected at index %d: %s. %d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); specifications specification status comment gamepadthe definition of 'gamepad' in that specification. working draft initial definition gamepad extensionsthe definition of 'gamepad extensions' in that specification. editor's draft defines the experimental extensions to gamepad ...
GamepadButton.pressed - Web APIs
amepadbutton interface returns a boolean indicating whether the button is currently pressed (true) or unpressed (false). syntax var ispressed = navigator.getgamepads()[0].pressed; example var gp = navigator.getgamepads()[0]; // get the first gamepad object if(gp.buttons[0].pressed == true) { // respond to button being pressed } value a boolean. specifications specification status comment gamepadthe definition of 'gamepadbutton.pressed' in that specification. working draft initial definition ...
GamepadButton.value - Web APIs
s. the values are normalized to the range 0.0 — 1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. syntax readonly attribute double value; example var gp = navigator.getgamepads()[0]; if(gp.buttons[0].value > 0) { // respond to analog button being pressed in } value a double. specifications specification status comment gamepadthe definition of 'gamepadbutton.value' in that specification. working draft initial definition ...
GamepadButton - Web APIs
working draft initial definition ...
GamepadEvent() - Web APIs
gamepadevent() constructor creates a new gamepadevent object. syntax var gamepadevent = new gamepadevent(typearg, options) parameters typearg a domstring that must be one of gamepadconnected or gamepaddisconnected. options optional options are as follows: gamepad: an instance of gamepad describing the gamepad associated with the event. specifications specification status comment gamepadthe definition of 'gamepadevent_' in that specification. working draft initial definition. ...
GamepadEvent.gamepad - Web APIs
ribute gamepad gamepad; example the gamepad property being called on a fired window.gamepadconnected event. window.addeventlistener("gamepadconnected", function(e) { console.log("gamepad connected at index %d: %s. %d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); value a gamepad object. specifications specification status comment gamepadthe definition of 'gamepadevent.gamepad' in that specification. working draft initial definition ...
GamepadEvent - Web APIs
sole.log("gamepad connected at index %d: %s. %d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); and on a window.gamepaddisconnected event. window.addeventlistener("gamepaddisconnected", function(e) { console.log("gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); specifications specification status comment gamepadthe definition of 'gamepadevent' in that specification. working draft initial definition browser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgamepadeventchrome full support 35 ...
GamepadHapticActuator.pulse() - Web APIs
lly takes a value between 0.0 (no intensity) and 1.0 (full intensity). duration a double representing the duration of the pulse, in milliseconds. note: repeated calls to pulse() override the previous calls if they are still ongoing. return value a promise that resolves with a value of true when the pulse has successfully completed. examples tbc specifications specification status comment gamepad extensionsthe definition of 'pulse()' in that specification. editor's draft initial definition ...
GamepadHapticActuator.type - Web APIs
pe read-only property of the gamepadhapticactuator interface returns an enum representing the type of the haptic hardware. syntax var myactuatortype = gamepadhapticactuatorinstance.type; value an enum of type gamepadhapticactuatortype; currently available types are: vibration — vibration hardware, which creates a rumbling effect. examples tbc specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuatortype' in that specification. editor's draft initial definition ...
GamepadHapticActuator - Web APIs
ibration hardware. this interface is accessible through the gamepad.hapticactuators property. properties gamepadhapticactuator.type read only returns an enum representing the type of the haptic hardware. methods gamepadhapticactuator.pulse() read only makes the hardware pulse at a certain intensity for a specified duration. examples tbd. specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuator' in that specification. editor's draft initial definition ...
Gamepad API - Web APIs
ed represents an event handler that will run when a gamepad is connected (when the gamepadconnected event fires). window.ongamepaddisconnected represents an event handler that will run when a gamepad is disconnected (when the gamepaddisconnected event fires). tutorials and guides using the gamepad api implementing controls using the gamepad api specifications specification status comment gamepad extensions editor's draft defines the experimental gamepad extensions. gamepadthe definition of 'the gamepad api specification' in that specification. working draft initial definition ...
Geolocation.clearWatch() - Web APIs
...
Geolocation.getCurrentPosition() - Web APIs
...
Geolocation.watchPosition() - Web APIs
recommendation initial specification. ...
Geolocation - Web APIs
location and gives back a geolocationposition object with the data. geolocation.watchposition() secure context returns a long value representing the newly established callback function to be invoked whenever the device location changes. geolocation.clearwatch() secure context removes the particular handler previously installed using watchposition(). specifications specification status comment geolocation api recommendation initial specification. ...
GeolocationCoordinates.accuracy - Web APIs
f the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters. syntax let acc = geolocationcoordinatesinstance.accuracy value a positive double representing the accuracy, with a 95% confidence level, of the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters. specifications specification status comment geolocation apithe definition of 'coordinates.accuracy' in that specification. recommendation initial definition ...
GeolocationCoordinates.altitude - Web APIs
olocationcoordinates.altitude read-only property is a double representing the altitude of the position in meters, relative to sea level. this value is null if the implementation cannot provide this data. syntax let alt = geolocationcoordinatesinstance.altitude value a double representing the altitude of the position in meters, relative to sea level. specifications specification status comment geolocation apithe definition of 'coordinates.altitude' in that specification. recommendation initial definition ...
GeolocationCoordinates.altitudeAccuracy - Web APIs
resenting the accuracy, with a 95% confidence level, of the altitude expressed in meters. this value is null if the implementation doesn't support measuring altitude. syntax let altacc = geolocationcoordinatesinstance.altitudeaccuracy value a positive double representing the accuracy, with a 95% confidence level, of the altitude expressed in meters. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.altitudeaccuracy' in that specification. recommendation initial specification. ...
GeolocationCoordinates.heading - Web APIs
determined clockwise (which means that east is 90 degrees and west is 270 degrees). if geolocationcoordinates.speed is 0, heading is nan. if the device is not able to provide heading information, this value is null. syntax let heading = geolocationcoordinatesinstance.heading value a double representing the direction in which the device is traveling. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.heading' in that specification. recommendation initial specification. ...
GeolocationCoordinates.latitude - Web APIs
the geolocationcoordinates.latitude read-only property is a double representing the latitude of the position in decimal degrees. syntax let lat = geolocationcoordinatesinstance.latitude value a double representing the latitude of the position in decimal degrees. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.latitude' in that specification. recommendation initial specification. ...
GeolocationCoordinates.longitude - Web APIs
values after being converted to a value with two decimal places. html the html used to present the results looks like this: <p> your location is <span id="latitude">0.00</span>° latitude by <span id="longitude">0.00</span>° longitude. </p> <button id="get-location"> get my location </button> result take this example for a test drive here: specifications specification status comment geolocation apithe definition of 'coordinates.longitude' in that specification. recommendation initial specification. ...
GeolocationCoordinates.speed - Web APIs
the geolocationcoordinates.speed read-only property is a double representing the velocity of the device in meters per second. this value is null if the implementation is not able to measure it. syntax let speed = geolocationcoordinatesinstance.speed value a double representing the velocity of the device in meters per second. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.speed' in that specification. recommendation initial specification. ...
GeolocationCoordinates - Web APIs
speed is 0, heading is nan. if the device is unable to provide heading information, this value is null. geolocationcoordinates.speed read only secure context returns a double representing the velocity of the device in meters per second. this value can be null. methods the geolocationcoordinates interface neither implements, nor inherits any method. specifications specification status comment geolocation apithe definition of 'geolocationcoordinates' in that specification. recommendation initial specification. ...
GeolocationPosition.coords - Web APIs
senting a geographic position. it contains the location, that is longitude and latitude on the earth, the altitude, and the speed of the object concerned, regrouped inside the returned value. it also contains accuracy information about these values. syntax let coord = geolocationpositioninstance.coords value a geolocationcoordinates object instance. specifications specification status comment geolocation apithe definition of 'geolocationposition.coords' in that specification. recommendation initial specification. ...
GeolocationPosition.timestamp - Web APIs
recommendation initial definition ...
GeolocationPosition - Web APIs
geolocationposition.coords read only secure context returns a geolocationcoordinates object defining the current location. geolocationposition.timestamp read only secure context returns a domtimestamp representing the time at which the location was retrieved. methods the geolocationposition interface neither implements, nor inherits any methods. specifications specification status comment geolocation apithe definition of 'geolocationposition' in that specification. recommendation initial specification. ...
GeolocationPositionError.code - Web APIs
ermission to do it. 2 position_unavailable the acquisition of the geolocation failed because one or several internal sources of position returned an internal error. 3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information that was reached before the information was obtained. specifications specification status comment geolocation apithe definition of 'positionerror.code' in that specification. recommendation initial definition ...
GeolocationPositionError.message - Web APIs
the geolocationpositionerror.message read-only property returns a human-readable domstring describing the details of the error. syntax let msg = geolocationpositionerrorinstance.message value a human-readable domstring describing the details of the error. specifications specification status comment geolocation apithe definition of 'geolocationpositionerror.message' in that specification. recommendation initial definition ...
GeolocationPositionError - Web APIs
geolocationpositionerror.message read only secure context returns a human-readable domstring describing the details of the error. specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface. methods the geolocationpositionerror interface neither implements nor inherits any method. specifications specification status comment geolocation apithe definition of 'geolocationpositionerror' in that specification. recommendation initial specification. ...
GeometryUtils - Web APIs
e does not implement any properties. methods geometryutils.getboxquads() returns a list of domquad objects representing the css fragments of the node. geometryutils.convertquadfromnode() fixme: needs a description geometryutils.convertrectfromnode() fixme: needs a description geometryutils.convertpointfromnode() fixme: needs a description specifications specification status comment css object model (cssom) view modulethe definition of 'geometryutils' in that specification. working draft initial definition ...
GlobalEventHandlers.onloadstart - Web APIs
lerfunction = element.onloadstart; handlerfunction should be either null or a javascript function specifying the handler for the event. notes see the dom event handlers page for information on working with on... handlers. the loadstart event is fired when progress has begun. see the loadstart event documentation for more information about the event. specification specification status comment html living standardthe definition of 'loadstart' in that specification. living standard ...
GlobalEventHandlers.onabort - Web APIs
living standard ...
GlobalEventHandlers.onanimationcancel - Web APIs
he box"; } }); toggling the box to display: none has the effect of aborting its animation. in browsers that support animationcancel, the event is fired and this handler is called. result assembled together, you get this: if your browser supports animationcancel, hiding the box using the button will cause a message to be displayed about the event. specification specification status comment css animationsthe definition of 'onanimationcancel' in that specification. working draft ...
GlobalEventHandlers.onanimationend - Web APIs
working draft ...
GlobalEventHandlers.onanimationiteration - Web APIs
}, false); this sets the box element's animation-play-state to "running" and increments the iteration counter. that's all there is to it! result assembled together, you get this: each time the box reaches the opposing corner, it stops, with the button reflecting which iteration number is up next, until you click the button to run the next iteration. specification specification status comment css animationsthe definition of 'onanimationiteration' in that specification. working draft ...
GlobalEventHandlers.onanimationstart - Web APIs
working draft ...
GlobalEventHandlers.onauxclick - Web APIs
working draft ...
GlobalEventHandlers.onblur - Web APIs
living standard ...
GlobalEventHandlers.oncancel - Web APIs
t notified of the event. syntax target.oncancel = functionref; value functionref is a function name or a function expression. the function receives an event object as its sole argument. only one oncancel handler can be assigned to an object at a time. you may prefer to use the eventtarget.addeventlistener() method instead, since it's more flexible. specifications specification status comment html living standardthe definition of 'oncancel' in that specification. living standard ...
GlobalEventHandlers.oncanplay - Web APIs
living standard ...
GlobalEventHandlers.oncanplaythrough - Web APIs
living standard ...
GlobalEventHandlers.onchange - Web APIs
living standard ...
GlobalEventHandlers.onclick - Web APIs
es of clicks this example displays the coordinates at which the most recent mouse button click occurred. html <p>click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.onclick = inputchange; function inputchange(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specification specification status comment html living standardthe definition of 'onclick' in that specification. living standard ...
GlobalEventHandlers.onclose - Web APIs
beforeunload or onunload. syntax target.onclose = functionref; value functionref is a function name or a function expression. the function receives an event object as its sole argument. only one onclose handler can be assigned to an object at a time. you may prefer to use the eventtarget.addeventlistener() method instead, since it's more flexible. specifications specification status comment html living standardthe definition of 'onclose' in that specification. living standard ...
GlobalEventHandlers.oncontextmenu - Web APIs
living standard ...
GlobalEventHandlers.oncuechange - Web APIs
living standard ...
GlobalEventHandlers.ondblclick - Web APIs
ad, since it's more flexible. example this example logs the position of double clicks. html <p>double click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.ondblclick = logdoubleclick; function logdoubleclick(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specifications specification status comment html living standardthe definition of 'ondblclick' in that specification. living standard ...
GlobalEventHandlers.ondrag - Web APIs
living standard html 5.1the definition of 'ondrag' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragend - Web APIs
living standard html 5.1the definition of 'ondragend' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragenter - Web APIs
living standard html 5.1the definition of 'ondragenter' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragexit - Web APIs
living standard html 5.1the definition of 'ondragexit' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragleave - Web APIs
living standard html 5.1the definition of 'ondragleave' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragover - Web APIs
living standard html 5.1the definition of 'ondragover' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondragstart - Web APIs
living standard html 5.1the definition of 'ondragstart' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondrop - Web APIs
living standard html 5.1the definition of 'ondrop' in that specification. recommendation initial definition ...
GlobalEventHandlers.ondurationchange - Web APIs
aleventhandlers mixin is the eventhandler for processing durationchange events. the durationchange event is fired when the duration attribute has been updated. syntax element.ondurationchange = handlerfunction; var handlerfunction = element.ondurationchange; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'ondurationchange' in that specification. living standard ...
GlobalEventHandlers.onemptied - Web APIs
s see the dom event handlers page for information on working with on... handlers. the emptied event is fired when the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it. see the emptied event documentation for more information about the event. specification specification status comment html living standardthe definition of 'onemptied' in that specification. living standard ...
GlobalEventHandlers.onended - Web APIs
ty of the globaleventhandlers mixin is the eventhandler for processing ended events. the ended event is fired when playback has stopped because the end of the media was reached. syntax element.onended = handlerfunction; var handlerfunction = element.onended; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onended' in that specification. living standard ...
GlobalEventHandlers.onerror - Web APIs
living standard ...
GlobalEventHandlers.onfocus - Web APIs
living standard ...
GlobalEventHandlers.onformdata - Web APIs
living standard ...
GlobalEventHandlers.ongotpointercapture - Web APIs
function expression. the function receives a pointerevent object as its sole argument. example function overhandler(event) { // determine the target event's gotpointercapture handler let gotcapturehandler = event.target.ongotpointercapture; } function init() { let el = document.getelementbyid('target'); el.ongotpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'ongotpointercapture' in that specification. recommendation ...
GlobalEventHandlers.oninput - Web APIs
living standard initial definition ...
GlobalEventHandlers.oninvalid - Web APIs
living standard ...
GlobalEventHandlers.onkeydown - Web APIs
argument. example this example logs the keyboardevent.code value whenever you press down a key inside the <input> element. html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeydown = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeydown' in that specification. living standard ...
GlobalEventHandlers.onkeypress - Web APIs
living standard ...
GlobalEventHandlers.onkeyup - Web APIs
sole argument. example this example logs the keyboardevent.code value whenever you release a key inside the <input> element. html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeyup = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeyup' in that specification. living standard ...
GlobalEventHandlers.onload - Web APIs
the document are in the dom, and all the images, scripts, links and sub-frames have finished loading. there are also dom events like domcontentloaded and domframecontentloaded (which can be handled using eventtarget.addeventlistener()) which are fired after the dom for the page has been constructed, but do not wait for other resources to finish loading. specifications specification status comment html living standardthe definition of 'onload' in that specification. living standard initial definition ...
GlobalEventHandlers.onloadeddata - Web APIs
e globaleventhandlers mixin is the eventhandler for processing loadeddata events. the loadeddata event is fired when the first frame of the media has finished loading. syntax element.onloadeddata = handlerfunction; var handlerfunction = element.onloadeddata; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onloadeddata' in that specification. living standard ...
GlobalEventHandlers.onloadedmetadata - Web APIs
globaleventhandlers mixin is the eventhandler for processing loadedmetadata events. the loadedmetadata event is fired when the metadata has been loaded. syntax element.onloadedmetadata = handlerfunction; var handlerfunction = element.onloadedmetadata; handlerfunction should be either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onloadedmetadata' in that specification. living standard ...
GlobalEventHandlers.onloadstart - Web APIs
living standard initial definition ...
GlobalEventHandlers.onlostpointercapture - Web APIs
tion expression. the function receives a pointerevent object as its sole argument. example function overhandler(event) { // determine the target event's lostpointercapture handler let lostcapturehandler = event.target.onlostpointercapture; } function init() { let el = document.getelementbyid('target'); el.onlostpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'onlostpointercapture' in that specification. recommendation ...
GlobalEventHandlers.onmousedown - Web APIs
living standard ...
GlobalEventHandlers.onmouseenter - Web APIs
dler for processing mouseenter events. the mouseenter event is fired when a pointing device (usually a mouse) is moved over the element that has the listener attached. syntax element.onmouseenter = handlerfunction; var handlerfunction = element.onmouseenter; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onmouseenter' in that specification. living standard ...
GlobalEventHandlers.onmouseleave - Web APIs
ndler for processing mouseleave events. the mouseleave event is fired when a pointing device (usually a mouse) is moved off the element that has the listener attached. syntax element.onmouseleave = handlerfunction; var handlerfunction = element.onmouseleave; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onmouseleave' in that specification. living standard ...
GlobalEventHandlers.onmousemove - Web APIs
living standard ...
GlobalEventHandlers.onmouseout - Web APIs
to a paragraph. try moving your mouse over and out of the element. html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specification specification status comment html living standardthe definition of 'onmouseout' in that specification. living standard ...
GlobalEventHandlers.onmouseover - Web APIs
o a paragraph. try moving your mouse over and out of the element. html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specifications specification status comment html living standardthe definition of 'onmouseover' in that specification. living standard ...
GlobalEventHandlers.onmouseup - Web APIs
living standard ...
GlobalEventHandlers.onpause - Web APIs
the onpause property of the globaleventhandlers mixin is the eventhandler for processing pause events. the pause event is fired when media playback has been paused. syntax element.onpause = handlerfunction; var handlerfunction = element.onpause; handlerfunction should be either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onpause' in that specification. living standard ...
GlobalEventHandlers.onplay - Web APIs
living standard ...
GlobalEventHandlers.onplaying - Web APIs
is the eventhandler for processing playing events. the playing event is fired when playback is ready to start after having been paused or delayed due to lack of media data. syntax element.onplaying = handlerfunction; var handlerfunction = element.onplaying; handlerfunction is either null or a javascript function specifying the handler for the event. specification specification status comment html living standardthe definition of 'onplaying' in that specification. living standard ...
GlobalEventHandlers.onpointercancel - Web APIs
> <script> function cancelhandler(ev) { // process the pointercancel event } function init() { var el = document.getelementbyid('target1'); el.onpointercancel = cancelhandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointercancel="cancelhandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointercancel' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointercancel' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerdown - Web APIs
white; background-color: blue; border: 2px solid darkblue; cursor: pointer; user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } result the resulting output is shown below. try tapping, clicking, or touching the box and see what happens. for full effect, try it with a variety of pointer types. specifications specification status comment pointer events – level 2the definition of 'onpointerdown' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerdown' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerenter - Web APIs
<html> <script> function enterhandler(ev) { // process the pointerenter event } function init() { let el = document.getelementbyid('target1'); el.onpointerenter = enterhandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointerenter="enterhandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerenter' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerenter' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerleave - Web APIs
v) { // process the pointerleave event } function init() { var el=document.getelementbyid("target1"); el.onpointerleave = leavehandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointerleave="leavehandler(event)"> touch me ... </div> </body> </html> see using pointer events for additional details. specifications specification status comment pointer events – level 2the definition of 'onpointerleave' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerleave' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointermove - Web APIs
andler. <html> <script> function movehandler(ev) { // process the pointermove event } function init() { let el=document.getelementbyid('target1'); el.onpointermove = movehandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointermove="movehandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointermove' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointermove' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerout - Web APIs
vent handler. <html> <script> function outhandler(ev) { // process the pointerout event } function init() { let el=document.getelementbyid('target1'); el.onpointerout = outhandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointerout="outhandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerout' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerout' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerover - Web APIs
dler. <html> <script> function overhandler(ev) { // process the pointerover event } function init() { let el = document.getelementbyid('target1'); el.onpointerover = overhandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointerover="overhandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerover' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerover' in that specification. obsolete initial definition ...
GlobalEventHandlers.onpointerup - Web APIs
up event handler. <html> <script> function uphandler(ev) { // process the pointerup event } function init() { let el = document.getelementbyid('target1'); el.onpointerup = uphandler; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" onpointerup="uphandler(event)"> touch me ... </div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerup' in that specification. recommendation non-stable version pointer eventsthe definition of 'onpointerup' in that specification. obsolete initial definition ...
GlobalEventHandlers.onreset - Web APIs
living standard ...
GlobalEventHandlers.onresize - Web APIs
living standard ...
GlobalEventHandlers.onscroll - Web APIs
living standard document object model (dom) level 3 events specificationthe definition of 'onscroll' in that specification. obsolete initial definition ...
GlobalEventHandlers.onselect - Web APIs
living standard ...
GlobalEventHandlers.onselectionchange - Web APIs
ionchange = functionref; value functionref is a function name or a function expression. the function receives a focusevent object as its sole argument. example let selection; document.onselectionchange = function() { console.log('new selection made'); selection = document.getselection(); }; for a full example, see our key quote generator demo. specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectionchange' in that specification. working draft initial definition. ...
GlobalEventHandlers.onselectstart - Web APIs
ke a new text selection on a webpage. syntax object.onselectstart = functionref; value functionref is a function name or a function expression. the function receives a focusevent object as its sole argument. example document.onselectstart = function() { console.log('selection started!'); }; for a full example, see our key quote generator demo. specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectstart' in that specification. working draft initial definition. ...
GlobalEventHandlers.onsubmit - Web APIs
living standard ...
GlobalEventHandlers.ontouchcancel - Web APIs
el event handler. <html> <script> function canceltouch(ev) { // process the event } function init() { let el = document.getelementbyid('target1'); el.ontouchcancel = canceltouch; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" ontouchcancel="canceltouch(event)"> touch me ... </div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version. ...
GlobalEventHandlers.ontouchend - Web APIs
set an element's touchend event handler. <html> <script> function endtouch(ev) { // process the event } function init() { var el=document.getelementbyid("target1"); el.ontouchend = endtouch; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" ontouchend="endtouch(event)"> touch me ... </div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version. ...
GlobalEventHandlers.ontouchmove - Web APIs
ove event handler. <html> <head> <script> function movetouch(ev) { // process the event } function init() { var el=document.getelementbyid("target1"); el.ontouchmove = movetouch; } </script> </head> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" ontouchmove="movetouch(event)"> touch me ... </div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version. ...
GlobalEventHandlers.ontouchstart - Web APIs
chstart event handler. <html> <script> function starttouch(ev) { // process the event } function init() { let el = document.getelementbyid('target1'); el.ontouchstart = starttouch; } </script> <body onload="init();"> <div id="target1"> touch me ... </div> <div id="target2" ontouchstart="starttouch(event)"> touch me ... </div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version. ...
GlobalEventHandlers.ontransitioncancel - Web APIs
working draft ...
GlobalEventHandlers.ontransitionend - Web APIs
n the transition begins and ends. let box = document.queryselector(".box"); box.ontransitionrun = function(event) { box.innerhtml = "zooming..."; } box.ontransitionend = function(event) { box.innerhtml = "done!"; } result the resulting content looks like this: notice what happens when you hover your mouse cursor over the box, then move it away. specification specification status comment css transitionsthe definition of 'ontransitionend' in that specification. working draft ...
GlobalEventHandlers.onwheel - Web APIs
living standard ...
GlobalEventHandlers - Web APIs
ough not nessarilty started. globaleventhandlers.ontransitionstart an eventhandler called when a transitionstart event is sent, indicating that a css transition has started transitioning. globaleventhandlers.onwaiting is an eventhandler representing the code to be called when the waiting event is raised. methods this interface defines no methods. specifications specification status comment selection apithe definition of 'extension to globaleventhandlers' in that specification. working draft adds onselectionchange. pointer lockthe definition of 'extension of document' in that specification. candidate recommendation adds onpointerlockchange and onpointerlockerror on document. it is experimentally implemented on globaleventhandlers. ...
Gyroscope.Gyroscope() - Web APIs
e should be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. gyroscopethe definition of 'gyroscope' in that specification. candidate recommendation ...
Gyroscope.x - Web APIs
Web › API › Gyroscope › x
low this occurs sixty times a second. let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. gyroscopethe definition of 'x' in that specification. candidate recommendation ...
Gyroscope.y - Web APIs
Web › API › Gyroscope › y
low this occurs sixty times a second. let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. gyroscopethe definition of 'y' in that specification. candidate recommendation ...
Gyroscope.z - Web APIs
Web › API › Gyroscope › z
low this occurs sixty times a second. let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. gyroscopethe definition of 'z' in that specification. candidate recommendation ...
Gyroscope - Web APIs
Web › API › Gyroscope
low this occurs sixty times a second. let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. gyroscopethe definition of 'gyroscope' in that specification. candidate recommendation initial definition. ...
HTMLAnchorElement.download - Web APIs
efault file name for use in labeling the resource in a local file system. if the name is not a valid file name in the underlying os, the browser will adjust it. note: this value might not be used for download. this value cannot be used to determine whether the download will occur. syntax var dnload = anchorelt.download; anchorelt.download = dnload; specifications specification status comment html living standardthe definition of 'download' in that specification. living standard initial definition. ...
HTMLAnchorElement.referrerPolicy - Web APIs
using tls. examples var elt = document.createelement("a"); var linktext = document.createtextnode("my link"); elt.appendchild(linktext); elt.href = "https://developer.mozilla.org/"; elt.referrerpolicy = "no-referrer"; var div = document.getelementbyid("divaround"); div.appendchild(elt); // when clicked, the link will not send a referrer header. specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull requ...
HTMLAnchorElement.rel - Web APIs
parated list of link types indicating the relationship between the resource represented by the <a> element and the current document. syntax var relstr = anchorelt.rel; anchorelt.rel = relstr; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { alert("rel: " + anchors[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification. living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification. obsolete no change from document object model (dom) level 1 specification document object m...
HTMLAnchorElement.relList - Web APIs
living standard initial definition. ...
HTMLAnchorElement - Web APIs
element. htmlhyperlinkelementutils.tostring() returns a usvstring containing the whole url. it is a synonym for htmlhyperlinkelementutils.href, though it can't be used to modify the value. the blur() and focus() methods are inherited from htmlelement from html5 on, but were defined on htmlanchorelement in dom level 2 html and earlier specifications. specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification. living standard the following property has been added: download. technically, the url-related properties, media, host, hostname, pathname, port, protocol, search, and hash, have been moved to the htmlhyperlinkelementutils mixin, and htmlanchorelement implements this mixin. html5...
HTMLAreaElement.referrerPolicy - Web APIs
ht="100" src="/img/logo@2x.png" /> <map id="mymap" name="maparound" />> var elt = document.createelement("area"); elt.href = "/img2.png"; elt.shape = "rect"; elt.referrerpolicy = "no-referrer"; elt.coords = "0,0,100,100"; var map = document.getelementbyid("mymap"); map.appendchild(elt); // when clicked, the area's link will not send a referrer header. specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull requ...
HTMLAreaElement.rel - Web APIs
e-separated list of link types indicating the relationship between the resource represented by the <area> element and the current document. syntax var relstr = areaelt.rel; areaelt.rel = relstr; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { alert("rel: " + areas[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification. living standard initial definition ...
HTMLAreaElement.relList - Web APIs
list can be changed. syntax var relstr = areaelt.rellist; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { var list = areas[i].rellist; var listlength = list.length; console.log("new area found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification. living standard initial definition. ...
HTMLAreaElement - Web APIs
usvstring containing the username specified before the domain name. methods inherits methods from its parent, htmlelement, and implements those from htmlhyperlinkelementutils. htmlhyperlinkelementutils.tostring() returns a usvstring containing the whole url of the script executed in the worker. it is a synonym for htmlhyperlinkelementutils.href. specifications specification status comment html living standardthe definition of 'htmlareaelement' in that specification. living standard the following property has been added: download. technically, the url-related properties, media, host, hostname, pathname, port, protocol, search, and hash, have been moving to the htmlhyperlinkelementutils mixin, and htmlareaelement implements this mixin. html5the...
Audio() - Web APIs
living standard ...
HTMLAudioElement - Web APIs
', () => { let duration = audioelement.duration; // the duration variable now holds the duration (in seconds) of the audio clip }) events inherits methods from its parent, htmlmediaelement, and from its ancestor htmlelement. listen to events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. specifications specification status comment html living standardthe definition of 'htmlaudioelement' in that specification. living standard html5the definition of 'htmlaudioelement' in that specification. recommendation ...
HTMLBRElement - Web APIs
nment-baseline="middle">htmlbrelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlbrelement.clear is a domstring indicating the flow of text around floating objects. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlbrelement' in that specification. living standard no change from html5 html5the definition of 'htmlbrelement' in that specification. recommendation no change from document object model (dom) level 2 html specification ...
HTMLBaseElement - Web APIs
he href html attribute, containing a base url for relative urls in the document. htmlbaseelement.target is a domstring that reflects the target html attribute, containing a default target browsing context or frame for elements that do not have a target reference specified. methods no specific method; inherits attributes from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlbaseelement' in that specification. living standard html 5.1the definition of 'htmlbaseelement' in that specification. recommendation no change from html5 html5the definition of 'htmlbaseelement' in that specification. recommendation no change from document object model (dom) level 2 html specific...
HTMLBaseFontElement - Web APIs
proportional or fixed-width font for that system. htmlbasefontelement.size is a domstring representing the font size as either a numeric or relative value. numeric values range from 1 to 7 with 1 being the smallest and 3 the default. relative value starts with a '+' or a '-'. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment document object model (dom) level 2 html specificationthe definition of 'htmlbasefontelement' in that specification. obsolete no change document object model (dom) level 1 specificationthe definition of 'htmlbasefontelement' in that specification. obsolete initial definition ...
HTMLBodyElement - Web APIs
the storage event is raised. windoweventhandlers.onunhandledrejection an eventhandler representing the code executed when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.onunload is an eventhandler representing the code to be called when the unload event is raised. specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification. living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers. htmlbo...
HTMLButtonElement.labels - Web APIs
living standard initial definition ...
HTMLButtonElement - Web APIs
ported for reset or button elements. reportvalidity() boolean not supported for reset or button elements. setcustomvalidity(in domstring error) void not supported for reset or button elements. with gecko-based browser, use the :-moz-submit-invalid pseudo-class to style submit buttons based on the validation of a form. specifications specification status comment html living standardthe definition of 'htmlbuttonelement' in that specification. living standard html 5.2the definition of 'htmlbuttonelement' in that specification. recommendation the menu attribute and type="menu" value have been removed. html 5.1the definition of 'htmlbuttonelement' in that specification. recommendation the following...
HTMLCanvasElement.captureStream() - Web APIs
merate is negative. example // find the canvas element to capture var canvaselt = document.queryselector('canvas'); // get the stream var stream = canvaselt.capturestream(25); // 25 fps // do things to the stream // e.g. send it to another computer using an rtcpeerconnection // pc is an rtcpeerconnection created elsewhere pc.addstream(stream); specifications specification status comment media capture from dom elementsthe definition of 'htmlcanvaselement.capturestream()' in that specification. working draft initial definition ...
HTMLCanvasElement.getContext() - Web APIs
anvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get a 2d context of the canvas with the following code: var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); console.log(ctx); // canvasrenderingcontext2d { ... } now you have the 2d rendering context for a canvas and you can draw within it. specifications specification status comment html living standardthe definition of 'htmlcanvaselement.getcontext' in that specification. living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.getcontext' in that specification. recommendation html5the definition of 'htmlcanvaselement.getcontext' in that specification. recommendation snap...
HTMLCanvasElement.height - Web APIs
vaselement.width, that controls the size of the canvas. syntax var pxl = canvas.height; canvas.height = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the height of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.height); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.height' in that specification. living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.height' in that specification. recommendation html5the definition of 'htmlcanvaselement.height' in that specification. recommendation snapshot of the...
HTMLCanvasElement.toBlob() - Web APIs
living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.toblob' in that specification. recommendation no change html5the definition of 'htmlcanvaselement.toblob' in that specification. recommendation snapsho...
HTMLCanvasElement.toDataURL() - Web APIs
living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.todataurl' in that specification. recommendation html5the definition of 'htmlcanvaselement.todataurl' in that specification. recommendation snapsho...
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
nvaselement.transfercontroltooffscreen() return value an offscreencanvas object. examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ... some drawing using the gl context ... // push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.transfercontroltooffscreen()' in that specification. living standard ...
HTMLCanvasElement: webglcontextlost event - Web APIs
recommendation initial definition. ...
HTMLCanvasElement: webglcontextrestored event - Web APIs
recommendation initial definition. ...
HTMLCanvasElement.width - Web APIs
canvaselement.height, that controls the size of the canvas. syntax var pxl = canvas.width; canvas.width = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the width of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.width); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.width' in that specification. living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.width' in that specification. recommendation html5the definition of 'htmlcanvaselement.width' in that specification. recommendation snapshot of the ht...
HTMLCanvasElement - Web APIs
ebglrenderingcontext or webgl2renderingcontext context. webglcontextlost fired if the user agent detects that the drawing buffer associated with a webglrenderingcontext or webgl2renderingcontext object has been lost. webglcontextrestored fired if the user agent restores the drawing buffer for a webglrenderingcontext or webgl2renderingcontext object. specifications specification status comment html living standardthe definition of 'htmlcanvaselement' in that specification. living standard primary definition of htmlcanvaselement. media capture from dom elementsthe definition of 'htmlcanvaselement' in that specification. working draft adds the method capturestream(). ...
HTMLCollection - Web APIs
living standard ...
HTMLDListElement - Web APIs
middle">htmldlistelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmldlistelement.compact is a boolean indicating that spacing between list items should be reduced. methods no specific methods; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmldlistelement' in that specification. living standard html5the definition of 'htmldlistelement' in that specification. recommendation no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'htmldlistelement' in that s...
HTMLDataElement.value - Web APIs
the value property of the htmldataelement interface returns a domstring reflecting the value html attribute. syntax var avalue = htmldataelement.value htmldataelement.value = avalue value a domstring. specifications specification status comment html living standardthe definition of 'htmldataelement.value' in that specification. living standard html5the definition of 'value' in that specification. recommendation ...
HTMLDataElement - Web APIs
></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmldataelement.value is a domstring reflecting the value html attribute, containing a machine-readable form of the element's value. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmldataelement' in that specification. living standard html5the definition of 'htmldataelement' in that specification. recommendation ...
HTMLDataListElement - Web APIs
living standard html5the definition of 'htmldatalistelement' in that specification. recommendation initial definition ...
HTMLDetailsElement: toggle event - Web APIs
living standard ...
HTMLDetailsElement - Web APIs
tents (not counting the <summary>) is to be shown to the user. methods no specific method; inherits methods from its parent, htmlelement. events listen to this event using addeventlistener() or by assigning an event listener to the oneventname property of this interface. toggle fired when the open/closed state of a <details> element is toggled. specifications specification status comment html living standardthe definition of 'htmldetailselement' in that specification. candidate recommendation ...
HTMLDialogElement: cancel event - Web APIs
living standard ...
HTMLDialogElement.close() - Web APIs
living standard html 5.1the definition of 'close()' in that specification. recommendation ...
HTMLDialogElement: close event - Web APIs
living standard ...
HTMLDialogElement.open - Web APIs
living standard html 5.1the definition of 'open' in that specification. recommendation ...
HTMLDialogElement.returnValue - Web APIs
living standard html 5.1the definition of 'returnvalue' in that specification. recommendation ...
HTMLDialogElement.show() - Web APIs
living standard html 5.1the definition of 'show()' in that specification. recommendation ...
HTMLDialogElement.showModal() - Web APIs
living standard html 5.1the definition of 'showmodal()' in that specification. recommendation ...
HTMLDialogElement - Web APIs
living standard html 5.2the definition of '<dialog>' in that specification. recommendation initial definition ...
HTMLDivElement - Web APIs
erits properties from its parent, htmlelement. htmldivelement.align is a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", "justify", and "center". methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmldivelement' in that specification. living standard html5the definition of 'htmldivelement' in that specification. recommendation no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'htmldivelement' in that specifi...
accessKeyLabel - Web APIs
living standard no change from initial definition. html 5.1 recommendation removed. pull w3c/html#144, issue w3c/html#99, wicg discussion. html5the definition of 'htmlelement.accesskeylabel' in that specification. recommendation snapshot of html liv...
HTMLElement: animationcancel event - Web APIs
pplyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
pplyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationiteration event - Web APIs
pplyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
pplyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: beforeinput event - Web APIs
the new one applied to the <input> element. html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('beforeinput', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status ui eventsthe definition of 'beforeinput event' in that specification. working draft ...
HTMLElement: change event - Web APIs
w, and then click somewhere else to trigger the event. html <input placeholder="enter some text" name="name"/> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.addeventlistener('change', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'change' in that specification. living standard ...
HTMLElement.click() - Web APIs
Web › API › HTMLElement › click
s. syntax element.click() example simulate a mouse-click when moving the mouse pointer over a checkbox: html <form> <input type="checkbox" id="mycheck" onmouseover="myfunction()" onclick="alert('click event occured')"> </form> javascript // on mouse-over, execute myfunction function myfunction() { document.getelementbyid("mycheck").click(); } specification specification status comment html living standard living standard document object model (dom) level 2 html specification obsolete initial definition. ...
HTMLElement.contentEditable - Web APIs
the contenteditable property of the htmlelement interface specifies whether or not the element is editable. this enumerated attribute can have the following values: 'true' indicates that the element is contenteditable. 'false' indicates that the element cannot be edited. 'inherit' indicates that the element inherits its parent's editable status. you can use the htmlelement.iscontenteditable property to test the computed boolean value of this property. syntax editable = element.contenteditable element.contenteditable = 'true' specifications specification status comment html living standardthe definition of 'contenteditable' in that specification. living standard initial definition ...
HTMLElement.dir - Web APIs
Web › API › HTMLElement › dir
riting direction value. possible values for dir are ltr, for left-to-right, rtl, for right-to-left, and auto for specifying that the direction of the element must be determined based on the contents of the element. example var parg = document.getelementbyid("para1"); parg.dir = "rtl"; // change the text direction on a paragraph identified as "para1" specifications specification status comment html living standardthe definition of 'dir' in that specification. living standard no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'dir' in that specification. obsolete no change from document object model (dom) level 1 specification. document object...
HTMLElement: gotpointercapture event - Web APIs
wn', (event) => { para.setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); para.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
HTMLElement.hidden - Web APIs
me!</p> </div> css the content is styled using the css below. .panel { font: 16px "open sans", helvetica, arial, sans-serif; border: 1px solid #22d; padding: 12px; width: 500px; text-align: center; } .button { font: 22px "open sans", helvetica, arial, sans-serif; padding: 5px 36px; } h1 { margin-top: 0; font-size: 175%; } result specifications specification status comment html living standardthe definition of 'htmlelement.hidden' in that specification. living standard html 5.1the definition of 'htmlelement.hidden' in that specification. recommendation html5the definition of 'htmlelement.hidden' in that specification. recommendation ...
HTMLElement.innerText - Web APIs
living standard introduced, based on the draft of the innertext specification. see whatwg/html#465 and whatwg/compat#5 for history. ...
HTMLElement: input event - Web APIs
ever you change the value of the <input> element. html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('input', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'input event' in that specification. living standard document object model (dom) level 3 events specificationthe definition of 'input event' in that specification. obsolete ...
HTMLElement.isContentEditable - Web APIs
living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'htmlelement.contenteditable' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.contentedita...
HTMLElement.lang - Web APIs
Web › API › HTMLElement › lang
in which the text of the current element is written. example // this snippet compares the base language and // redirects to another url based on language if (document.documentelement.lang === "en") { window.location.href = "some_document.html.en"; } else if (document.documentelement.lang === "ru") { window.location.href = "some_document.html.ru"; } specification specification status comment document object model (dom) level 2 html specificationthe definition of 'lang' in that specification. obsolete ...
HTMLElement: lostpointercapture event - Web APIs
vent) => { para.setpointercapture(event.pointerid); }); the same example, but using the onlostpointercapture event handler property: const para = document.queryselector('p'); para.onlostpointercapture = () => { console.log('i\'ve been released!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
HTMLElement.offsetHeight - Web APIs
fsetheight which fits on the window. however, non-scrollable elements may have large offsetheight values, much larger than the visible content. these elements are typically contained within scrollable elements; consequently, these non-scrollable elements may be completely or partly invisible, depending on the scrolltop setting of the scrollable container. specification specification status comment css object model (cssom) view modulethe definition of 'offsetheight' in that specification. working draft notes offsetheight is a property of the dhtml object model which was first introduced by msie. it is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box height. ...
HTMLElement.offsetLeft - Web APIs
working draft ...
HTMLElement.offsetParent - Web APIs
rty set to none. the element has the position property set to fixed (firefox returns <body>). the element is <body> or <html>. offsetparent is useful because offsettop and offsetleft are relative to its padding edge. syntax parentobj = element.offsetparent; parentobj is an object reference to the element in which the current element is offset. specification specification status comment css object model (cssom) view modulethe definition of 'offsetparent' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
HTMLElement.offsetTop - Web APIs
elative to the top of the offsetparent node. syntax toppos = element.offsettop; parameters toppos is the number of pixels from the top of the closest relatively positioned parent element. example var d = document.getelementbyid("div1"); var toppos = d.offsettop; if (toppos > 10) { // object is offset more // than 10 pixels from its parent } specification specification status comment css object model (cssom) view modulethe definition of 'offsettop' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxin...
HTMLElement.offsetWidth - Web APIs
is returned. syntax var intelemoffsetwidth = element.offsetwidth; intelemoffsetwidth is a variable storing an integer corresponding to the offsetwidth pixel value of the element. the offsetwidth property is a read-only. this property will round the value to an integer. if you need a fractional value, use element.getboundingclientrect(). example specification specification status comment css object model (cssom) view modulethe definition of 'offsetwidth' in that specification. working draft notes offsetwidth is a property of the dhtml object model which was first introduced by msie. it is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box width. ...
HTMLElement: pointercancel event - Web APIs
examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointercancel', (event) => { console.log('pointer event cancelled'); }); using the onpointercancel event handler property: const para = document.queryselector('p'); para.onpointercancel = (event) => { console.log('pointer event cancelled'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerdown event - Web APIs
pointerdown examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerdown', (event) => { console.log('pointer down event'); }); using the onpointerdown event handler property: const para = document.queryselector('p'); para.onpointerdown = (event) => { console.log('pointer down event'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerenter event - Web APIs
examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerenter', (event) => { console.log('pointer entered element'); }); using the onpointerenter event handler property: const para = document.queryselector('p'); para.onpointerenter = (event) => { console.log('pointer entered element'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerleave event - Web APIs
eave examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerleave', (event) => { console.log('pointer left element'); }); using the onpointerleave event handler property: const para = document.queryselector('p'); para.onpointerleave = (event) => { console.log('pointer left element'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointermove event - Web APIs
dler for pointermove events using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointermove', (event) => { console.log('pointer moved'); }); you can also use the onpointermove event handler property: const para = document.queryselector('p'); para.onpointermove = (event) => { console.log('pointer moved'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerout event - Web APIs
onpointerout examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerout', (event) => { console.log('pointer moved out'); }); using the onpointerout event handler property: const para = document.queryselector('p'); para.onpointerout = (event) => { console.log('pointer moved out'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerover event - Web APIs
onpointerover examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerover', (event) => { console.log('pointer moved in'); }); using the onpointerover event handler property: const para = document.queryselector('p'); para.onpointerover = (event) => { console.log('pointer moved in'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerup event - Web APIs
t handler property onpointerup examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerup', (event) => { console.log('pointer up'); }); using the onpointerup event handler property: const para = document.queryselector('p'); para.onpointerup = (event) => { console.log('pointer up'); }; specifications specification status pointer events obsolete ...
HTMLElement.title - Web APIs
Web › API › HTMLElement › title
e property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node. syntax var str = element.title; element.title = str; example const link = document.createelement('a'); link.innertext = 'grapes'; link.href = 'https://en.wikipedia.org/wiki/grape'; link.title = 'wikipedia page on grapes'; specifications specification status comment html living standardthe definition of 'title' in that specification. living standard no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'title' in that specification. obsolete no change from document object model (dom) level 1 specification. document ob...
HTMLElement: transitioncancel event - Web APIs
he transition is cancelled in either direction after the transitionrun event occurs and before the transitionend is fired. if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired. if the transitioncancel event is fired, the transitionend event will not fire. specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification. working draft initial definition. ...
HTMLElement: transitionend event - Web APIs
event is fired in both directions: when the box finishes turning and the opacity hits 0 or 1, depending on the direction. if there is no transition delay or duration, if both are 0s or neither is declared, there is no transition, and none of the transition events are fired. if the transitioncancel event is fired, the transitionend event will not fire. specifications specification status comment css transitionsthe definition of 'transitionend' in that specification. working draft initial definition. ...
HTMLElement: transitionrun event - Web APIs
transition is created (i.e. at the start of any delay). transitionstart fires when the actual animation has begun (i.e. at the end of any delay). the transitionrun will occur even if the transition is canceled before the delay expires. if there is no transition delay or if transition-delay is negative, both transitionrun and transitionstart are fired. specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification. working draft ...
HTMLElement: transitionstart event - Web APIs
working draft initial definition. ...
HTMLElement - Web APIs
ncel property. transitionend fired when a css transition has completed. also available via the ontransitionend property. transitionrun fired when a css transition is first created. also available via the ontransitionrun property. transitionstart fired when a css transition has actually started. also available via the ontransitionstart property. specifications specification status comment css object model (cssom) view modulethe definition of 'htmlelement' in that specification. working draft added the following properties: offsetparent, offsettop, offsetleft, offsetwidth, and offsetheight. html living standardthe definition of 'htmlelement' in that specification. living standard added the following properties: translate, itemscope, item...
HTMLEmbedElement - Web APIs
aining the address of the resource. htmlembedelement.type is a domstring that reflects the type html attribute, containing the type of the resource. htmlembedelement.width is a domstring that reflects the width html attribute, containing the displayed width of the resource. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlembedelement' in that specification. living standard adds two obsolete properties, name and align, to help with compatibility with old web sites. html5the definition of 'htmlembedelement' in that specification. recommendation initial definition. ...
HTMLFieldSetElement - Web APIs
on. htmlfieldsetelement.reportvalidity() always returns true because <fieldset> objects are never candidates for constraint validation. htmlfieldsetelement.setcustomvalidity() sets a custom validity message for the field set. if this message is not the empty string, then the field set is suffering from a custom validity error, and does not validate. specifications specification status comment html living standardthe definition of 'htmlfieldsetelement' in that specification. living standard html 5.1the definition of 'htmlfieldsetelement' in that specification. recommendation html5the definition of 'htmlfieldsetelement' in that specification. recommendation the following properties have been added: disabled, elements, name, t...
HTMLFormControlsCollection.namedItem() - Web APIs
= collection.nameditem(str); var item = collection[str]; parameters str is a domstring return value item is a radionodelist , element, or null. example html <form> <input id="my-form-control" type="textarea"> </form> javascript // returns the htmlinputelement representing #my-form-control elem1 = document.forms[0]['my-form-control']; specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection.nameditem()' in that specification. living standard html5the definition of 'htmlformcontrolscollection' in that specification. recommendation in this snapshot of html living standard, the htmlformcontrolscollections is defined for the first time. ...
HTMLFormControlsCollection - Web APIs
s the radionodelist or the element in the collection whose name or id matches the specified name, or null if no nodes match. note that this version of nameditem() hide the one inherited from htmlcollection. like that one, in javascript, using the array bracket syntax with a string, like collection["value"] is equivalent to collection.nameditem("value"). specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection' in that specification. living standard no change since the last snapshot, html5. html5the definition of 'htmlformcontrolscollection' in that specification. recommendation in this snapshot of html living standard, the htmlformcontrolscollections is defined for the first time. ...
HTMLFormElement.acceptCharset - Web APIs
the htmlformelement.acceptcharset property represents a list of the supported character encodings for the given <form> element. this list can be comma-separated or space-separated. syntax var string = form.acceptcharset; form.acceptcharset = string; example inputs = document.forms['myform'].acceptcharset; specifications specification status comment html living standardthe definition of 'htmlformelement: acceptcharset' in that specification. living standard ...
HTMLFormElement.action - Web APIs
the htmlformelement.action property represents the action of the <form> element. the action of a form is the program that is executed on the server when the form is submitted. this property can be retrieved or set. syntax var string = form.action; form.action = string; example form.action = '/cgi-bin/publish'; specifications specification status comment html living standardthe definition of 'htmlformelement: action' in that specification. living standard ...
HTMLFormElement.elements - Web APIs
living standard document object model (dom) level 2 html specificationthe definition of 'htmlformelement.elements' in that specification. obsolete initial definition ...
HTMLFormElement.enctype - Web APIs
default type. multipart/form-data: the type that allows file <input> element(s) to upload file data. text/plain: a type introduced in html5. this value can be overridden by a formenctype attribute on a <button> or <input> element. syntax var string = form.enctype; form.enctype = string; example form.enctype = 'application/x-www-form-urlencoded'; specifications specification status comment html living standardthe definition of 'htmlformelement: enctype' in that specification. living standard ...
HTMLFormElement: formdata event - Web APIs
unknown ...
HTMLFormElement.length - Web APIs
important when processing forms. syntax numcontrols = form.length; value numcontrols is the number of form controls within the <form>. this is the same as the number of the elements in the htmlformcontrolscollection returned by the elements property. example if (document.getelementbyid('form1').length > 1) { // more than one form control here } specifications specification status comment html living standardthe definition of 'htmlformelement: length' in that specification. living standard ...
HTMLFormElement.method - Web APIs
thod used to submit the <form>. unless explicitly specified, the default method is 'get'. syntax var string = form.method; form.method = string; example document.forms['myform'].method = 'post'; const formelement = document.createelement("form"); // create a form document.body.appendchild(formelement); console.log(formelement.method); // 'get' specifications specification status comment html living standardthe definition of 'htmlformelement: method' in that specification. living standard ...
HTMLFormElement.name - Web APIs
rnet explorer (ie) does not allow the name attribute of an element created using createelement() to be set or modified using the name property. syntax var string = form.name; form.name = string; example var form1name = document.getelementbyid('form1').name; if (form1name != document.form.form1) { // browser doesn't support this form of reference } specifications specification status comment html living standardthe definition of 'htmlformelement: name' in that specification. living standard ...
HTMLFormElement.reportValidity() - Web APIs
ir validation constraints. when false is returned, cancelable invalid events are fired for each invalid child and validation problems are reported to the user. syntax htmlformelement.reportvalidity() return value boolean example document.forms['myform'].addeventlistener('submit', function() { document.forms['myform'].reportvalidity(); }, false); specifications specification status comment html living standardthe definition of 'htmlformelement.reportvalidity()' in that specification. living standard html 5.1the definition of 'htmlformelement.reportvalidity()' in that specification. recommendation initial definition ...
HTMLFormElement.requestSubmit() - Web APIs
estsubmit() isn't available, this code falls back to calling the form's submit() method. let myform = document.queryselector("form"); let submitbutton = myform.queryselector("#main-submit"); if (myform.requestsubmit) { if (submitbutton) { myform.requestsubmit(submitbutton); } else { myform.requestsubmit(); } } else { myform.submit(); } specifications specification status comment html living standardthe definition of 'requestsubmit()' in that specification. living standard ...
HTMLFormElement.reset() - Web APIs
lement's default values. this method does the same thing as clicking the form's reset button. if a form control (such as a reset button) has a name or id of reset it will mask the form's reset method. it does not reset other attributes in the input, such as disabled. syntax htmlformelement.reset() example document.getelementbyid('myform').reset(); specifications specification status comment html living standardthe definition of 'htmlformelement: reset' in that specification. living standard ...
HTMLFormElement: reset event - Web APIs
working draft no change html 5.2the definition of 'reset' in that specification. recommendation no change html 5.1the definition of 'reset' in that specification. recommendation added info that the event is not trusted. html5the definition of 'reset' in that sp...
HTMLFormElement.submit() - Web APIs
submit button) has a name or id of submit, this method will mask the form's submit method. <input> with attribute type="submit" will not be submitted with the form when using htmlformelement.submit(), but it would be submitted when you do it with original html form submit. syntax htmlformelement.submit() example document.forms["myform"].submit(); specifications specification status comment html living standardthe definition of 'htmlformelement: submit' in that specification. living standard ...
HTMLFormElement: submit event - Web APIs
working draft no change html 5.2the definition of 'submit' in that specification. recommendation no change html 5.1the definition of 'submit' in that specification. recommendation no change html5the definition of 'submit' in that specification. recommendati...
HTMLFormElement.target - Web APIs
the target property of the htmlformelement interface represents the target of the form's action (i.e., the frame in which to render its output). syntax string = htmlformelement.target htmlformelement.target = string example myform.target = document.frames[1].name; specifications specification status comment html living standardthe definition of 'htmlformelement: target' in that specification. living standard ...
HTMLFormElement - Web APIs
ve 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. specifications specification status comment html living standardthe definition of 'htmlformelement' in that specification. living standard the following method has been added: requestautocomplete(). html5the definition of 'htmlformelement' in that specification. recommendation the elements properties returns an htmlformcontrolscollection instead of a raw htmlcollection. this is mainly a technica...
HTMLFrameSetElement - Web APIs
windoweventhandlers.onresize is an eventhandler representing the code to be called when the resize event is raised. windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised. windoweventhandlers.onunload is an eventhandler representing the code to be called when the unload event is raised. specifications specification status comment html living standardthe definition of 'htmlframesetelement' in that specification. living standard from the html5 snapshot, the windoweventhandlers interface now have a onlanguagechange property. html5the definition of 'htmlframesetelement' in that specification. recommendation snapshot of a previous html living standard frames are now obsolete. implem...
HTMLHRElement - Web APIs
the name of the color of the rule. htmlhrelement.noshade is a boolean that sets the rule to have no shading. htmlhrelement.size is a domstring representing the height of the rule. htmlhrelement.width is a domstring representing the width of the rule on the page. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlhrelement' in that specification. living standard the color property has been added, as an obsolete property, to increase compatibility with the existing web. html5the definition of 'htmlhrelement' in that specification. recommendation following properties are now obsolete: align, noshade, size, and width. ...
HTMLHeadElement - Web APIs
lement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlheadelement.profile is a domstring representing the uris of one or more metadata profiles (white space separated). methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlheadelement' in that specification. living standard html 5.1the definition of 'htmlheadelement' in that specification. recommendation no change from html5. html5the definition of 'htmlheadelement' in that specification. recommendation the following property has been removed: profile. docu...
HTMLHeadingElement - Web APIs
s inherits properties from its parent, htmlelement. htmlheadingelement.align is a domstring representing an enumerated attribute indicating alignment of the heading with respect to the surrounding context. the possible values are "left", "right", "justify", and "center". methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlheadingelement' in that specification. living standard html5the definition of 'htmlheadingelement' in that specification. recommendation the align property is now obsolete. document object model (dom) level 2 html specificationthe definition of 'htmlheadingelement' in that specification. obsolete n...
HTMLHtmlElement - Web APIs
ies inherits properties from its parent, htmlelement. htmlhtmlelement.version is a domstring representing the version of the html document type definition (dtd) that governs this document. this property should not be used any more as it is non-conforming. simply omit it. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlhtmlelement' in that specification. living standard html 5.1the definition of 'htmlhtmlelement' in that specification. recommendation no change since the last snapshot html5the definition of 'htmlhtmlelement' in that specification. recommendation the version element has been removed, as it is non-...
HTMLHyperlinkElementUtils.hash - Web APIs
e url does not have a fragment identifier, this property contains an empty string, "". syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/htmlhyperlinkelementutils.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hash' in that specification. living standard initial definition ...
HTMLHyperlinkElementUtils.host - Web APIs
living standard initial definition ...
HTMLHyperlinkElementUtils.hostname - Web APIs
containing the domain of the url. syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hostname' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.href - Web APIs
pdated. syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/htmlhyperlinkelementutils/href' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.href' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.origin - Web APIs
pendant; for url using the blob: scheme, the origin of the url following blob:. e.g "blob:https://mozilla.org" will have "https://mozilla.org". note: this feature is available in web workers. syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.origin' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.password - Web APIs
he username property, it silently fails. syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.password' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.pathname - Web APIs
e is no path). syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/htmlhyperlinkelementutils.pathname' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.pathname' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.port - Web APIs
does not contain an explicit port number, it will be set to ''. syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/htmlhyperlinkelementutils.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.port' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.protocol - Web APIs
protocol scheme of the url, including the final ':'. syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.protocol' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils.search - Web APIs
living standard initial definition. ...
HTMLHyperlinkElementUtils.toString() - Web APIs
syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring' specifications specification status comment html living standard living standard ...
HTMLHyperlinkElementUtils.username - Web APIs
name specified before the domain name. syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.username' in that specification. living standard initial definition. ...
HTMLHyperlinkElementUtils - Web APIs
this returns a usvstring containing the origin of the url (that is its scheme, its domain and its port). methods note: this interface doesn't inherit any method. htmlhyperlinkelementutils.tostring() this returns a usvstring containing the whole url. it is a synonym for htmlhyperlinkelementutils.href, though it can't be used to modify the value. specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils' in that specification. living standard initial definition ...
HTMLIFrameElement.allowPaymentRequest - Web APIs
candidate recommendation adds allowpaymentrequest property. ...
contentDocument - Web APIs
iframe's parent document are same origin, returns a document (that is, the active document in the inline frame's nested browsing context), else returns null. example of contentdocument var iframedocument = document.getelementsbytagname("iframe")[0].contentdocument; iframedocument.body.style.backgroundcolor = "blue"; // this would turn the iframe blue. specifications specification status comment html living standardthe definition of 'htmliframeelement: contentdocument' in that specification. living standard ...
HTMLIFrameElement.contentWindow - Web APIs
nternal dom. this attribute is read-only, but its properties can be manipulated like the global window object. example of contentwindow var x = document.getelementsbytagname("iframe")[0].contentwindow; //x = window.frames[0]; x.document.getelementsbytagname("body")[0].style.backgroundcolor = "blue"; // this would turn the 1st iframe in document blue. specifications specification status comment html living standardthe definition of 'htmliframeelement: contentwindow' in that specification. living standard ...
HTMLIFrameElement.csp - Web APIs
working draft initial definition. ...
HTMLIFrameElement.featurePolicy - Web APIs
...
HTMLIFrameElement.referrerPolicy - Web APIs
aths from tls-protected resources to insecure origins. carefully consider the impact of this setting. examples var iframe = document.createelement("iframe"); iframe.src = "/"; iframe.referrerpolicy = "unsafe-url"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy attribute. html living standardthe definition of 'htmliframeelement: referrerpolicy' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured...
HTMLIFrameElement.src - Web APIs
te of the <iframe> element defining which referrer is sent when fetching the resource. syntax refstr = iframeelt.src; iframeelt.src= refstr; example var iframe = document.createelement("iframe"); iframe.src = "/"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment html living standardthe definition of 'htmliframeelement: src' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
srcdoc - Web APIs
the srcdoc property of the htmliframeelement specifies the content of the page. examples var iframe = document.createelement("iframe"); iframe.srcdoc = `<!doctype html><p>hello world!</p>`; document.body.appendchild(iframe); specifications specification status comment html living standardthe definition of 'htmliframeelement: srcdoc' in that specification. living standard ...
HTMLIFrameElement - Web APIs
e in firefox (from version 65), chromium-based browsers, and safari/ios. htmliframeelement.srcdoc is a domstring that represents the content to display in the frame. htmliframeelement.width is a domstring that reflects the width html attribute, indicating the width of the frame. methods inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmliframeelement' in that specification. living standard the following property has been added: allowfullscreen. html5the definition of 'htmliframeelement' in that specification. recommendation the following properties are now obsolete: scrolling, marginwidth, marginheight, longdesc, frameborder, and align. the f...
Image() - Web APIs
ement.naturalheight. if no size is specified in the constructor both pairs of properties have the same values. examples var myimage = new image(100, 200); myimage.src = 'picture.jpg'; document.body.appendchild(myimage); this would be the equivalent of defining the following html tag inside the <body>: <img width="100" height="200" src="picture.jpg"> specifications specification status comment html living standardthe definition of 'image()' in that specification. living standard ...
HTMLImageElement.align - Web APIs
he css float property, specifying as the value either left or right. left floats the image over to place the left edge flush against the curent margin. any text that follows will flow against the image's right edge. right floats the image to place its right edge flush against the right margin. subsequent text will flow along the image's left edge. specifications specification status comment html living standardthe definition of 'htmlimageelement.align' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.align' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, ple...
HTMLImageElement.border - Web APIs
living standard html 4.01 specificationthe definition of 'htmlimageelement.border' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, p...
HTMLImageElement.complete - Web APIs
ock"; await loadimage("https://somesite.net/huge-image.jpg", lightboximgelem); lightboxcontrolselem.disabled = false; } /* ... */ function fixredeyecommand() { if (lightboxelem.style.display === "block" && lightboximgelem.complete) { fixredeye(lightboximgelem); } else { /* can't start doing this until the image is fully loaded */ } } specifications specification status comment html living standardthe definition of 'htmlimageelement.complete' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ...
HTMLImageElement.crossOrigin - Web APIs
g this paragraph. thanks for reading me.</p> </div> css body { font: 1.125rem/1.5, helvetica, sans-serif; } .container { display: flow-root; width: 37.5em; border: 1px solid #d2d2d2; } img { float: left; padding-right: 1.5em; } output { background: rgba(100, 100, 100, 0.1); font-family: courier, monospace; width: 95%; } result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxintern...
HTMLImageElement.currentSrc - Web APIs
living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefo...
HTMLImageElement.decode() - Web APIs
living standard initial definition. ...
HTMLImageElement.decoding - Web APIs
r not the browser is allowed to try to parallelize loading your image. if doing so would cause problems, you can specify sync to disable asynchronous loading. this can be useful when applied to <img> elements, but may be even more so when used for offscreen image objects. examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.png'; specifications specification status comment html living standardthe definition of 'decoding' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorero...
HTMLImageElement.height - Web APIs
it's currently drawn. var clockimage = document.queryselector("img"); let output = document.queryselector(".size"); const updateheight = event => { output.innertext = clockimage.height; }; window.addeventlistener("load", updateheight); window.addeventlistener("resize", updateheight); result this example may be easier to try out in its own window. specifications specification status comment html living standardthe definition of 'htmlimageelement.height' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
HTMLImageElement.hspace - Web APIs
argin to apply to the left and right sides of the image. usage notes the value specified for hspace is mapped to the margin-left and margin-right properties to specify the width of those margins in pixels. important: this property is obsolete. you should instead use the css margin property and its longhand forms to establish margins around an <img>. specifications specification status comment html living standardthe definition of 'htmlimageelement.hspace' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.hspace' in that specification. recommendation provides additional details not present in the newer specification. browser compatibility the compatibility table on this page is generat...
HTMLImageElement.isMap - Web APIs
at which the mouse was clicked as offsets from the top-left corner of the image, specified in css pixels. the browser then fetches that url from the server and displays or downloads it depending on the value of the download attribute. unlike server-side image maps, client-side image maps don't cause the <img> element to adopt interactive content mode. specifications specification status comment html living standardthe definition of 'htmlimageelement.ismap' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
HTMLImageElement.loading - Web APIs
living standard ...
HTMLImageElement.longDesc - Web APIs
ser should be able to access a detailed description of the image taco-tuesday.jpg in the html file image-descriptions/taco-tuesday.html. this can be easily converted into modern html: <a href="image-descriptions/taco-tuesday.html"> <img src="taco-tuesday.jpg"> </a> with that, the image is a link to the html file describing the image in more detail. specifications specification status comment html 4.01 specificationthe definition of 'htmlimageelement.longdesc' in that specification. recommendation provides an actual description of this property; the html5 spec only says it's deprecated. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
HTMLImageElement.name - Web APIs
lements. syntax htmlimageelement.name = namestring; namestring = htmlimageelement.name; value a domstring providing a name by which the image can be referenced. important: this property is deprecated and is only in the specification still for backward compatibility purposes. since it functions identically to id, you can and should use it instead. specifications specification status comment html living standardthe definition of 'htmlimageelement.name' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.name' in that specification. recommendation provides additional details not available in the html 5 browser compatibility the compatibility table on this page is generated from structur...
HTMLImageElement.naturalHeight - Web APIs
size: ${image.width} x ` + `${image.height} pixels`; }); the javascript code simply dumps the natural and as-displayed sizes into the <div> with the class output. this is done in response to the window's load event handler, in order to ensure that the image is available before attempting to examine its width and height. result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalheight' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefir...
HTMLImageElement.naturalWidth - Web APIs
size: ${image.width} x ` + `${image.height} pixels`; }); the javascript code simply dumps the natural and as-displayed sizes into the <div> with the class output. this is done in response to the window's load event handler, in order to ensure that the image is available before attempting to examine its width and height. result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalwidth' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
HTMLImageElement.referrerPolicy - Web APIs
agment, password, or username). this case is unsafe as it can leak path information that has been concealed to third-party by using tls. examples var img = new image(); img.src = 'img/logo.png'; img.referrerpolicy = 'origin'; var div = document.getelementbyid('divaround'); div.appendchild(img); // fetch the image using the origin as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull requ...
HTMLImageElement.sizes - Web APIs
k40 = document.getelementbyid("break40"); let break50 = document.getelementbyid("break50"); break40.addeventlistener("click", event => image.sizes = image.sizes.replace(/50em,/, "40em,")); break50.addeventlistener("click", event => image.sizes = image.sizes.replace(/40em,/, "50em,")); result this result may be viewed in its own window here. specifications specification status comment html living standardthe definition of 'htmlimageelement.sizes' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
HTMLImageElement.src - Web APIs
cifying a fallback for viewport-based selection when using viewport-bases selection of an image from a srcset by also specifying the sizes property, the src property serves as the fallback to be used on browsers that don't support viewport-based selection. browsers that do support viewport-based selection will ignore src in this situation. html result specifications specification status comment html living standardthe definition of 'htmlimageelement.src' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxintern...
HTMLImageElement.srcset - Web APIs
displayed output below, the selected url will correspond with whether your display results in selecting the 1x or the 2x version of the image. if you happen to have both standard and high density displays, try moving this window between them and reloading the page to see the results change. for additional examples, see our guide to responsive images. specifications specification status comment html living standardthe definition of 'htmlimageelement.srcset' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
HTMLImageElement.useMap - Web APIs
ding interactive ones), see the articles about the <map> and <area> elements, as well as the guide to using image maps. example the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxi...
HTMLImageElement.vspace - Web APIs
rgin to apply to the top and bottom sides of the image. usage notes the value specified for vspace is mapped to the margin-top and margin-bottom properties to specify the height of those margins in pixels. important: this property is obsolete. you should instead use the css margin property and its longhand forms to establish margins around an <img>. specifications specification status comment html living standardthe definition of 'htmlimageelement.vspace' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.vspace' in that specification. recommendation the html 4.01 specification offers additional details. browser compatibility the compatibility table on this page is generated from struc...
HTMLImageElement.width - Web APIs
provide this information. var clockimage = document.queryselector("img"); let output = document.queryselector(".size"); const updatewidth = event => { output.innertext = clockimage.width; }; window.addeventlistener("load", updatewidth); window.addeventlistener("resize", updatewidth); result this example may be easier to try out in its own window. specifications specification status comment html living standardthe definition of 'htmlimageelement.width' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
HTMLImageElement.x - Web APIs
. css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.x' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
HTMLImageElement.y - Web APIs
. css the css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.y' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
HTMLImageElement - Web APIs
t. example var img1 = new image(); // image constructor img1.src = 'image1.png'; img1.alt = 'alt'; document.body.appendchild(img1); var img2 = document.createelement('img'); // use dom htmlimageelement img2.src = 'image2.jpg'; img2.alt = 'alt text'; document.body.appendchild(img2); // using first image in the document alert(document.images[0].src); specifications specification status comment css object model (cssom) view modulethe definition of 'extensions to htmlimageelement' in that specification. working draft added the x and y properties. html living standardthe definition of 'htmlimageelement' in that specification. living standard the following properties have been added: srcset, currentsrc and sizes. html5the definition of 'htm...
HTMLInputElement: invalid event - Web APIs
living standard html 5.1the definition of 'invalid event' in that specification. recommendation html5the definition of 'invalid event' in that specification. recommendation ...
HTMLInputElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLInputElement.select() - Web APIs
htmlelement.focus(). in browsers where it is not supported, it is possible to replace it with a call to htmlinputelement.setselectionrange() with parameters 0 and the input's value length: <input onclick="this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="this.setselectionrange(0, this.value.length);" value="sample text" /> specifications specification status comment html living standardthe definition of 'select' in that specification. living standard ...
HTMLInputElement.setRangeText() - Web APIs
will be highlighted (selected) afterwards. html <input type="text" id="text-box" size="30" value="this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification. living standard no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification. recommendation initial definition ...
HTMLInputElement.setSelectionRange() - Web APIs
e third, fourth, and fifth characters in the text box ("zil" in the word "mozilla"). html <input type="text" id="text-box" size="20" value="mozilla"> <button onclick="selecttext()">select text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setselectionrange(2, 5); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification. living standard no change html 5.1the definition of 'htmlinputelement.setselectionrange()' in that specification. recommendation no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification. recommendation ...
HTMLInputElement.stepDown() - Web APIs
e decremented. the stepdown() method will not allow the input to go out of range, in this case stopping when it reaches 0 and rounding down and floats that are passed as a parameter. try setting the step decrementer to 1.2. what happens when you invoke the method? try setting the value to 44, which is not valid. what happens when you invoke the method? specifications specification status comment html living standardthe definition of 'stepdown()' in that specification. living standard html 5.1the definition of 'stepdown()' in that specification. recommendation html5the definition of 'stepdown()' in that specification. recommendation initial definition ...
HTMLInputElement.stepUp() - Web APIs
ber will not be incremented. the stepup will not allow the input to out of range, in this case stopping when it reaches 400, and rounding down any floats that are passed as a parameter. try setting the step increment to 1.2. what happens when you invoke the method? try setting the value to 4, which is not valid. what happens when you invoke the method? specifications specification status comment html living standardthe definition of 'stepup()' in that specification. living standard html 5.1the definition of 'stepup()' in that specification. recommendation html5the definition of 'stepup()' in that specification. recommendation initial definition ...
HTMLInputElement.webkitEntries - Web APIs
type="file" multiple> javascript document.getelementbyid("files").addeventlistener("change", function(event) { event.target.webkitentries.foreach(function(entry) { /* do stuff with the entry */ }); }); each time a change event occurs, this code iterates over the selected files, obtaining their filesystementry-based objects and acting on them. specifications specification status comment file and directory entries apithe definition of 'webkitentries' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-...
HTMLInputElement.webkitdirectory - Web APIs
draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compa...
HTMLInputElement - Web APIs
input elements. also available via the oninput event handler property. invalid fired when an element does not satisfy its constraints during constraint validation. also available via the oninvalid event handler property. search fired when a search is initiated on an <input> of type="search". also available via the onsearch event handler property. specifications specification status comment html living standardthe definition of 'htmlinputelement' in that specification. living standard html5the definition of 'htmlinputelement' in that specification. recommendation technically, the tabindex and accesskey properties, as well as the blur(), click(), and focus() methods, are now defined on htmlelement. the following properties are now obso...
HTMLIsIndexElement - Web APIs
htmlelement. htmlisindexelement.form read only is a htmlformelement representing the <form> element it belongs too. it can have the null value, if <isindex> isn't part of any form. htmlisindexelement.prompt is a domstring representing a text to be prompted for the field. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html5the definition of 'htmlisindexelement' in that specification. recommendation removed. <isindex> must now implement htmlunknownelement. document object model (dom) level 2 html specificationthe definition of 'htmlisindexelement' in that specification. obsolete no change from document object model (dom) level 1 specification document object mod...
HTMLKeygenElement - Web APIs
the <keygen> elements expose the htmlkeygenelement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of keygen elements. properties autofocus is a boolean that reflects the autofocus html attribute, indicating that the form control should have input focus when the page loads. ...
HTMLLIElement - Web APIs
. htmllielement.value is a long indicating the ordinal position of the list element inside a given <ol>. it reflects the value attribute of the html <li> element, and can be smaller than 0. if the <li> element is not a child of an <ol> element, the property has no meaning. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmllielement' in that specification. living standard html5the definition of 'htmllielement' in that specification. recommendation the following property is now obsolete: type. document object model (dom) level 2 html specificationthe definition of 'htmllielement' in that specification. obsolete no ch...
HTMLLabelElement.control - Web APIs
sn't associated with a control. syntax control = htmllabelelement.control value an htmlelement derived object representing the control with which the <label> is associated, or null if the label stands alone. if this property has a value and htmllabelelement.htmlfor has a value, the htmllabelelement.htmlfor property must refer to the same control. specifications specification status comment html living standardthe definition of 'control' in that specification. living standard initial definition ...
HTMLLabelElement.form - Web APIs
n a form. this property is just a shortcut for htmllabelelement.control.form. syntax form = htmllabelelement.form value an htmlformelement which represents the form with which the label's control is associated. if control is null (meaning the label isn't associated with a control), or if the control isn't part of a form, this property returns null. specifications specification status comment html living standardthe definition of 'form' in that specification. living standard initial definition ...
HTMLLabelElement.htmlFor - Web APIs
operty for, which is the id of the label's associated control element. syntax controlid = htmllabelelement.htmlfor htmllabelelement.htmlfor = newid value a domstring which contains the id string of the element which is associated with the control. if this property has a value, the htmllabelelement.control property must refer to the same control. specifications specification status comment html living standardthe definition of 'htmlfor' in that specification. living standard initial definition ...
HTMLLabelElement - Web APIs
null if there is no associated control, or if that control isn't associated with a form. in other words, this is just a shortcut for htmllabelelement.control.form. htmllabelelement.htmlfor is a string containing the id of the labeled control. this reflects the for attribute. methods no specific methods; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmllabelelement' in that specification. living standard html5the definition of 'htmllabelelement' in that specification. recommendation the property accesskey is now defined on htmlelement. the following property has been added: control. document object model (dom) level 2 html specificationthe definit...
HTMLLegendElement - Web APIs
e on the parent fieldset element. otherwise, it returns null. htmllegendelement.accesskey is a domstring representing a single-character access key to give access to the element. htmllegendelement.align is a domstring representing the alignment relative to the form set methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmllegendelement' in that specification. living standard html 5.1the definition of 'htmllegendelement' in that specification. recommendation html5the definition of 'htmllegendelement' in that specification. recommendation the property accesskey is now defined on htmlelement. the following propert...
HTMLLinkElement.as - Web APIs
the as property of the htmllinkelement interface returns a domstring representing the type of content being loaded by the html link, one of "script", "style", "image", "video", "audio", "track", "font", "fetch". syntax var as = htmllinkelement.as htmllinkelement.as = as value a domstring. specifications specification status comment preloadthe definition of 'as' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for...
HTMLLinkElement.referrerPolicy - Web APIs
ment.referrerpolicy property reflect the html referrerpolicy attribute of the <link> element defining which referrer is sent when fetching the resource. see the http referrer-policy header for details. syntax domstring htmllinkelement.referrerpolicy example var links = document.getelementsbytagname("link"); links[0].referrerpolicy; // "no-referrer" specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation ...
HTMLLinkElement.rel - Web APIs
nk to an external style sheet: the property is set to stylesheet, and the href attribute is set to the url of an external style sheet to format the page. syntax var relstr = linkelt.rel; linkelt.rel = relstr; example var links = document.getelementsbytagname('link'); var length = links.length; for (var i = 0; i < length; i++) { alert(links[i]); } specifications specification status comment html living standardthe definition of 'rel' in that specification. living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification. obsolete no change from document object model (dom) level 1 specification document object m...
HTMLLinkElement.relList - Web APIs
d list can be changed. syntax var relstr = linkelt.rellist; example var links = document.getelementsbytagname("link"); var length = links.length; for (var i = 0; i < length; i++) { var list = links[i].rellist; var listlength = list.length; console.log("new link found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification. living standard initial definition. ...
HTMLLinkElement - Web APIs
ete, whereas the whatwg living standard still has it labeled obsolete. until this discrepancy is resolved, you should still assume it is obsolete. htmllinkelement.target is a domstring representing the name of the target frame to which the resource applies. methods no specific method; inherits methods from its parent, htmlelement, and linkstyle. specifications specification status comment preload candidate recommendation defines <link rel="preload">, and the as property. note that currently firefox only supports preloading of cacheable resources. html living standardthe definition of 'htmllinkelement' in that specification. living standard adds the following properties: crossorigin, referrerpolicy, and as. html 5.1the definition of...
HTMLMapElement - Web APIs
ing representing the <map> element for referencing it other context. if the id attribute is set, this must have the same value; and it cannot be null or empty. htmlmapelement.areas read only is a live htmlcollection representing the <area> elements associated to this <map>. methods no specific method; inherits methods from its parent, htmlelement . specifications specification status comment html living standardthe definition of 'htmlmapelement' in that specification. living standard html5the definition of 'htmlmapelement' in that specification. recommendation adds the images property. document object model (dom) level 2 html specificationthe definition of 'htmlareaelement' in that specification. obsolete no change from docume...
HTMLMarqueeElement - Web APIs
ps scrolling of the marquee. examples <marquee>this text will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of 'htmlmarqueeelement' in that specification. living standard made obsolete in favor of css but define its expected behavior for backward compatibility. html 5.2the definition of 'htmlmarqueeelement' in that specification. recommendation no changes. html 5.1the definition of 'htmlmarqueeelement' in that specific...
HTMLMediaElement: abort event - Web APIs
examples const video = document.queryselector('video'); const videosrc = 'https://path/to/video.webm'; video.addeventlistener('abort', () => { console.log(`abort loading: ${videosrc}`); }); const source = document.createelement('source'); source.setattribute('src', videosrc); source.setattribute('type', 'video/webm'); video.appendchild(source); specifications specification status html living standard living standard html5 recommendation ...
HTMLMediaElement.audioTracks - Web APIs
on a given element are muted. html the html establishes the element itself. <video id="video" src="somevideo.mp4"></video> javascript the javascript code handles muting the video element's audio tracks. var video = document.getelementbyid("video"); for (var i = 0; i < video.audiotracks.length; i += 1) { video.audiotracks[i].enabled = false; } specifications specification status comment html living standardthe definition of 'htmlmediaelement.audiotracks' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.audiotracks' in that specification. recommendation initial definition. ...
HTMLMediaElement.autoplay - Web APIs
rting playback and instead use play event. examples ... <video id="video" controls> <source src="https://player.vimeo.com/external/250688977.sd.mp4?s=d14b1f1a971dde13c79d6e436b88a6a928dfe26b&profile_id=165"> </video> *** disable autoplay (recommended) *** false is the default value document.queryselector('#video').autoplay = false; specifications specification status comment html living standardthe definition of 'htmlmediaelement.autoplay' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.autoplay' in that specification. recommendation initial definition. ...
HTMLMediaElement.buffered - Web APIs
eb workers. syntax var timerange = audioobject.buffered value a timeranges object. this object is normalized, which means that ranges are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range). example var obj = document.createelement('video'); console.log(obj.buffered); // timeranges { length: 0 } specifications specification status comment html living standardthe definition of 'htmlmediaelement.buffered' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.buffered' in that specification. recommendation initial definition. ...
HTMLMediaElement.canPlayType() - Web APIs
n this device. maybe not enough information is available to determine for sure whether or not the media will play until playback is actually attempted. "" (empty string) media of the given type definitely can't be played on the current device. example var obj = document.createelement('video'); console.log(obj.canplaytype('video/mp4')); // "maybe" specifications specification status comment html living standardthe definition of 'canplaytype' in that specification. living standard html5the definition of 'htmlmediaelement.canplaytype' in that specification. recommendation initial definition. ...
HTMLMediaElement: canplay event - Web APIs
living standard html5the definition of 'canplay media event' in that specification. recommendation ...
HTMLMediaElement: canplaythrough event - Web APIs
living standard html5the definition of 'canplaythrough media event' in that specification. recommendation ...
HTMLMediaElement.captureStream() - Web APIs
with another person during a video call. document.queryselector('.playandrecord').addeventlistener('click', function() { var playbackelement = document.getelementbyid("playback"); var capturestream = playbackelement.capturestream(); playbackelement.play(); }); see recording a media element for a longer and more intricate example and explanation. specifications specification status comment media capture from dom elementsthe definition of 'capturestream()' in that specification. working draft initial definition. ...
HTMLMediaElement.controller - Web APIs
the htmlmediaelement.controller property represents the media controller assigned to the element. syntax ... value a mediacontroller object or null if no media controller is assigned to the element. the default is null. example ... specifications specification status comment html5the definition of 'htmlmediaelement.controller' in that specification. recommendation initial definition. ...
HTMLMediaElement.controls - Web APIs
ent.controls property reflects the controls html attribute, which controls whether user interface controls for playing the media item will be displayed. syntax var ctrls = video.controls; audio.controls = true; value a boolean. a value of true means controls will be displayed. example var obj = document.createelement('video'); obj.controls = true; specifications specification status comment html living standardthe definition of 'htmlmediaelement.controls' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.controls' in that specification. recommendation initial definition. ...
HTMLMediaElement.controlsList - Web APIs
interface returns a domtokenlist that helps the user agent select what controls to show on the media element whenever the user agent shows its own set of controls. the domtokenlist takes one or more of three possible values: nodownload, nofullscreen, and noremoteplayback. syntax var domtokenlist = htmlmediaelement.controlslist; value a domtokenlist. specifications specification status comment controls list api: solution outline browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox...
HTMLMediaElement.crossOrigin - Web APIs
the htmlmediaelement.crossorigin property is the cors setting for this image element. see cors settings attributes for details. specifications specification status comment html living standardthe definition of 'htmlmediaelement.crossorigin' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.crossorigin' in that specification. recommendation initial definition ...
HTMLMediaElement.currentSrc - Web APIs
g the absolute url of the chosen media source; this may be an empty string if networkstate is empty; otherwise, it will be one of the resources listed by the htmlsourceelement contained within the media element, or the value or src if no <source> element is provided. example var obj = document.createelement('video'); console.log(obj.currentsrc); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.currentsrc' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.currentsrc' in that specification. recommendation initial definition. ...
HTMLMediaElement.currentTime - Web APIs
iest time. the length of the media in seconds can be determined using the duration property. example var video = document.createelement('video'); console.log(video.currenttime); usage notes reduced time precision to offer protection against timing attacks and fingerprinting, browsers may round or otherwise adjust the value returned by currenttime. specifications specification status comment html living standardthe definition of 'htmlmediaelement.currenttime' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.currenttime' in that specification. recommendation initial definition. ...
HTMLMediaElement.defaultMuted - Web APIs
nmute the audio output, use the muted property. syntax var dmuted = video.defaultmuted; audio.defaultmuted = true; value a boolean. a value of true means that the audio output will be muted by default. example var videoele = document.createelement('video'); videoele.defaultmuted = true; console.log(videoele.outerhtml); // <video muted=""></video> specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultmuted' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.defaultmuted' in that specification. recommendation initial definition. ...
HTMLMediaElement.defaultPlaybackRate - Web APIs
defaultplaybackrate; audio.defaultplaybackrate = 1.0; value a double. 1.0 is "normal speed," values lower than 1.0 make the media play slower than normal, higher values make it play faster. the value 0.0 is invalid and throws a not_supported_err exception. example var obj = document.createelement('video'); console.log(obj.defaultplaybackrate); // 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultplaybackrate' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.defaultplaybackrate' in that specification. recommendation initial definition. ...
HTMLMediaElement.disableRemotePlayback - Web APIs
e media element is allowed to have a remote playback ui. syntax var remoteplaybackdisabled ​= element.disableremoteplayback; value a boolean indicating whether the media element may have a remote playback ui. (false means "not disabled", which means "enabled") example var obj = document.createelement('audio'); obj.disableremoteplayback = true; specifications specification status comment remote playback apithe definition of 'disableremoteplayback' in that specification. candidate recommendation initial definition. ...
HTMLMediaElement.duration - Web APIs
ouble-precision floating-point value indicating the duration of the media in seconds. if no media data is available, the value nan is returned. if the element's media doesn't have a known duration—such as for live media streams—the value of duration is +infinity. examples var obj = document.createelement('video'); console.log(obj.duration); // nan specifications specification status comment html living standardthe definition of 'htmlmediaelement.duration' in that specification. living standard html5the definition of 'htmlmediaelement.duration' in that specification. recommendation initial definition. ...
HTMLMediaElement: durationchange event - Web APIs
living standard html5the definition of 'durationchange media event' in that specification. recommendation ...
HTMLMediaElement: emptied event - Web APIs
nst video = document.queryselector('video'); video.addeventlistener('emptied', (event) => { console.log('uh oh. the media is empty. did you call load()?'); }); using the onemptied event handler property: const video = document.queryselector('video'); video.onemptied = (event) => { console.log('uh oh. the media is empty. did you call load()?'); }; specifications specification status html living standardthe definition of 'emptied media event' in that specification. living standard html5the definition of 'emptied media event' in that specification. recommendation ...
HTMLMediaElement.ended - Web APIs
d playback. syntax var isended = htmlmediaelement.ended value a boolean which is true if the media contained in the element has finished playing. if the source of the media is a mediastream, this value is true if the value of the stream's active property is false. example var obj = document.createelement('video'); console.log(obj.ended); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.ended' in that specification. living standard html5the definition of 'htmlmediaelement.ended' in that specification. recommendation ...
HTMLMediaElement: ended event - Web APIs
living standard html5the definition of 'ended media event' in that specification. recommendation ...
HTMLMediaElement.error - Web APIs
ablishes a video element and adds an error handler to it; the error handler simply logs the details to console. var videoelement = document.createelement('video'); videoelement.onerror = function() { console.log("error " + videoelement.error.code + "; details: " + videoelement.error.message); } videoelement.src = "https://example.com/bogusvideo.mp4"; specifications specification status comment html living standardthe definition of 'htmlmediaelement.error' in that specification. living standard html5the definition of 'htmlmediaelement.error' in that specification. recommendation ...
HTMLMediaElement: error event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples const video = document.queryselector('video'); const videosrc = 'https://path/to/video.webm'; video.addeventlistener('error', () => { console.error(`error loading: ${videosrc}`); }); video.setattribute('src', videosrc); specifications specification status html living standard living standard html5 recommendation ...
HTMLMediaElement.fastSeek() - Web APIs
note: if you need to seek with precision, you should set htmlmediaelement.currenttime instead. syntax htmlmediaelement.fastseek(time); parameters time a double. return value none. example this example quickly seeks to 20-second position of the video element. let myvideo = document.getelementbyid("myvideoelement"); myvideo.fastseek(20); specifications specification status comment html living standardthe definition of 'fastseek()' in that specification. living standard initial definition; living specification. ...
HTMLMediaElement: loadeddata event - Web APIs
living standard html5the definition of 'loadeddata media event' in that specification. recommendation ...
HTMLMediaElement: loadedmetadata event - Web APIs
, (event) => { console.log('the duration and dimensions ' + ' of the media and tracks are now known. '); }); using the onloadedmetadata event handler property: const video = document.queryselector('video'); video.onloadedmetadata = (event) => { console.log('the duration and dimensions ' + ' of the media and tracks are now known. '); }; specifications specification status html living standardthe definition of 'loadedmetadata media event' in that specification. living standard html5the definition of 'canplay media event' in that specification. recommendation ...
HTMLMediaElement: loadstart event - Web APIs
living standard html5the definition of 'loadstart media event' in that specification. recommendation ...
HTMLMediaElement.loop - Web APIs
the htmlmediaelement.loop property reflects the loop html attribute, which controls whether the media element should start over when it reaches the end. syntax var loop = video.loop; audio.loop = true; value a boolean. example var obj = document.createelement('video'); obj.loop = true; // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.loop' in that specification. living standard html5the definition of 'htmlmediaelement.loop' in that specification. recommendation ...
HTMLMediaElement.mediaGroup - Web APIs
the htmlmediaelement.mediagroup property reflects the mediagroup html attribute, which indicates the name of the group of elements it belongs to. a group of media elements shares a common controller. syntax ... value a domstring. example ... specifications specification status comment html5the definition of 'htmlmediaelement.mediagroup' in that specification. recommendation initial definition. ...
HTMLMediaElement.muted - Web APIs
the htmlmediaelement.muted indicates whether the media element muted. syntax var ismuted = audioorvideo.muted audio.muted = true; value a boolean. true means muted and false means not muted. example var obj = document.createelement('video'); console.log(obj.muted); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.muted' in that specification. living standard html5the definition of 'htmlmediaelement.muted' in that specification. recommendation ...
HTMLMediaElement.networkState - Web APIs
example will listen for the audio element to begin playing and then check if it is still loading data. <audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('playing', function() { if (obj.networkstate === 2) { // still loading... } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.networkstate' in that specification. living standard html5the definition of 'htmlmediaelement.networkstate' in that specification. recommendation ...
HTMLMediaElement.onencrypted - Web APIs
="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax htmlmediaelement.onencrypted = function(encrypted) { ... } specifications specification status comment encrypted media extensionsthe definition of 'onencrypted' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
HTMLMediaElement.onerror - Web APIs
for processing error events. the error event fires when some form of error occurs while attempting to load or perform the media. syntax htmlmediaelement.onerror = eventlistener; value a function which serves as the event handler for the error event. when an error occurs, the specified function will be called. if null, no error handler is in effect. specifications specification status comment html living standardthe definition of 'onerror' in that specification. living standard ...
HTMLMediaElement.onwaitingforkey - Web APIs
4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmediaelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax htmlmediaelement.onwaitingforkey = function(waitingforkey) { ... } specifications specification status comment encrypted media extensionsthe definition of 'onwaitingforkey' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
HTMLMediaElement.pause() - Web APIs
the htmlmediaelement.pause() method will pause playback of the media, if the media is already in a paused state this method will have no effect. syntax htmlmediaelement.pause() parameters none. return value none. exceptions none. specifications specification status comment html living standardthe definition of 'pause()' in that specification. living standard initial definition; living specification. html5the definition of 'pause()' in that specification. recommendation initial definition. ...
HTMLMediaElement: pause event - Web APIs
living standard html5the definition of 'pause media event' in that specification. recommendation ...
HTMLMediaElement.paused - Web APIs
the read-only htmlmediaelement.paused property tells whether the media element is paused. syntax var ispaused = audioorvideo.paused value a boolean. true is paused and false is not paused. example var obj = document.createelement('video'); console.log(obj.paused); // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.paused' in that specification. living standard html5the definition of 'htmlmediaelement.paused' in that specification. recommendation ...
HTMLMediaElement.play() - Web APIs
n this example is executed, it begins by collecting references to the <video> element as well as the <button> used to toggle playback on and off. it then sets up an event handler for the click event on the play toggle button and attempts to automatically begin playback by calling playvideo(). you can try out or remix this example in real time on glitch. specifications specification status comment html living standardthe definition of 'play()' in that specification. living standard initial definition; living specification. html5the definition of 'play()' in that specification. recommendation initial definition. note: the whatwg and w3c versions of the specification differ (as of august, 2018) as to whether this method returns a promise or no...
HTMLMediaElement: play event - Web APIs
e. either the ' + 'play() method was called or the autoplay attribute was toggled.'); }); using the onplay event handler property: const video = document.queryselector('video'); video.onplay = (event) => { console.log('the boolean paused property is now false. either the ' + 'play() method was called or the autoplay attribute was toggled.'); }; specifications specification status html living standardthe definition of 'play media event' in that specification. living standard html5the definition of 'play media event' in that specification. recommendation ...
HTMLMediaElement.playbackRate - Web APIs
to control this. syntax // video video.playbackrate = 1.5; // audio audio.playbackrate = 1.0; value a double. 1.0 is "normal speed," values lower than 1.0 make the media play slower than normal, higher values make it play faster. (default: 1.0) example var obj = document.createelement('video'); console.log(obj.playbackrate); // expected output: 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.playbackrate' in that specification. living standard html5the definition of 'htmlmediaelement.playbackrate' in that specification. recommendation ...
HTMLMediaElement: playing event - Web APIs
vent firing. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('playing', (event) => { console.log('video is no longer paused'); }); using the onplaying event handler property: const video = document.queryselector('video'); video.onplaying = (event) => { console.log('video is no longer paused.'); }; specifications specification status html living standardthe definition of 'playing media event' in that specification. living standard html5the definition of 'playing media event' in that specification. recommendation ...
HTMLMediaElement: progress event - Web APIs
living standard html5the definition of 'progress media event' in that specification. recommendation ...
HTMLMediaElement: ratechange event - Web APIs
g. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('ratechange', (event) => { console.log('the playback rate changed.'); }); using the onratechange event handler property: const video = document.queryselector('video'); video.onratechange = (event) => { console.log('the playback rate changed.'); }; specifications specification status html living standardthe definition of 'ratechange media event' in that specification. living standard html5the definition of 'ratechange media event' in that specification. recommendation ...
HTMLMediaElement.readyState - Web APIs
it will then check if at least the current playback position has been loaded. if it has, the audio will play. <audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('loadeddata', function() { if(obj.readystate >= 2) { obj.play(); } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.readystate' in that specification. living standard html5the definition of 'htmlmediaelement.readystate' in that specification. recommendation ...
HTMLMediaElement.seekable - Web APIs
ideo.seekable; value a timeranges object. examples var video = document.queryselector("video"); var timerangesobject = video.seekable; var timeranges = []; //go through the object and output an array for (let count = 0; count < timerangesobject.length; count ++) { timeranges.push([timerangesobject.start(count), timerangesobject.end(count)]); } specifications specification status comment html living standardthe definition of 'htmlmediaelement' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement' in that specification. recommendation initial definition. media source extensionsthe definition of 'htmlmediaelement extensions, like for seekable' in that specification. recommendation ...
HTMLMediaElement: seeked event - Web APIs
living standard html5the definition of 'seeked media event' in that specification. recommendation ...
HTMLMediaElement: seeking event - Web APIs
living standard html5the definition of 'seeking media event' in that specification. recommendation ...
HTMLMediaElement.setMediaKeys() - Web APIs
to the passed mediakeys, which are those used to decrypt media during playback. syntax var promise = htmlmediaelement.setmediakeys(mediakeys); parameters mediakeys a reference to a mediakeys object that the htmlmediaelement can use for decryption of media data during playback. returns a promise that resolves to the passed instance of mediakeys. specifications specification status comment encrypted media extensionsthe definition of 'setmediakeys()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeed...
HTMLMediaElement.setSinkId() - Web APIs
candidate recommendation initial definition. older versions of this spec were called "media capture output". ...
HTMLMediaElement.sinkId - Web APIs
ead-only property returns a domstring that is the unique id of the audio device delivering output. if it is using the user agent default, it returns an empty string. this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications. syntax var sinkid = htmlmediaelement.sinkid specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification. candidate recommendation initial definition. older versions of this spec were called "media capture output". ...
HTMLMediaElement.src - Web APIs
vided in an htmlsourceelement (which represents a <source> element). syntax var mediaurl = htmlmediaelement.src; value a usvstring object containing the url of a media resource to use in the element; this property reflects the value of the html element's src attribute. example var obj = document.createelement('video'); console.log(obj.src); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.src' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.src' in that specification. recommendation initial definition. ...
HTMLMediaElement.srcObject - Web APIs
living standard initial definition. ...
HTMLMediaElement: stalled event - Web APIs
living standard html5the definition of 'stalled media event' in that specification. recommendation ...
HTMLMediaElement: suspend event - Web APIs
living standard html5the definition of 'suspend media event' in that specification. recommendation ...
HTMLMedia​Element​.textTracks - Web APIs
h == 10 */ if (tracks[i].language == 'en') { console.dir(tracks[i]); } } properties & methods properties length returns the number of text tracks in texttracklist object. methods gettrackbyid() the gettrackbyid(id) method returns the first texttrack in the texttracklist object that matches the id, or null if there is no match. specifications specification status comment html living standardthe definition of 'htmlmediaelement.texttracks' in that specification. living standard no change from html5 html5the definition of 'htmlmediaelement.texttracks' in that specification. recommendation initial definition. ...
HTMLMediaElement: timeupdate event - Web APIs
ument.queryselector('video'); video.addeventlistener('timeupdate', (event) => { console.log('the currenttime attribute has been updated. again.'); }); using the ontimeupdate event handler property: const video = document.queryselector('video'); video.ontimeupdate = (event) => { console.log('the currenttime attribute has been updated. again.'); }; specifications specification status html living standardthe definition of 'timeupdate media event' in that specification. living standard html5the definition of 'timeupdate media event' in that specification. recommendation ...
HTMLMediaElement.videoTracks - Web APIs
list. syntax var videotracks = mediaelement.videotracks; value a videotracklist object representing the list of video tracks included in the media element. the list of tracks can be accessed using array notation, or using the object's gettrackbyid() method. each track is represented by a videotrack object which provides information about the track. specifications specification status comment html living standardthe definition of 'htmlmediaelement.videotracks' in that specification. living standard no change from html5 ...
HTMLMediaElement.volume - Web APIs
the htmlmediaelement.volume property sets the volume at which the media will be played. syntax var volume ​= video.volume; //1 value a double values must fall between 0 and 1, where 0 is effectively muted and 1 is the loudest possible value. example var obj = document.createelement('audio'); console.log(obj.volume); // 1 obj.volume = 0.75; specifications specification status comment html living standardthe definition of 'htmlmediaelement.volume' in that specification. living standard html5the definition of 'htmlmediaelement.volume' in that specification. recommendation ...
HTMLMediaElement: volumechange event - Web APIs
nt firing. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('volumechange', (event) => { console.log('the volume changed.'); }); using the onvolumechange event handler property: const video = document.queryselector('video'); video.onvolumechange = (event) => { console.log('the volume changed.'); }; specifications specification status html living standardthe definition of 'volumechange media event' in that specification. living standard html5the definition of 'volumechange media event' in that specification. recommendation ...
HTMLMediaElement: waiting event - Web APIs
. using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('waiting', (event) => { console.log('video is waiting for more data.'); }); using the onwaiting event handler property: const video = document.queryselector('video'); video.onwaiting = (event) => { console.log('video is waiting for more data.'); }; specifications specification status html living standardthe definition of 'waiting media event' in that specification. living standard html5the definition of 'waiting media event' in that specification. recommendation ...
HTMLMediaElement - Web APIs
t is trying to fetch media data, but data is unexpectedly not forthcoming. suspend fired when the media data loading has been suspended. timeupdate fired when the time indicated by the currenttime attribute has been updated volumechange fired when the volume has changed. waiting fired when playback has stopped because of a temporary lack of data specifications specification status comment encrypted media extensionsthe definition of 'encrypted media extensions' in that specification. recommendation adds mediakeys, mediaencryptedevent, setmediakeys, onencrypted, and onwaitingforkey. html living standardthe definition of 'htmlmediaelement' in that specification. living standard no change from html5 html5the definition of 'htmlmedi...
HTMLMenuElement - Web APIs
living standard no change from latest snapshot, unknown html 5.2the definition of 'htmlmenuelement' in that specification. recommendation snapshot of the html living standard. removed the context type. html 5.1the definition of 'htmlmenuelement' in that specific...
HTMLMenuItemElement - Web APIs
recommendation snapshot of the html living standard. initial definition. ...
HTMLMetaElement - Web APIs
an http response header to define for a document. name domstring gets or sets the name of a meta-data property to define for a document. scheme domstring gets or sets the name of a scheme used to interpret the value of a meta-data property. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlmetaelement' in that specification. living standard html5the definition of 'htmlmetaelement' in that specification. recommendation the following property is now obsolete: scheme. document object model (dom) level 2 html specificationthe definition of 'htmlmetaelement' in that specification. obsolete ...
HTMLMeterElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLMeterElement - Web APIs
, reflecting the optimum attribute. htmlmeterelement.value a double representing the currrent value, reflecting the value attribute. htmlmeterelement.labelsread only a nodelist of <label> elements that are associated with the element. methods this interface does not implement any specific methods but inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlmeterelement' in that specification. living standard html 5.1the definition of 'htmlmeterelement' in that specification. recommendation no change html5the definition of 'htmlmeterelement' in that specification. recommendation initial definition ...
HTMLModElement - Web APIs
;} properties inherits properties from its parent, htmlelement. htmlmodelement.cite is a domstring reflecting the cite html attribute, containing a uri of a resource explaining the change. htmlmodelement.datetime is a domstring reflecting the datetime html attribute, containing a date-and-time string representing a timestamp for the change. specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification. living standard no change from html5. html5the definition of 'htmlanchorelement' in that specification. recommendation no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'htmlm...
HTMLOListElement - Web APIs
e used: i, ii, iii, iv, v, … htmlolistelement.compact is a boolean indicating that spacing between list items should be reduced. this property reflects the compact attribute only, it doesn't consider the line-height css property used for that behavior in modern pages. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlolistelement' in that specification. living standard html5the definition of 'htmlolistelement' in that specification. recommendation added the reversed property. document object model (dom) level 2 html specificationthe definition of 'htmlolistelement' in that specification. obsolete no change fro...
HTMLObjectElement.checkValidity - Web APIs
living standard initial definition. ...
HTMLObjectElement.contentDocument - Web APIs
living standard initial definition. ...
HTMLObjectElement.contentWindow - Web APIs
living standard initial definition. ...
HTMLObjectElement.data - Web APIs
living standard initial definition. ...
HTMLObjectElement.form - Web APIs
living standard initial definition. ...
HTMLObjectElement.height - Web APIs
living standard initial definition. ...
HTMLObjectElement.name - Web APIs
living standard initial definition. ...
HTMLObjectElement.setCustomValidity - Web APIs
living standard initial definition. ...
HTMLObjectElement.type - Web APIs
living standard initial definition. ...
HTMLObjectElement.typeMustMatch - Web APIs
e mime type given by htmlobjectelement.type in order for this resource to be used. syntax var mustmatch = obj.typemustmatch; obj.typemustmatch = mustmatch; example html <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> javascript let obj = document.getelementbyid('obj'); console.log(obj.typemustmatch); specifications specification status comment html5the definition of 'htmlobjectelement' in that specification. recommendation the w3c specification is a latest of a previous version of html living standard first snapshot with this property. ...
HTMLObjectElement.useMap - Web APIs
living standard initial definition. ...
HTMLObjectElement.validationMessage - Web APIs
ns a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any). this is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints. syntax var string = htmlobjectelement.validationmessage; value a domstring. specifications specification status comment html living standardthe definition of 'validationmessage' in that specification. living standard initial definition. ...
HTMLObjectElement.validity - Web APIs
the validity read-only property of the htmlobjectelement interface returns a validitystate with the validity states that this element is in. syntax var validitystate = htmlobjectelement.validity; value a validitystate object. specifications specification status comment html living standardthe definition of 'validity' in that specification. living standard initial definition. ...
HTMLObjectElement.width - Web APIs
living standard initial definition. ...
HTMLObjectElement.willValidate - Web APIs
living standard initial definition. ...
HTMLObjectElement - Web APIs
htmlobjectelement.checkvalidity() retuns a boolean that always is true, because object objects are never candidates for constraint validation. htmlobjectelement.setcustomvalidity() sets a custom validity message for the element. if this message is not the empty string, then the element is suffering from a custom validity error, and does not validate. specifications specification status comment html living standardthe definition of 'htmlobjectelement' in that specification. living standard html5the definition of 'htmlobjectelement' in that specification. recommendation the w3c specification is a latest of a previous version of html living standard technically, the property tabindex is now defined on htmlelement. the following properties...
HTMLOptGroupElement - Web APIs
s inherits properties from its parent, htmlelement. htmloptgroupelement.disabled is a boolean representing whether or not the whole list of children <option> is disabled (true) or not (false). htmloptgroupelement.label is a domstring representing the label for the group. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmloptgroupelement' in that specification. living standard html5the definition of 'htmloptgroupelement' in that specification. recommendation no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'htmloptgroupelement' ...
Option() - Web APIs
recommendation ...
HTMLOptionElement - Web APIs
; otherwise reflects value of the node.textcontent property. methods inherits methods from its parent, htmlelement. option() is a constructor creating an htmloptionelement object. it has four values: the text to display, text, the value associated, value, the value of defaultselected, and the value of selected. the last three values are optional. specifications specification status comment html living standardthe definition of 'htmloptionelement' in that specification. living standard html5the definition of 'htmloptionelement' in that specification. recommendation a constructor, option(), has been added. the form property can be the null value. document object model (dom) level 2 html specificationthe definition of 'htmloptione...
HTMLOptionsCollection - Web APIs
s optionally allowed by the spec, this property isn't read-only. you can either remove options from the end by lowering the value, or add blank options at the end by raising the value. mozilla allows this, while other implementations could potentially throw a domexception. methods this interface inherits the methods of its parent, htmlcollection. specifications specification status comment html living standardthe definition of 'htmloptionscollection' in that specification. living standard ...
HTMLElement.blur() - Web APIs
living standard html 5.1the definition of 'blur' in that specification. recommendation html5the definition of 'blur' in that specification. recommendation document object model (dom) level 2 html specificationthe definition of 'blur' in that specification. ...
HTMLOrForeignElement.dataset - Web APIs
living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'htmlelement.dataset' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.dataset' in that specificati...
HTMLElement.focus() - Web APIs
living standard html 5.1the definition of 'focus' in that specification. recommendation html5the definition of 'focus' in that specification. recommendation document object model (dom) level 2 html specificationthe definition of 'focus' in that specification...
HTMLOrForeignElement.tabIndex - Web APIs
ticipate in the tabbing order. values don't need to be sequential, nor must they begin with any particular value. they may even be negative, though each browser trims very large values. syntax element.tabindex = index; var index = element.tabindex; value index is an integer example const b1 = document.getelementbyid('button1'); b1.tabindex = 1; specifications specification status comment html living standardthe definition of 'tabindex' in that specification. living standard no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'tabindex' in that specification. obsolete no change from document object model (dom) level 1 specification. docum...
HTMLOrForeignElement - Web APIs
living standard initial definition. ...
HTMLOutputElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLOutputElement - Web APIs
ult mode, and sets the textcontent property to the value of the defaultvalue property. value mode the element goes into value mode when the contents of the value property are set. the value property otherwise behaves like the textcontent property. when the element is in value mode, the default value is accessible only through the defaultvalue property. specifications specification status comment html living standardthe definition of 'htmloutputelement' in that specification. living standard html 5.1the definition of 'htmloutputelement' in that specification. recommendation no change html5the definition of 'htmloutputelement' in that specification. recommendation initial definition ...
HTMLParagraphElement - Web APIs
s properties from its parent, htmlelement. htmlparagraphelement.align a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. the possible values are "left", "right", "justify", and "center". methods no specific methods, inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlparagraphelement' in that specification. living standard html5the definition of 'htmlparagraphelement' in that specification. recommendation the following property is now obsolete: align. document object model (dom) level 2 html specificationthe definition of 'htmlparagraphelement' in that specification...
HTMLParamElement - Web APIs
g containing the type of the parameter when valuetype has the "ref" value. it reflects the type attribute. htmlparamelement.valuetype is a domstring containing the type of the value. it reflects the valuetype attribute and has one of the values: "data", "ref", or "object". methods no specific methods, inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlparamelement' in that specification. living standard html5the definition of 'htmlparamelement' in that specification. recommendation the following properties are now obsolete: type, and valuetype. document object model (dom) level 2 html specificationthe definition of 'htmlparamelement' in that specific...
HTMLPictureElement - Web APIs
living standard initial definition ...
HTMLPreElement - Web APIs
></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlpreelement.width is a long value reflecting the obsolete width attribute, containing a fixed-size length for the <pre> element. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlpreelement' in that specification. living standard html5the definition of 'htmllielement' in that specification. recommendation the following property is now obsolete: width. document object model (dom) level 2 html specificationthe definition of 'htmlpreelement' in that specification. obsolete no...
HTMLProgressElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLProgressElement - Web APIs
htmlprogresselement.value is a double value that reflects the current value; if the progress bar is an indeterminate progress bar, it returns 0. htmlprogresselement.labelsread only returns nodelist containing the list of <label> elements that are labels for this element. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlprogresselement' in that specification. living standard html 5.1the definition of 'htmlprogresselement' in that specification. recommendation html5the definition of 'htmlprogresselement' in that specification. recommendation initial definition. ...
HTMLQuoteElement - Web APIs
t</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmlquoteelement.cite is a domstring reflecting the cite html attribute, containing a url for the source of the quotation. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlquoteelement' in that specification. living standard html5the definition of 'htmlquoteelement' in that specification. recommendation no change from document object model (dom) level 2 html specification. document object model (dom) level 2 html specificationthe definition of 'htmlquoteelement' in that s...
HTMLScriptElement.referrerPolicy - Web APIs
er-level referrer policy, i.e. one set on the whole document or domain. if a higher-level policy is not available, the empty string is treated as being equivalent to no-referrer-when-downgrade. examples var scriptelem = document.createelement("script"); scriptelem.src = "/"; scriptelem.referrerpolicy = "unsafe-url"; document.body.appendchild(script); specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy attribute. html living standardthe definition of 'htmlscriptelement: referrerpolicy' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured...
HTMLScriptElement - Web APIs
living standard html 5.1the definition of 'htmlscriptelement' in that specification. recommendation html5the definition of 'htmlscriptelement' in that specification. recommendation the following properties are now obsolete: htmlfor,. document object m...
HTMLSelectElement.add() - Web APIs
living standard html5the definition of 'htmlselectelement.add()' in that specification. recommendation is a snapshot of html living standard. the value of before can now be a long and is optional. it throws a domerror of the type hierarchyrequesterror if the passed ...
HTMLSelectElement.autofocus - Web APIs
living standard html 5.2the definition of 'autofocus' in that specification. recommendation ...
HTMLSelectElement.checkValidity() - Web APIs
the htmlselectelement.checkvalidity() method checks whether the element has any constraints and whether it satisfies them. if the element fails its constraints, the browser fires a cancelable invalid event at the element, and then returns false. syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification. living standard no change since the latest snapshot, html5. html5the definition of 'htmlselectelement.checkvalidity()' in that specification. recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.disabled - Web APIs
living standard html5the definition of 'htmlselectelement' in that specification. recommendation initial definition, snapshot of html living standard. ...
HTMLSelectElement.form - Web APIs
f selection list. the below code gives all select elements in a particular form a css class of "selectclass": <script type="text/javascript"> var form_element = document.getelementbyid('subscribe_form'); var vist = form_element.style; if (vist.display=='' || vist.display=='none') { vist.display = 'block'; } else { vist.display = 'none'; } </script> specifications specification status comment html living standardthe definition of 'form' in that specification. living standard html5the definition of 'htmlselectelement' in that specification. recommendation initial definition, snapshot of html living standard. ...
HTMLSelectElement.item() - Web APIs
meters index is an unsigned long. return value item is a htmloptionelement. examples html <form> <select id="myformcontrol" type="textarea"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript // returns the htmloptionelement representing #o2 elem1 = document.forms[0]['myformcontrol'][1]; specifications specification status comment html living standardthe definition of 'htmlselectelement.item()' in that specification. living standard no change since the latest snapshot, html5. html5the definition of 'htmlselectelement.item()' in that specification. recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLSelectElement.namedItem() - Web APIs
llection[str]; parameters str is a domstring. return value item is a htmloptionelement. example html <form> <select id="myformcontrol"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript elem1 = document.forms[0]['myformcontrol']['o1']; // returns the htmloptionelement representing #o1 specifications specification status comment html living standardthe definition of 'htmlselectelement.nameditem()' in that specification. living standard no change since the latest snapshot, html5. html5the definition of 'htmlselectelement.nameditem()' in that specification. recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.options - Web APIs
living standard no change html5the definition of 'options' in that specification. recommendation initial definition ...
HTMLSelectElement.remove() - Web APIs
living standard html5the definition of 'htmlselectelement.remove()' in that specification. recommendation is a snapshot of html living standard. document object model (dom) level 2 html specificationthe definition of 'htmlselectelement.remove()' in that spe...
HTMLSelectElement.selectedIndex - Web APIs
living standard no change since the latest snapshot, html5. html5the definition of 'htmlselectelement' in that specification. recommendation initial definition, snapshot of html living standard. ...
HTMLSelectElement.selectedOptions - Web APIs
rder now" button. when clicked, the event handler fetches the list of selected options using selectedoptions, then iterates over the options in the list. a string is constructed to list the ordered items, with logic to build the list using proper english grammar rules (including a serial comma). result the resulting content looks like this in action: specifications specification status comment html living standardthe definition of 'htmlselectelement.selectedoptions' in that specification. living standard no change from html5 html5the definition of 'htmlselectelement.selectedoptions' in that specification. recommendation initial definition. ...
HTMLSelectElement.setCustomValidity() - Web APIs
the htmlselectelement.setcustomvalidity() method sets the custom validity message for the selection element to the specified message. use the empty string to indicate that the element does not have a custom validity error. syntax selectelt.setcustomvalidity(string); parameters string is the domstring containing the error message. specifications specification status comment html living standardthe definition of 'htmlselectelement.setcustomvalidity()' in that specification. living standard no change since the latest snapshot, html5. html5the definition of 'htmlselectelement.setcustomvalidity()' in that specification. recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.type - Web APIs
"select-multiple" if multiple values can be selected. "select-one" if only one value can be selected. example switch (select.type) { case 'select-multiple': // multiple values may be selected break; case 'select-one': // only one value may be selected break; default: // non-standard value (or this isn't a select element) } specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification. living standard no change from html5, the latest snapshot. html5the definition of 'htmlselectelement' in that specification. recommendation is a snapshot of html living standard. no change from document object model (dom) level 2 html specification. document object mo...
HTMLSelectElement - Web APIs
option console.log(select.options[select.selectedindex].value) // second a better way to track changes to the user's selection is to watch for the change event to occur on the <select>. this will tell you when the value changes, and you can then update anything you need to. see the example provided in the documentation for the change event for details. specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification. living standard since the latest snapshot, html5, it adds the autocomplete property and the reportvalidity() method. html5the definition of 'htmlselectelement' in that specification. recommendation is a snapshot of html living standard. it adds the autofocus, form, req...
HTMLSlotElement.assignedElements() - Web APIs
be returned. the available options are: flatten: a boolean indicating whether to return the assigned elements of any available child <slot> elements (true) or not (false). defaults to false. return value an array of elements. examples let slots = this.shadowroot.queryselector('slot'); let elements = slots.assignedelements({flatten: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxintern...
HTMLSlotElement.assignedNodes() - Web APIs
living standard ...
HTMLSlotElement.name - Web APIs
'".'); }); here we grab references to all the slots, then add a slotchange event listener to the 2nd slot in the template — which is the one that keeps having its contents changed in the example. every time the element inserted in the slot changes, we log a report to the console saying which slot has changed, and what the new node inside the slot is. specifications specification status comment html living standardthe definition of 'name' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasa...
HTMLSlotElement: slotchange event - Web APIs
living standard initial definition ...
HTMLSlotElement - Web APIs
living standard ...
HTMLSourceElement - Web APIs
, separated by a comma (',', u+002c comma). a candidate image is a url followed by a 'w' with the width of the images, or an 'x' followed by the pixel density. htmlsourceelement.type is a domstring reflecting the type html attribute, containing the type of the media resource. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlsourceelement' in that specification. living standard ...
HTMLSpanElement - Web APIs
ndale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlspanelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties, but inherits properties from: htmlelement. methods this interface has no methods, but inherits methods from: htmlelement. specifications specification status comment html living standardthe definition of 'htmlspanelement' in that specification. living standard html 5.2the definition of 'htmlspanelement' in that specification. recommendation html 5.1the definition of 'htmlspanelement' in that specification. recommendation html5the definition of 'htmlspanelement' in that specification. r...
HTMLStyleElement.media - Web APIs
living standard html 5.1the definition of 'htmlstyleelement' in that specification. recommendation html5the definition of 'htmlstyleelement' in that specification. recommendation document object model (dom) level 2 html specificationthe definit...
HTMLStyleElement - Web APIs
heet read only returns the stylesheet object associated with the given element, or null if there is none htmlstyleelement.scoped is a boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true). methods no specific method; inherits properties from its parent, htmlelement, and linkstyle. specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification. living standard html 5.1the definition of 'htmlstyleelement' in that specification. recommendation html5the definition of 'htmlstyleelement' in that specification. recommendation the following property has been added: scoped. document object model (d...
HTMLTableCaptionElement - Web APIs
a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltablecaptionelement.align is a domstring which represents an enumerated attribute indicating alignment of the caption with respect to the table. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmltablecaptionelement' in that specification. living standard no change from html5. html5the definition of 'htmltablecaptionelement' in that specification. recommendation no change from document object model (dom) level 2 html specification, though align was formerly obsoleted. document object model (dom) l...
HTMLTableCellElement - Web APIs
gn attribute and can have one of the following values: "top", "middle", "bottom", or "baseline". use the css vertical-align property instead. htmltablecellelement.width a domstring specifying the number of pixels wide the cell should be drawn, if possible. this property reflects the also obsolete width attribute. use the css width property instead. specifications specification status comment html living standardthe definition of 'htmltablecellelement' in that specification. living standard no change from html5. html5the definition of 'htmltablecellelement' in that specification. recommendation the following properties have been obsoleted: align, axis, bgcolor, height, width, ch, choff, nowrap, and valign. the headers property is now rea...
HTMLTableColElement - Web APIs
of columns to apply this object's attributes to. must be a positive integer. htmltablecolelement.valign is a domstring that indicates the vertical alignment of the cell data in the column. htmltablecolelement.width is a domstring representing the default column width. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmltablecolelement' in that specification. living standard no change from html5. html5the definition of 'htmltablecolelement' in that specification. recommendation the span property is now an unsigned long. document object model (dom) level 2 html specificationthe definition of 'htmltablecolelement' in that ...
HTMLTableElement.caption - Web APIs
the htmltableelement.caption property represents the table caption. if no caption element is associated with the table, this property is null. syntax var string = tableelement.caption; example if (table.caption) { // do something with the caption } specifications specification status comment html living standardthe definition of 'htmltableelement.caption' in that specification. living standard no change from html5 html5the definition of 'htmltableelement.caption' in that specification. recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.caption' in that specification. obsolete no change from document object...
HTMLTableElement.createCaption() - Web APIs
to a table that initially lacks one. html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> </table> javascript let table = document.queryselector('table'); let caption = table.createcaption(); caption.textcontent = 'this caption was created by javascript!'; result specifications specification status comment html living standardthe definition of 'htmltableelement: createcaption' in that specification. living standard ...
HTMLTableElement.createTFoot() - Web APIs
into the table. the footer does not need to be added separately as would be the case if document.createelement() had been used to create the new <tfoot> element. syntax htmltablesectionelement = table.createtfoot(); return value htmltablesectionelement example let myfoot = mytable.createtfoot(); // now this should be true: myfoot == mytable.tfoot specifications specification status comment html living standardthe definition of 'htmltableelement: createtfoot' in that specification. living standard ...
HTMLTableElement.createTHead() - Web APIs
into the table. the header does not need to be added separately as would be the case if document.createelement() had been used to create the new <thead> element. syntax htmltablesectionelement = table.createthead(); return value htmltablesectionelement example let myhead = mytable.createthead(); // now this should be true: myhead == mytable.thead specifications specification status comment html living standardthe definition of 'htmltableelement: createthead' in that specification. living standard ...
HTMLTableElement.deleteCaption() - Web APIs
mltableelement.deletecaption() example this example uses javascript to delete a table's caption. html <table> <caption>this caption will be deleted!</caption> <tr><td>cell 1.1</td><td>cell 1.2</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td></tr> </table> javascript let table = document.queryselector('table'); table.deletecaption(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletecaption' in that specification. living standard ...
HTMLTableElement.deleteRow() - Web APIs
t to delete a table's second row. html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> <tr><td>cell 3.1</td><td>cell 3.2</td><td>cell 3.3</td></tr> </table> javascript let table = document.queryselector('table'); // delete second row table.deleterow(1); result specifications specification status comment html living standardthe definition of 'htmltableelement: deleterow' in that specification. living standard ...
HTMLTableElement.deleteTFoot() - Web APIs
eletetfoot(); example this example uses javascript to delete a table's footer. html <table> <thead><th>name</th><th>score</th></thead> <tr><td>bob</td><td>541</td></tr> <tr><td>jim</td><td>225</td></tr> <tfoot><th>average</th><td>383</td></tfoot> </table> javascript let table = document.queryselector('table'); table.deletetfoot(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletetfoot' in that specification. living standard ...
HTMLTableElement.deleteTHead() - Web APIs
able>. syntax htmltableelement.deletethead(); example this example uses javascript to delete a table's header. html <table> <thead><th>name</th><th>occupation</th></thead> <tr><td>bob</td><td>plumber</td></tr> <tr><td>jim</td><td>roofer</td></tr> </table> javascript let table = document.queryselector('table'); table.deletethead(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletethead' in that specification. living standard ...
HTMLTableElement.insertRow() - Web APIs
living standard document object model (dom) level 2 html specificationthe definition of 'htmltableelement.insertrow()' in that specification. obsolete specifies in more detail where the row is inserted. document object model (dom) level 1 specificationthe...
HTMLTableElement.rows - Web APIs
his provides quick access to all of the table rows, without having to manually search for them. example myrows = mytable.rows; firstrow = mytable.rows[0]; lastrow = mytable.rows.item(mytable.rows.length-1); this demonstrates how you can use both array syntax (line 2) and the htmlcollection.item() method (line 3) to obtain individual rows in the table. specifications specification status comment html living standardthe definition of 'htmltableelement: rows' in that specification. living standard ...
HTMLTableElement.tBodies - Web APIs
mplicit <tbody> elements. for example: <table> <tr> <td>cell one</td> </tr> </table> the html dom generated from the above html will have a <tbody> element even though the tags are not included in the source html. syntax htmlcollectionobject = table.tbodies example this snippet gets the number of bodies in a table. mytable.tbodies.length; specifications specification status comment html living standardthe definition of 'htmltableelement: tbodies' in that specification. living standard ...
HTMLTableElement.tFoot - Web APIs
the htmltableelement.tfoot property represents the <tfoot> element of a <table>. its value will be null if there is no such element. syntax htmltablesectionelementobject = table.tfoot table.tfoot = htmltablesectionelementobject example if (table.tfoot == my_foot) { // ... } specifications specification status comment html living standardthe definition of 'htmltableelement.tfoot' in that specification. living standard no change from html5 html5the definition of 'htmltableelement.tfoot' in that specification. recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.tfoot' in that specification. obsolete no change...
HTMLTableElement.tHead - Web APIs
the htmltableelement.thead represents the <thead> element of a <table> . its value will be null if there is no such element. syntax thead_element = table.thead; table.thead = thead_element; parameters thead_element is a htmltablesectionelement. example if (table.thead == my_head_el) { // ... } specifications specification status comment html living standardthe definition of 'htmltableelement.thead' in that specification. living standard no change from html5 html5the definition of 'htmltableelement.thead' in that specification. recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.thead' in that specification...
HTMLTableElement - Web APIs
rows in the collection, a domexception with the value indexsizeerror is raised. htmltableelement.deleterow() removes the row corresponding to the index given in parameter. if the index value is -1 the last row is removed; if it smaller than -1 or greater than the amount of rows in the collection, a domexception with the value indexsizeerror is raised. specifications specification status comment html living standardthe definition of 'htmltableelement' in that specification. living standard added the sortable property and the stopsorting() method. html5the definition of 'htmltableelement' in that specification. recommendation added the createtbody() method. document object model (dom) level 2 html specificationthe definition of 'htmlta...
HTMLTableRowElement.insertCell() - Web APIs
living standard document object model (dom) level 2 html specificationthe definition of 'htmltablerowelement.insertcell()' in that specification. obsolete initial definition ...
HTMLTableRowElement - Web APIs
just before the given position in the row. if the given position is not given or is -1, it appends the cell to the row. if the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than -1, it raises a domexception with the indexsizeerror value. returns a reference to a htmltablecellelement [en-us]. specifications specification status comment html living standardthe definition of 'htmltablerowelement' in that specification. living standard html5the definition of 'htmltablerowelement' in that specification. recommendation the parameter of insertcell is now optional and default to -1. document object model (dom) level 2 html specificationthe definition of 'htmltablerowelement' in that ...
HTMLTableSectionElement - Web APIs
lement.insertrow() inserts a new row just before the given position in the section. if the given position is not given or is -1, it appends the row to the end of section. if the given position is greater (or equal as it starts at zero) than the amount of rows in the section, or is smaller than -1, it raises a domexception with the indexsizeerror value. specifications specification status comment html living standardthe definition of 'htmltablesectionelement' in that specification. living standard html5the definition of 'htmltablesectionelement' in that specification. recommendation the parameter of insertcell is now optional. document object model (dom) level 2 html specificationthe definition of 'htmltablesectionelement' in that specif...
HTMLTemplateElement.content - Web APIs
the htmltemplateelement.content property returns a <template> element's template contents (a documentfragment). syntax var documentfragment = templateelement.content example var templateelement = document.queryselector("#foo"); var documentfragment = templateelement.content.clonenode(true); specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification. living standard html5the definition of 'htmltemplateelement interface' in that specification. recommendation initial definition ...
HTMLTemplateElement - Web APIs
t</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface inherits the properties of htmlelement. content read only a read-only documentfragment which contains the dom subtree representing the <template> element's template contents. methods this interface inherits the methods of htmlelement. specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification. living standard html5the definition of 'htmltemplateelement interface' in that specification. recommendation initial definition ...
HTMLTextAreaElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification. recommendation initial definition ...
HTMLTextAreaElement - Web APIs
living standard html5the definition of 'htmltextareaelement' in that specification. recommendation the attributes tabindex and accesskey, as well as the methods blur() and focus() are now defined on htmlelement. the following attributes have been added: autofocus, p...
HTMLTimeElement.dateTime - Web APIs
living standard no change from html 5.1. html 5.1the definition of 'htmltimeelement' in that specification. recommendation no change from html5. html5the definition of 'htmltimeelement' in that specification. recommendation initial definition. ...
HTMLTimeElement - Web APIs
:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltimeelement.datetime is a domstring that reflects the datetime html attribute, containing a machine-readable form of the element's date and time value. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification. living standard html 5.1the definition of 'htmltimeelement' in that specification. recommendation no change from html5. html5the definition of 'htmltimeelement' in that specification. recommendation initial definition. ...
HTMLTitleElement - Web APIs
lignment-baseline="middle">htmltitleelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement. htmltitleelement.text is a domstring representing the text of the document's title. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmltitleelement' in that specification. living standard html 5.1the definition of 'htmltitleelement' in that specification. recommendation no change from html5 html5the definition of 'htmltitleelement' in that specification. recommendation no change from document object model (dom) level 2 html speci...
HTMLTrackElement: cuechange event - Web APIs
living standard ...
HTMLTrackElement.src - Web APIs
the htmltrackelement.src property reflects the value of the <track> element's src attribute, which indicates the url of the text track's data. syntax var texttrackurl = htmltrackelement.src; value a domstring object containing the url of the text track data. example // coming soon specifications specification status comment html living standardthe definition of 'htmltrackelement.src' in that specification. living standard no change from html5 html5the definition of 'htmltrackelement.src' in that specification. recommendation initial definition. ...
HTMLTrackElement - Web APIs
k's mode is initially in the disabled state. if you need to be able to perform any processing on the track after the <track> is set up, you should instead ensure that the track's mode is either hidden (if you don't want it to start out being presented to the user) or showing (to initially display the track). you can then change the mode as desired later. specifications specification status comment html living standardthe definition of 'htmltrackelement' in that specification. living standard html5the definition of 'htmltrackelement' in that specification. recommendation initial definition. ...
HTMLUListElement - Web APIs
and have never been standardized. htmlulistelement.compact is a boolean indicating that spacing between list items should be reduced. this property reflects the compact attribute only, it doesn't consider the line-height css property used for that behavior in modern pages. methods no specific method; inherits methods from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlulistelement' in that specification. living standard html5the definition of 'htmlulistelement' in that specification. recommendation the compact and type properties have been obsoleted. document object model (dom) level 2 html specificationthe definition of 'htmlulistelement' in that specification. o...
HTMLUnknownElement - Web APIs
o,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlunknownelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties no specific property; inherits properties from its parent, htmlelement. methods no specific method; inherits properties from its parent, htmlelement. specifications specification status comment html living standardthe definition of 'htmlunknownelement' in that specification. living standard no change from html5. html5the definition of 'htmlunknownelement' in that specification. recommendation initial definition. ...
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
apsed so far in the playback process. this value includes any dropped or corrupted frames, so it's not the same as "total number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification. editor's draft initial definition. ...
HTMLVideoElement.videoHeight - Web APIs
ventlistener("resize", ev => { let w = v.videowidth; let h = v.videoheight; if (w && h) { v.style.width = w; v.style.height = h; } }, false); note that this only applies the change if both the videowidth and the videoheight are non-zero. this avoids applying invalid changes when there's no true information available yet for dimensions. specifications specification status comment html living standardthe definition of 'htmlvideoelement.videoheight' in that specification. living standard html5the definition of 'htmlvideoelement.videoheight' in that specification. recommendation initial definition. ...
HTMLVideoElement.videoWidth - Web APIs
ventlistener("resize", ev => { let w = v.videowidth; let h = v.videoheight; if (w && h) { v.style.width = w; v.style.height = h; } }, false); note that this only applies the change if both the videowidth and the videoheight are non-zero. this avoids applying invalid changes when there's no true information available yet for dimensions. specifications specification status comment html living standardthe definition of 'htmlvideoelement.videowidth' in that specification. living standard html5the definition of 'htmlvideoelement.videowidth' in that specification. recommendation initial definition. ...
HTMLVideoElement - Web APIs
k metrics. this information includes things like the number of dropped or corrupted frames, as well as the total number of frames. events inherits methods from its parent, htmlmediaelement, and from its ancestor htmlelement. listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. specifications specification status comment html living standardthe definition of 'htmlvideoelement' in that specification. living standard ...
The HTML DOM API - Web APIs
rmation below. items marked with "*" are required.</p> <form action="" method="get"> <p> <label for="username" required>your name:</label> <input type="text" id="username"> (*) </p> <p> <label for="email">email:</label> <input type="email" id="useremail"> </p> <input type="submit" value="send" id="sendbutton"> </form> result specifications specification status comment html living standard living standard whatwg html specification html5 recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specification obsolete no change from document object model (dom) level 1 specification. document object model (dom) level 1 specificat...
HTML Drag and Drop API - Web APIs
ving elements with the datatransfer interface copying and moving elements with the datatransferlistitem interface dragging and dropping files (firefox only): http://jsfiddle.net/9c2ef/ dragging and dropping files (all browsers): https://jsbin.com/hiqasek/ a parking project using the drag and drop api: https://park.glitch.me/ (you can edit here) specifications specification status comment html living standard living standard see also drag operations dragging and dropping multiple items recommended drag types html5 living standard: drag and drop drag and drop interoperability data from caniuse ...
HashChangeEvent.newURL - Web APIs
the newurl read-only property of the hashchangeevent interface returns the new url to which the window is navigating. syntax let neweventurl = event.newurl; value a domstring. example window.addeventlistener('hashchange', function(event) { console.log('hash changed to ' + event.newurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: newurl' in that specification. living standard ...
HashChangeEvent.oldURL - Web APIs
the oldurl read-only property of the hashchangeevent interface returns the previous url from which the window was navigated. syntax let oldeventurl = event.oldurl; value a domstring. example window.addeventlistener('hashchange', function(event) { console.log('hash changed from ' + event.oldurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: oldurl' in that specification. living standard ...
HashChangeEvent - Web APIs
// if the hash has changed and a handler has been bound... if ( newhash != oldhash && typeof window.onhashchange === "function" ) { // execute the handler window.onhashchange({ type: "hashchange", oldurl: oldurl, newurl: newurl }); oldurl = newurl; oldhash = newhash; } }, 100); })(window); specifications specification status comment html living standardthe definition of 'hashchangeevent' in that specification. living standard initial definition ...
Headers() - Web APIs
Web › API › Headers › Headers
living standard ...
Headers.append() - Web APIs
Web › API › Headers › append
d value. if the specified header already exists and accepts multiple values, append() will append the new value to the end of the value set: myheaders.append('accept-encoding', 'deflate'); myheaders.append('accept-encoding', 'gzip'); myheaders.get('accept-encoding'); // returns 'deflate, gzip' to overwrite the old value with a new one, use headers.set. specifications specification status comment fetchthe definition of 'append()' in that specification. living standard ...
Headers.delete() - Web APIs
Web › API › Headers › delete
living standard ...
Headers.get() - Web APIs
Web › API › Headers › get
living standard ...
Headers.has() - Web APIs
Web › API › Headers › has
n. example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then test for the existence of it using has(): myheaders.append('content-type', 'image/jpeg'); myheaders.has('content-type'); // returns true myheaders.has('accept-encoding'); // returns false specifications specification status comment fetchthe definition of 'has()' in that specification. living standard ...
Headers.set() - Web APIs
Web › API › Headers › set
living standard ...
Headers - Web APIs
Web › API › Headers
living standard ...
History.back() - Web APIs
Web › API › History › back
e event in order to determine when the navigation has completed. syntax history.back() examples the following short example causes a button on the page to navigate back one entry in the session history. html <button id="go-back">go back!</button> javascript document.getelementbyid('go-back').addeventlistener('click', () => { history.back(); }); specifications specification status comment html living standardthe definition of 'history.back()' in that specification. living standard no change from html5. html5the definition of 'history.back()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, p...
History.forward() - Web APIs
Web › API › History › forward
ent in order to determine when the navigation has completed. syntax history.forward() examples the following examples create a button that moves forward one step in the session history. html <button id='go-forward'>go forward!</button> javascript document.getelementbyid('go-forward').addeventlistener('click', e => { window.history.forward(); }) specifications specification status comment html living standardthe definition of 'history' in that specification. living standard no change from html5. html5the definition of 'history' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check ou...
History.go() - Web APIs
Web › API › History › go
living standard no change from html5. html5the definition of 'history.go()' in that specification. recommendation initial definition. ...
History.length - Web APIs
Web › API › History › length
the history.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page. for example, for a page loaded in a new tab this property returns 1. syntax const length = history.length specifications specification status comment html living standardthe definition of 'history.length' in that specification. living standard no change from html5. html5the definition of 'history.length' in that specification. recommendation initial definition. ...
History.pushState() - Web APIs
Web › API › History › pushState
that pushstate() never causes a hashchange event to be fired, even if the new url differs from the old url only in its hash. examples this creates a new browser history state setting the state, title, and url. javascript const state = { 'page_id': 1, 'user_id': 5 } const title = '' const url = 'hello-world.html' history.pushstate(state, title, url) specifications specification status comment html living standardthe definition of 'history.pushstate()' in that specification. living standard no change from html5. html5the definition of 'history.pushstate()' in that specification. recommendation initial definition. ...
History.replaceState() - Web APIs
browser to load bar2.html or even check that bar2.html exists. suppose now that the user navigates to https://www.microsoft.com, then clicks the back button. at this point, the url bar will display https://www.mozilla.org/bar2.html. if the user now clicks back again, the url bar will display https://www.mozilla.org/foo.html, and totally bypass bar.html. specifications specification status comment html living standardthe definition of 'history.replacestate()' in that specification. living standard no change from html5. html5the definition of 'history.replacestate()' in that specification. recommendation initial definition. ...
History.scrollRestoration - Web APIs
uery the current scroll restoration behavior. const scrollrestoration = history.scrollrestoration if (scrollrestoration === 'manual') { console.log('the location on the page is not restored, user will need to scroll manually.'); } prevent automatic page location restoration if (history.scrollrestoration) { history.scrollrestoration = 'manual'; } specifications specification status comment html living standardthe definition of 'scroll restoration mode' in that specification. living standard no change from html5. html5the definition of 'history.scrollrestoration' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contr...
History.state - Web APIs
Web › API › History › state
tate now has a value. // should be null because we haven't modified the history stack yet console.log(`history.state before pushstate: ${history.state}`); // now push something on the stack history.pushstate({name: 'example'}, "pushstate example", 'page3.html'); // now state has a value. console.log(`history.state after pushstate: ${history.state}`); specificationse specification status comment html living standardthe definition of 'history.state' in that specification. living standard html5the definition of 'history.state' in that specification. recommendation initial definition. ...
History - Web APIs
Web › API › History
placestate() updates the most recent entry on the history stack to have the specified data, title, and, if provided, url. the data is treated as opaque by the dom; you may specify any javascript object that can be serialized. note that all browsers but safari currently ignore the title parameter. for more information, see working with the history api. specifications specification status comment html living standardthe definition of 'history' in that specification. living standard adds the scrollrestoration attribute. html5the definition of 'history' in that specification. recommendation initial definition. ...
History API - Web APIs
living standard no change from html5. html5the definition of 'history' in that specification. recommendation initial definition. ...
HkdfParams - Web APIs
recommendation ...
HmacImportParams - Web APIs
ength optional a number representing the length in bits of the key. if this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. unless you have a good reason to use a different length, omit this property and use the default. examples see the examples for subtlecrypto.importkey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmacimportparams' in that specification. recommendation ...
HmacKeyGenParams - Web APIs
e. length optional a number — the length in bits of the key. if this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. unless you have a good reason to use a different length, omit this property and use the default. examples see the examples for subtlecrypto.generatekey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmackeygenparams' in that specification. recommendation ...
IDBCursor.advance() - Web APIs
Web › API › IDBCursor › advance
recommendation indexed database api draftthe definition of 'advance()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:...
IDBCursor.continue() - Web APIs
recommendation indexed database api draftthe definition of 'continue()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out http...
IDBCursor.continuePrimaryKey() - Web APIs
recommendation ...
IDBCursor.delete() - Web APIs
Web › API › IDBCursor › delete
984. even power windows is better.'); }; } else { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); } cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'delete()' in that specification. recommendation indexed database api draftthe definition of 'delete()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://gi...
IDBCursor.direction - Web APIs
recommendation indexed database api draftthe definition of 'direction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://g...
IDBCursor.key - Web APIs
Web › API › IDBCursor › key
recommendation indexed database api draftthe definition of 'key' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com...
IDBCursor.primaryKey - Web APIs
recommendation indexed database api draftthe definition of 'primarykey' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out http...
IDBCursor.request - Web APIs
Web › API › IDBCursor › request
recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
IDBCursor.source - Web APIs
Web › API › IDBCursor › source
recommendation indexed database api draftthe definition of 'source' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://gith...
IDBCursor.update() - Web APIs
Web › API › IDBCursor › update
recommendation indexed database api draftthe definition of 'update()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://...
IDBCursor - Web APIs
Web › API › IDBCursor
recommendation initial definition indexed database api draftthe definition of 'cursor' in that specification. recommendation added continueprimarykey() and support for binary keys, and the idbcursor.request property. ...
IDBCursorWithValue.value - Web APIs
recommendation indexed database api draftthe definition of 'idbdatabase' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://...
IDBCursorWithValue - Web APIs
recommendation indexed database api draftthe definition of 'idbcursorwithvalue' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please c...
IDBDatabase.close() - Web APIs
Web › API › IDBDatabase › close
f 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! db.close(); }; specification specification status comment indexed database api 2.0the definition of 'close()' in that specification. recommendation indexed database api draftthe definition of 'close()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBDatabase.createObjectStore() - Web APIs
recommendation indexed database api draftthe definition of 'createobjectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, plea...
IDBDatabase.deleteObjectStore() - Web APIs
me = "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. for version < 3, 4... }; specification specification status comment indexed database api 2.0the definition of 'deleteobjectstore()' in that specification. recommendation indexed database api draftthe definition of 'deleteobjectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, plea...
IDBDatabase.name - Web APIs
Web › API › IDBDatabase › name
ror loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable. this is used a lot below db = dbopenrequest.result; // this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification. recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.c...
IDBDatabase.objectStoreNames - Web APIs
(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable. this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification. recommendation indexed database api draftthe definition of 'objectstorenames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please che...
IDBDatabase.onabort - Web APIs
recommendation indexed database api draftthe definition of 'onabort' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBDatabase.onclose - Web APIs
nsactions have been aborted and the connection has been closed. note: this feature is available in web workers. syntax idbdatabase.onclose = function(event) { ... }; value a function which is called when the close event is fired. example db.onclose = function(event) { myappshowalert('the database "' + db.name + '" has unexpectedly closed.'); }; specifications specification status comment indexed database api draftthe definition of 'onclose' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explore...
IDBDatabase.onerror - Web APIs
recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBDatabase.onversionchange - Web APIs
recommendation indexed database api draftthe definition of 'onversionchange' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check...
IDBDatabase.transaction() - Web APIs
= '<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>'; }; // you would then go on to do something to this database // via an object store var objectstore = transaction.objectstore("todolist"); // etc. specification specification status comment indexed database api 2.0the definition of 'transaction()' in that specification. recommendation indexed database api draftthe definition of 'transaction()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out h...
IDBDatabase.version - Web APIs
ng database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable. this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification. recommendation indexed database api draftthe definition of 'version' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBDatabase - Web APIs
e: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; }; this next line opens up a transaction on the database, then opens an object store that we can then manipulate the data inside of. var objectstore = db.transaction('todolist', 'readwrite').objectstore('todolist'); specifications specification status comment indexed database api 2.0the definition of 'idbdatabase' in that specification. recommendation initial version indexed database api draftthe definition of 'idbdatabase' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please...
IDBFactory.cmp() - Web APIs
Web › API › IDBFactory › cmp
1 1st key is greater than the 2nd key exceptions this method may raise a domexception of the following types: attribute description dataerror one of the supplied keys was not a valid key. example var a = 1; var b = 2; var result = window.indexeddb.cmp(a, b); console.log( "comparison results: " + result ); specifications specification status comment indexed database api 2.0the definition of 'cmp()' in that specification. recommendation indexed database api draftthe definition of 'cmp()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
databases - Web APIs
this method may raise a domexception of the following types: attribute description securityerror the method is called from an opaque origin. other error specification does not describe all possible errors. example const promise = indexeddb.databases() promise.then(databases => { console.log(databases) }) specifications specification status comment indexed database api draftthe definition of 'databases()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
IDBFactory.deleteDatabase() - Web APIs
ated to this request are fired. example var dbdeleterequest = window.indexeddb.deletedatabase("todolist"); dbdeleterequest.onerror = function(event) { console.log("error deleting database."); }; dbdeleterequest.onsuccess = function(event) { console.log("database deleted successfully"); console.log(event.result); // should be undefined }; specifications specification status comment indexed database api draftthe definition of 'deletedatabase()' in that specification. recommendation indexed database api 2.0the definition of 'deletedatabase()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to th...
IDBFactory.open() - Web APIs
Web › API › IDBFactory › open
nction(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 later on, for opening // transactions and suchlike. db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'open()' in that specification. recommendation indexed database api draftthe definition of 'open()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
IDBFactory - Web APIs
, or not dbopenrequest.onerror = function(event) { console.error("error loading database."); }; dbopenrequest.onsuccess = function(event) { console.info("database initialised."); // store the result of opening the database in the db variable. this is used a lot later on, for opening transactions and suchlike. db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbfactory' in that specification. recommendation indexed database api draftthe definition of 'idbfactory' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:/...
IDBIndex.count() - Web APIs
Web › API › IDBIndex › count
recommendation indexed database api draftthe definition of 'count()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
IDBIndex.get() - Web APIs
Web › API › IDBIndex › get
recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroper...
IDBIndex.getAll() - Web APIs
Web › API › IDBIndex › getAll
ction is inactive. invalidstateerror the idbindex has been deleted or removed. a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included. example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification. recommendation initial definition. ...
IDBIndex.getAllKeys() - Web APIs
invalidstateerror the idbindex has been deleted or removed. a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included. example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification. recommendation initial definition. indexed database api draftthe definition of 'getall()' in that specification. recommendation ...
IDBIndex.getKey() - Web APIs
Web › API › IDBIndex › getKey
recommendation indexed database api draftthe definition of 'getkey()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBIndex.keyPath - Web APIs
Web › API › IDBIndex › keyPath
recommendation indexed database api draftthe definition of 'keypath' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBIndex.name - Web APIs
Web › API › IDBIndex › name
recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBIndex.objectStore - Web APIs
recommendation indexed database api draftthe definition of 'objectstore' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out htt...
IDBIndex.openCursor() - Web APIs
recommendation indexed database api draftthe definition of 'opencursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out htt...
IDBIndex.openKeyCursor() - Web APIs
recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check o...
IDBIndex - Web APIs
Web › API › IDBIndex
recommendation indexed database api draftthe definition of 'idbindex' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://gi...
IDBKeyRange.bound() - Web APIs
Web › API › IDBKeyRange › bound
recommendation indexed database api draftthe definition of 'bound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://gi...
IDBKeyRange.includes() - Web APIs
recommendation indexed database api draftthe definition of 'includes()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out htt...
IDBKeyRange.lower - Web APIs
Web › API › IDBKeyRange › lower
recommendation indexed database api draftthe definition of 'lower' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
IDBKeyRange.lowerBound() - Web APIs
recommendation indexed database api draftthe definition of 'lowerbound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out h...
IDBKeyRange.lowerOpen - Web APIs
recommendation indexed database api draftthe definition of 'loweropen' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:/...
IDBKeyRange.only() - Web APIs
Web › API › IDBKeyRange › only
recommendation indexed database api draftthe definition of 'only' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBKeyRange.upper - Web APIs
Web › API › IDBKeyRange › upper
recommendation indexed database api draftthe definition of 'upper' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
IDBKeyRange.upperBound() - Web APIs
recommendation indexed database api draftthe definition of 'upperbound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out h...
IDBKeyRange.upperOpen - Web APIs
recommendation indexed database api draftthe definition of 'upperopen' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:/...
IDBKeyRange - Web APIs
recommendation initial definition. indexed database api draftthe definition of 'idbkeyrange' in that specification. recommendation adds includes(). browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute ...
FileHandle.getFile() - Web APIs
e incompatibilities between implementations and the behavior may change in the future. ...
FileHandle.name - Web APIs
re is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary provides the name of the file. syntax var name = instanceoffilehandle.name value a string. specifications specification status comment filesystem api editor's draft draft proposal. ...
FileHandle.onabort - Web APIs
en implementations and the behavior may change in the future. summary specifies an event listener to receive abort events. these events occur when the associated locked file has been aborted with the lockedfile.abort() method. syntax instanceoffilehandle.onabort = funcref; where funcref is a function to be called when the abort event occurs. specifications specification status comment filesystem api editor's draft draft proposal. ...
FileHandle.onerror - Web APIs
very user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary specifies an event listener to receive error events. these events occur when something goes wrong. syntax instanceoffilehandle.onerror = funcref; where funcref is a function to be called when the error event occurs. specifications specification status comment filesystem api editor's draft draft proposal. ...
FileHandle.open() - Web APIs
implementations and the behavior may change in the future. ...
FileHandle.type - Web APIs
non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary provides the mime type of the file. syntax var type = instanceoffilehandle.type value a string. specifications specification status comment filesystem api editor's draft draft proposal. ...
IDBObjectStore.add() - Web APIs
recommendation indexed database api draftthe definition of 'add()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
IDBObjectStore.autoIncrement - Web APIs
recommendation indexed database api draftthe definition of 'autoincrement' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out...
IDBObjectStore.clear() - Web APIs
recommendation indexed database api draftthe definition of 'clear()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBObjectStore.count() - Web APIs
ecords in the store using count() — when the success handler fires, we log the count value (an integer) to the console. var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification. recommendation indexed database api draftthe definition of 'count()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBObjectStore.createIndex() - Web APIs
recommendation indexed database api draftthe definition of 'createindex()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out h...
IDBObjectStore.delete() - Web APIs
recommendation indexed database api draftthe definition of 'delete()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://g...
IDBObjectStore.deleteIndex() - Web APIs
recommendation indexed database api draftthe definition of 'deleteindex()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out...
IDBObjectStore.get() - Web APIs
recommendation indexed database api draftthe definition of 'get()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
IDBObjectStore.getAll() - Web APIs
transactioninactiveerror this idbobjectstore's transaction is inactive. dataerror the key or key range provided contains an invalid key or is null. invalidstateerror the idbobjectstore has been deleted or removed. a typeerror exception is thrown if the count parameter is not between 0 and 232-1 included. specifications specification status comment indexed database api draftthe definition of 'getall()' in that specification. recommendation initial definition ...
IDBObjectStore.getAllKeys() - Web APIs
recommendation initial definition ...
IDBObjectStore.getKey() - Web APIs
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefiref...
IDBObjectStore.index() - Web APIs
recommendation indexed database api draftthe definition of 'index()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBObjectStore.indexNames - Web APIs
recommendation indexed database api draftthe definition of 'indexnames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https...
IDBObjectStore.keyPath - Web APIs
recommendation indexed database api draftthe definition of 'keypath' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBObjectStore.name - Web APIs
recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBObjectStore.openCursor() - Web APIs
recommendation indexed database api draftthe definition of 'opencursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out h...
IDBObjectStore.openKeyCursor() - Web APIs
recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification. recommendation ...
IDBObjectStore.put() - Web APIs
recommendation indexed database api draftthe definition of 'put()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBObjectStore.transaction - Web APIs
recommendation indexed database api draftthe definition of 'transaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out htt...
IDBObjectStore - Web APIs
recommendation indexed database api draftthe definition of 'idbobjectstore' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out...
IDBOpenDBRequest.onblocked - Web APIs
ror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); ... }; request.onblocked = function() { console.log("your database version can't be upgraded because the app is open somewhere else."); } specifications specification status comment indexed database api 2.0the definition of 'onblocked' in that specification. recommendation indexed database api draftthe definition of 'onblocked' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:...
IDBOpenDBRequest.onupgradeneeded - Web APIs
recommendation indexed database api draftthe definition of 'onupgradeneeded' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please chec...
IDBOpenDBRequest - Web APIs
recommendation initial definition indexed database api draftthe definition of 'idbopendbrequest' in that specification. recommendation ...
IDBRequest.error - Web APIs
Web › API › IDBRequest › error
recommendation indexed database api draftthe definition of 'error' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.
IDBRequest.onerror - Web APIs
recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBRequest.onsuccess - Web APIs
recommendation indexed database api draftthe definition of 'onsuccess' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:/...
IDBRequest.readyState - Web APIs
recommendation indexed database api draftthe definition of 'readystate' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https...
IDBRequest.result - Web APIs
Web › API › IDBRequest › result
recommendation indexed database api draftthe definition of 'result' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
IDBRequest.source - Web APIs
Web › API › IDBRequest › source
recommendation indexed database api draftthe definition of 'source' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
IDBRequest.transaction - Web APIs
eateobjectstore('books'); } if (event.oldversion < 2) { // upgrading from v1 database: add index on "title" to "books" store. var bookstore = openrequest.transaction.objectstore('books'); bookstore.createindex('by_title', 'title'); } }; openrequest.onsuccess = function() { console.log(openrequest.transaction); // will log "null". }; specifications specification status comment indexed database api 2.0the definition of 'transaction' in that specification. recommendation indexed database api draftthe definition of 'transaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out htt...
IDBRequest - Web APIs
recommendation initial definition. indexed database api draftthe definition of 'idbrequest' in that specification. recommendation ...
IDBTransaction.objectStoreNames - Web APIs
the objectstorenames read-only property of the idbtransaction interface returns a domstringlist of names of idbobjectstore objects. syntax var mydatabase = transactionobj.objectstorenames; returns a domstringlist of names of idbobjectstore objects. specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification. recommendation indexed database api draftthe definition of 'objectstorenames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
IDBTransaction.abort() - Web APIs
recommendation indexed database api draftthe definition of 'abort()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github...
IDBTransaction.commit() - Web APIs
recommendation unitial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobi...
IDBTransaction.db - Web APIs
Web › API › IDBTransaction › db
recommendation indexed database api draftthe definition of 'db' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/md...
IDBTransaction.error - Web APIs
recommendation indexed database api draftthe definition of 'error' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBTransaction.mode - Web APIs
recommendation indexed database api draftthe definition of 'mode' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.co...
IDBTransaction.objectStore() - Web APIs
recommendation indexed database api draftthe definition of 'objectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out ...
IDBTransaction.onabort - Web APIs
recommendation indexed database api draftthe definition of 'onabort' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://git...
IDBTransaction.oncomplete - Web APIs
recommendation indexed database api draftthe definition of 'oncomplete' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https:/...
IDBTransaction.onerror - Web APIs
recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://githu...
IDBTransaction - Web APIs
recommendation initial definition indexed database api draftthe definition of 'idbtransaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the ...
IDBVersionChangeEvent.newVersion - Web APIs
= 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 later on, for opening transactions and suchlike. db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'newversion' in that specification. recommendation indexed database api draftthe definition of 'newversion' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https...
IDBVersionChangeEvent.oldVersion - Web APIs
e = "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. for version < 3, 4... }; specifications specification status comment indexed database api 2.0the definition of 'oldversion' in that specification. recommendation indexed database api draftthe definition of 'oldversion' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https...
IDBVersionChangeEvent - Web APIs
error = 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 later on, for opening transactions and suchlike. db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbversionchangeevent' in that specification. recommendation initial definition. indexed database api draftthe definition of 'idbversionchangeevent' in that specification. recommendation ...
IIRFilterNode() - Web APIs
ct instance. examples let feedforward = [0.00020298, 0.0004059599, 0.00020298]; let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const iirfilter = new iirfilternode(audioctx, { feedforward: feedforward, feedback: feedbackward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
IIRFilterNode.getFrequencyResponse() - Web APIs
working draft ...
IIRFilterNode - Web APIs
find a simple iir filter demo live on codepen. also see the source code on github. it includes some different coefficient values for different lowpass frequencies — you can change the value of the filternumber constant to a value between 0 and 3 to check out the different available effects. also see our using iir filters guide for a full explanation. specifications specification status comment web audio apithe definition of 'iirfilternode' in that specification. working draft initial definition ...
IdleDeadline.didTimeout - Web APIs
syntax var timedout = idledeadline.didtimeout; value a boolean which is true if the callback is running due to the callback's timeout period elapsing or false if the callback is running because the user agent is idle and is offering time to the callback. example see our complete example in the article cooperative scheduling of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
IdleDeadline.timeRemaining() - Web APIs
t number) representing the number of milliseconds the user agent estimates are left in the current idle period. the value is ideally accurate to within about 5 microseconds. if the idledeadline object's didtimeout property is true, this method returns zero. example see our complete example in the article cooperative scheduling of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
IdleDeadline - Web APIs
-point value providing an estimate of the number of milliseconds remaining in the current idle period. ...
ImageBitmap.close() - Web APIs
Web › API › ImageBitmap › close
h an imagebitmap. syntax void imagebitmap.close() examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext('webgl'); // ... some drawing using the gl context ... var bitmap = offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } bitmap.close(); // imagebitmap { width: 0, height: 0 } -- disposed specifications specification status comment html living standardthe definition of 'close()' in that specification. living standard ...
ImageBitmap.height - Web APIs
the read-only imagebitmap.height property returns the imagebitmap object's height in css pixels. specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification. living standard initial definition. ...
ImageBitmap.width - Web APIs
Web › API › ImageBitmap › width
the read-only imagebitmap.width property returns the imagebitmap object's width in css pixels. specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification. living standard initial definition. ...
ImageBitmap - Web APIs
ndering in webgl. properties imagebitmap.height read only is an unsigned long representing the height, in css pixels, of the imagedata. imagebitmap.width read only is an unsigned long representing the width, in css pixels, of the imagedata. methods imagebitmap.close() disposes of all graphical resources associated with an imagebitmap. specifications specification status comment html living standardthe definition of 'imagebitmap' in that specification. living standard ...
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
living standard ...
ImageBitmapRenderingContext - Web APIs
ods imagebitmaprenderingcontext.transferfromimagebitmap() displays the given imagebitmap in the canvas associated with this rendering context. ownership of the imagebitmap is transferred to the canvas. this was previously named transferimagebitmap(), but was renamed in a spec change. the old name is being kept as an alias to avoid code breakage. specifications specification status comment html living standardthe definition of 'imagebitmaprenderingcontext' in that specification. living standard ...
ImageCapture() constructor - Web APIs
ia() to retrieve the mediastreamtrack needed by the imagecapture() constructor. navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); }) .catch(error => console.log(error)); specifications specification status comment mediastream image capturethe definition of 'imagecapture' in that specification. working draft initial definition. ...
ImageCapture.getPhotoCapabilities() - Web APIs
working draft initial definition. ...
ImageCapture.getPhotoSettings() - Web APIs
working draft initial definition. ...
ImageCapture.grabFrame() - Web APIs
working draft initial definition. ...
ImageCapture.takePhoto() - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefir...
ImageCapture.track - Web APIs
the track read-only property of the imagecapture interface returns a reference to the mediastreamtrack passed to the imagecapture() constructor. syntax const mediastreamtrack = imagecaptureobj.track value a mediastreamtrack object. specifications specification status comment mediastream image capturethe definition of 'track' in that specification. working draft initial definition. ...
ImageCapture - Web APIs
working draft initial definition. ...
ImageData() - Web APIs
living standard initial definition. ...
ImageData.data - Web APIs
Web › API › ImageData › data
living standard initial definition. ...
ImageData.height - Web APIs
Web › API › ImageData › height
the readonly imagedata.height property returns the number of rows in the imagedata object. syntax imagedata.height example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall. thus, the height property is 100. let imagedata = new imagedata(200, 100); console.log(imagedata.height); // 100 specification specification status comment html living standardthe definition of 'imagedata.height' in that specification. living standard initial definition. ...
ImageData.width - Web APIs
Web › API › ImageData › width
the readonly imagedata.width property returns the number of pixels per row in the imagedata object. syntax imagedata.width example this example creates an imagedata object that is 200 pixels wide and 100 pixels tall. thus, the width property is 200. let imagedata = new imagedata(200, 100); console.log(imagedata.width); // 200 specification specification status comment html living standardthe definition of 'imagedata.width' in that specification. living standard initial definition. ...
ImageData - Web APIs
Web › API › ImageData
pedarray representing a one-dimensional array containing the data in the rgba order, with integer values between 0 and 255 (inclusive). imagedata.height read only is an unsigned long representing the actual height, in pixels, of the imagedata. imagedata.width read only is an unsigned long representing the actual width, in pixels, of the imagedata. specifications specification status comment html living standardthe definition of 'imagedata' in that specification. living standard ...
Basic concepts - Web APIs
n. it's not that different from the way that xmlhttprequest works. indexeddb uses a lot of requests. requests are objects that receive the success or failure dom events that were mentioned previously. they have onsuccess and onerror properties, and you can call addeventlistener() and removeeventlistener() on them. they also have readystate, result, and errorcode properties that tell you the status of the request. the result property is particularly magical, as it can be many different things, depending on how the request was generated (for example, an idbcursor instance, or the key for a value that you just inserted into the database). indexeddb uses dom events to notify you when results are available. dom events always have a type property (in indexeddb, it is most commonly set to "...
IndexedDB API - Web APIs
ion of idbdatabase. idbcursorsync sync version of idbcursor. ...
InputDeviceCapabilities - Web APIs
...
firesTouchEvents - Web APIs
the device is a touch screen. for example, stylus and mouse devices typically generate touch events on mobile browsers. syntax var boolean = inputdevicecapabilities.firestouchevents returns a boolean example mybutton.addeventlistener('mousedown', function(e) { if (!e.sourcecapabilities.firestouchevents) mybutton.classlist.add("pressed"); }); specifications specification status comment inputdevicecapabilitiesthe definition of 'firetouchevents' in that specification. draft initial definition. ...
InputDeviceCapabilities - Web APIs
rds and physical keyboards to be represented the same way when they produce the same input. constructors inputdevicecapabilities.inputdevicecapabilities() creates an inputdevicecapabilities object. properties inputdevicecapabilities.firestoucheventsread only a boolean that indicates whether the device dispatches touch events. methods none. specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification. draft initial definition. ...
InputDeviceCapabilities API - Web APIs
he sourcecapabilities property of the uievent. mybutton.addeventlistener('mousedown', function(e) { // touch event case handled above, don't change the style again on tap. if (!e.sourcecapabilities.firestouchevents) mybutton.classlist.add("pressed"); }); interfaces inputdevicecapabilities provides logical information about an input device. specifications specification status comment inputdevicecapabilities draft initial definition. ...
InputEvent.data - Web APIs
Web › API › InputEvent › data
the inputevent.data property and reported in the paragraph below the input. <p>some text to copy and paste.</p> <input type="text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.textcontent = "inputted text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification. working draft initial definition. ...
InputEvent.dataTransfer - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
InputEvent.getTargetRanges() - Web APIs
the gettargetranges() property of the inputevent interface returns an array of static ranges that will be affected by a change to the dom if the input event is not canceled. syntax var staticranges[] = inputevent.gettargetranges() parameters none. return value an array of staticrange objects. specifications specification status comment input events level 2the definition of 'gettargetranges()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome...
InputEvent.inputType - Web APIs
working draft ...
InputEvent.isComposing - Web APIs
the inputevent.iscomposing read-only property returns a boolean value indicating if the event is fired after compositionstart and before compositionend. syntax var bool = event.iscomposing; example var inputevent = new inputevent('syntheticinput', false); console.log(inputevent.iscomposing); // return false specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'inputevent.iscomposing' in that specification. obsolete initial definition. ...
InputEvent - Web APIs
composingread only returns a boolean value indicating if the event is fired after compositionstart and before compositionend. methods this interface inherits methods from its parents, uievent and event. inputevent.gettargetranges() returns an array of static ranges that will be affected by a change to the dom if the input event is not canceled. specifications specification status comment input events level 2the definition of 'inputevent' in that specification. working draft ui eventsthe definition of 'inputevent' in that specification. working draft initial definition. ...
InstallEvent - Web APIs
...
IntersectionObserver.IntersectionObserver() - Web APIs
ne or more of the values in threshold is outside the range 0.0 to 1.0. example this example creates a new intersection observer which calls the function myobservercallback every time the visible area of the element being observed changes by at least 10%. let observer = new intersectionobserver(myobservercallback, {threshold: 0.1}); specifications specification status comment intersection observerthe definition of 'intersectionobserver constructor' in that specification. working draft initial definition. ...
IntersectionObserver.disconnect() - Web APIs
the intersectionobserver method disconnect() stops watching all of its target elements for visibility changes. syntax intersectionobserver.disconnect(); parameters none. return value undefined. specifications specification status comment intersection observerthe definition of 'intersectionobserver.disconnect()' in that specification. working draft initial definition. ...
IntersectionObserver.observe() - Web APIs
ll to the callback. syntax intersectionobserver.observe(targetelement); parameters targetelement an element whose visibility within the root is to be monitored. this element must be a descendant of the root element (or contained wtihin the current document, if the root is the document's viewport). return value undefined. examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.observe()' in that specification. working draft initial definition. ...
IntersectionObserver.root - Web APIs
f the target element. if root is null, then the owning document is used as the root, and the bounds its viewport (that is, the visible area of the document) are used as the root bounds. example this example sets the border of the intersection observer's root element to be a 2-pixel medium green line. observer.root.style.border = "2px solid #44aa44"; specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification. working draft initial definition ...
IntersectionObserver.rootMargin - Web APIs
working draft initial definition ...
IntersectionObserver.takeRecords() - Web APIs
ntersection list, so the callback will not be run. syntax intersectionobserverentries = intersectionobserver.takerecords(); parameters none. return value an array of intersectionobserverentry objects, one for each target element whose intersection with the root has changed since the last time the intersections were checked. examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.takerecords()' in that specification. working draft initial definition. ...
IntersectionObserver.thresholds - Web APIs
ject you can specify when creating an intersectionobserver has a field named threshold, this property is called thresholds. confusing? yes. if you accidentally use thresholds as the name of the field in your options, the thresholds array will wind up being simply [0.0], which is likely not what you expect. debugging chaos may ensue. examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.thresholds' in that specification. working draft initial definition ...
IntersectionObserver.unobserve() - Web APIs
eption is thrown. return value undefined. example this snippet simply shows an observer being created, an element being observed, and then being unobserved. var observer = new intersectionobserver(callback); observer.observe(document.getelementbyid("elementtoobserve")); /* ... */ observer.unobserve(document.getelementbyid("elementtoobserve")); specifications specification status comment intersection observerthe definition of 'intersectionobserver.unobserve()' in that specification. working draft initial definition. ...
IntersectionObserver - Web APIs
working draft ...
IntersectionObserverEntry.boundingClientRect - Web APIs
e is being described. this value is obtained using the same algorithm as element.getboundingclientrect(), so refer to that article for details on precisely what is done to obtain this rectangle and what is and is not included within its bounds. in the general case, however, it's safe to simply think of this as the bounds rectangle of the target element. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.boundingclientrect' in that specification. working draft initial definition ...
IntersectionObserverEntry.intersectionRatio - Web APIs
nt's opacity to the intersection ratio of that element with the root. function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.style.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionratio' in that specification. working draft initial definition ...
IntersectionObserverEntry.intersectionRect - Web APIs
mple, an intersection callback stores the intersection rectangle for later use by the code that draws the target elements' contents, so that only the visible area is redrawn. function intersectioncallback(entries) { entries.foreach(function(entry) { refreshzones.push({ element: entry.target, rect: entry.intersectionrect }); }); } specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionrect' in that specification. working draft initial definition ...
IntersectionObserverEntry.isIntersecting - Web APIs
tersection root. function intersectioncallback(entries) { entries.foreach(function(entry) { if (entry.isintersecting) { intersectingcount += 1; } else { intersectingcount -= 1; } }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.isintersecting' in that specification. working draft initial definition ...
IntersectionObserverEntry.rootBounds - Web APIs
otbounds = intersectionobserverentry.rootbounds; value a domrectreadonly which describes the root intersection rectangle. for roots which are the document's viewport, this rectangle is the bounds rectangle of the entire document. otherwise, it's the bounds of the root element. this rectangle is offset by the values in intersectionobserver.rootmargin. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.rootbounds' in that specification. working draft initial definition ...
IntersectionObserverEntry.target - Web APIs
e example, each targeted element's opacity is set to its intersectionratio. function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.target' in that specification. working draft initial definition ...
IntersectionObserverEntry.time - Web APIs
rget element experienced the intersection change described by the intersectionobserverentry. the time is specified in milliseconds since the creation of the containing document. example see timing element visibility with the intersection observer api for a complete example which uses the time property to track how long elements are visible to the user. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.time' in that specification. working draft initial definition ...
IntersectionObserverEntry - Web APIs
or the intersection observer's root. intersectionobserverentry.target read only the element whose intersection with the root changed. intersectionobserverentry.time read only a domhighrestimestamp indicating the time at which the intersection was recorded, relative to the intersectionobserver's time origin. methods this interface has no methods. specifications specification status comment intersection observerthe definition of 'intersectionobserverentry' in that specification. working draft initial definition ...
Timing element visibility with the Intersection Observer API - Web APIs
ssed through each ad's htmlelement.dataset attribute, which provides a domstringmap mapping each custom attribute's name to its value. the values are strings, but we can convert those to numbers easily enough—in fact, javascript generally does it automatically, although we'll have one instance where we have to do it ourselves. we start by fetching the time at which the ad's previous visibility status check time (adbox.dataset.lastviewstarted) into a local variable named laststarted. we also get the current time-since-creation value using performance.now() into currenttime. if laststarted is non-zero—meaning the timer is currently running, we compute the difference between the current time and the start time to determine the number of milliseconds the timer has been visible since the last t...
InterventionReportBody - Web APIs
editor's draft ...
Keyboard.getLayoutMap() - Web APIs
editor's draft initial definition. ...
Keyboard.lock() - Web APIs
Web › API › Keyboard › lock
egardless of which modifiers are used with the key press. assuming a standard us qwerty layout, registering "keyw" ensures that "w", shift+"w", control+"w", control+shift+"w", and all other key modifier combinations with "w" are sent to the app. the same applies to for "keya", "keys" and "keyd". navigator.keyboard.lock(["keyw", "keya", "keys", "keyd"]); specifications specification status comment keyboard lockthe definition of 'lock()' in that specification. editor's draft initial definition. ...
Keyboard.unlock() - Web APIs
Web › API › Keyboard › unlock
the unlock() method of the keyboard interface unlocks all keys captured by the keyboard.lock() method and returns synchronously. syntax keyboard.unlock() parameters none. return value undefined specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification. editor's draft defines the keyboard interface. keyboard lockthe definition of 'unlock()' in that specification. editor's draft initial definition. ...
Keyboard - Web APIs
Web › API › Keyboard
string associated with the key that corresponds to the 'w' key on an english qwerty keyboard. if (navigator.keyboard) { var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }); } else { // do something else. } specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification. editor's draft initial definition. keyboard lockthe definition of 'keyboard' in that specification. editor's draft adds lock() and unlock(). ...
KeyboardEvent() - Web APIs
code", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.keycode. "which", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.which. the keyboardeventinit dictionary also accepts fields from the uieventinit and eventinit dictionaries. specifications specification status comment ui eventsthe definition of 'keyboardevent()' in that specification. working draft current definition. document object model (dom) level 3 events specificationthe definition of 'keyboardevent()' in that specification. obsolete initial definition. ...
KeyboardEvent.altKey - Web APIs
obsolete initial definition. ...
KeyboardEvent.charCode - Web APIs
ime results in a keypress event with keycode = 229 and no other key events fire until the ime exits (which may happen after multiple characters are inputted). i'm not sure if other ime's work this way. for a list of the charcode values associated with particular keys, run example 7: displaying event object properties and view the resulting html table. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.charcode' in that specification. obsolete initial definition; specified as deprecated ...
KeyboardEvent.code - Web APIs
ch for keydown events, start motion when that happens, and stop the motion when the corresponding keyup occurs, instead of relying on key repeats. that would allow both smoother and faster movement, but would also allow the player to be moving and steering at the same time. transitions or animations could be used to make the ship's movement smoother, too. specification specification status comment ui eventsthe definition of 'keyboardevent.code' in that specification. working draft initial definition, included code values. ...
KeyboardEvent.ctrlKey - Web APIs
obsolete initial definition. ...
KeyboardEvent.getModifierState() - Web APIs
case "up": // hack for ie and old gecko // do something different if scrolllock is locked. event.preventdefault(); // consume the key event break; } } although this example uses .getmodifierstate() with "alt", "control", "meta" and "shift", using event.altkey, event.ctrlkey, event.metakey and event.shiftkey may be more preferable. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification. obsolete initial definition (modifier keys spec) ...
KeyboardEvent.isComposing - Web APIs
the keyboardevent.iscomposing read-only property returns a boolean value indicating if the event is fired within a composition session, i.e. after compositionstart and before compositionend. syntax var bool = event.iscomposing; example var kbdevent = new keyboardevent("synthetickey", false); console.log(kbdevent.iscomposing); // return false specifications specification status comment ui eventsthe definition of 'keyboardevent.prototype.iscomposing' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'keyboardevent.prototype.iscomposing' in that specification. obsolete initial definition. ...
KeyboardEvent.key - Web APIs
Web › API › KeyboardEvent › key
do something for "enter" or "return" key press. break; case "esc": // ie/edge specific value case "escape": // do something for "esc" key press. break; default: return; // quit when this doesn't handle the key event. } // cancel the default action to avoid it being handled twice event.preventdefault(); }, true); specification specification status comment ui eventsthe definition of 'keyboardevent.key' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'keyboardevent.key' in that specification. obsolete initial definition, included key values. ...
KeyboardEvent.keyCode - Web APIs
var handled = false; if (event.key !== undefined) { // handle the event with keyboardevent.key and set handled true. } else if (event.keycode !== undefined) { // handle the event with keyboardevent.keycode and set handled true. } if (handled) { // suppress "double action" if event handled event.preventdefault(); } }, true); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.keycode' in that specification. obsolete initial definition; specified as deprecated ...
KeyboardEvent.location - Web APIs
ice. note: gecko never fires trusted key events with dom_key_location_joystick except on android. starting 18, native key events on android may have this value. however, at gecko 38, this is dropped. syntax var location = event.location; example function keyevent(event) { console.log("location of key pressed: " + event.location); } specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.location' in that specification. obsolete initial definition. ...
KeyboardEvent.metaKey - Web APIs
8, the ⊞ windows key is not considered the "meta" key. keyboardevent.metakey is false when the ⊞ windows is pressed. syntax var metakeypressed = instanceofkeyboardevent.metakey return value a boolean example function ismetakey(e) { alert("metakey = " + e.metakey); } <button onclick="ismetakey(event)">click me with the meta key</button> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.metakey' in that specification. obsolete initial definition ...
KeyboardEvent.repeat - Web APIs
the repeat read-only property of the keyboardevent interface returns a boolean that is true if the given key is being held down such that it is automatically repeating. syntax var repeat = event.repeat; return value boolean specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.repeat' in that specification. obsolete initial definition. ...
KeyboardEvent.shiftKey - Web APIs
obsolete initial definition. ...
KeyboardEvent.which - Web APIs
obsolete initial definition; specified as deprecated ...
KeyboardEvent - Web APIs
alert(`key pressed ${keyname}`); } }, false); document.addeventlistener('keyup', (event) => { const keyname = event.key; // as the user releases the ctrl key, the key is no longer active, // so event.ctrlkey is false. if (keyname === 'control') { alert('control key was released'); } }, false); </script> </head> <body> </body> </html> specifications specification status comment ui eventsthe definition of 'keyboardevent' in that specification. working draft the keyboardevent interface specification went through numerous draft versions, first under dom events level 2 where it was dropped as no consensus arose, then under dom events level 3. this led to the implementation of non-standard initialization methods, the early dom events lev...
KeyboardLayoutMap.entries - Web APIs
editor's draft initial definition. ...
KeyboardLayoutMap.forEach() - Web APIs
hree arguments: currentvalue the value of the current element being processed. index optional the index of the current element being processed. array optional the keyboardlayoutmap that foreach() is being called on. thisarg optional value to use as this (i.e the reference object) when executing callback. return value undefined. specifications specification status comment keyboard mapthe definition of 'foreach()' in that specification. editor's draft initial definition. ...
KeyboardLayoutMap.get() - Web APIs
editor's draft initial definition. ...
KeyboardLayoutMap.has() - Web APIs
rface returns a boolean indicating whether the object has an element with the specified key. a list of valid keys is found in the ui events keyboardevent code values spec. syntax var aboolean = keyboardlayoutmap.has(key) parameters key the key of an element to search for in the map. return value a boolean indicating whether the specifed key was found. example specification status comment keyboard mapthe definition of 'has()' in that specification. editor's draft initial definition. ...
KeyboardLayoutMap.keys - Web APIs
editor's draft initial definition. ...
KeyboardLayoutMap.size - Web APIs
the size read-only property of the keyboardlayoutmap interface returns the number of elements in the map. syntax var size = keyboardlayoutmap.size() value a number. specifications specification status comment keyboard mapthe definition of 'size' in that specification. editor's draft initial definition. ...
KeyboardLayoutMap.values - Web APIs
editor's draft initial definition. ...
KeyboardLayoutMap - Web APIs
editor's draft initial definition. ...
Keyboard API - Web APIs
key presses from the physical keyboard. keyboardlayoutmap a map-like object with functions for retrieving the string associated with specific physical keys. navigator.keyboard read only returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard. specifications specification status comment keyboard map editor's draft initial definition. keyboard lock editor's draft initial definition. ...
KeyframeEffect.KeyframeEffect() - Web APIs
draft added the iterationcomposite option. web animationsthe definition of 'keyframeeffect()' in that specification. working draft editor's draft. ...
KeyframeEffect.composite - Web APIs
an underlying property value of blur(3). replace the keyframeeffect overrides the underlying value it is combined with: blur(2) replaces blur(3). add the keyframeeffect is added to the underlying value with which it is combined (aka additive): blur(2) blur(3). accumulate the keyframeeffect is accumulated on to the underlying value: blur(5). specifications specification status comment web animationsthe definition of 'keyframeeffect.composite' in that specification. working draft editor's draft. ...
KeyframeEffect.getKeyframes() - Web APIs
values specified in this keyframe with the underlying value. this will be absent if the composite operation specified on the effect is being used. examples in the red queen race example, we can inspect alice and the redqueen's animation to see its individual keyframes like so: // return the array of keyframes redqueen_alice.effect.getkeyframes(); specifications specification status comment web animationsthe definition of 'keyframeeffect.getkeyframes()' in that specification. working draft editor's draft. ...
KeyframeEffect.iterationComposite - Web APIs
draft initial definition. ...
KeyframeEffect.setKeyframes() - Web APIs
working draft editor's draft. ...
KeyframeEffect.target - Web APIs
working draft editor's draft. ...
KeyframeEffect - Web APIs
working draft initial definition ...
KeyframeEffectOptions - Web APIs
e starting halfway through the first iteration for example, and with this value set, an animation with 2 iterations would end halfway through a third iteration. defaults to 0.0. iterations optional the number of times the animation should repeat. defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists. specifications specification status comment web animations level 2the definition of 'keyframeeffectoptions' in that specification. draft added the iterationcomposite option. web animationsthe definition of 'keyframeeffectoptions' in that specification. working draft initial definition. ...
LargestContentfulPaint - Web APIs
tentful-paint', buffered: true}); // send data to the server. addeventlistener('visibilitychange', function fn() { if (lcp && document.visibilitystate === 'hidden') { console.log('lcp:', lcp); removeeventlistener('visibilitychange', fn, true); } }, true); } catch (e) { // do nothing if the browser doesn't support this api. } specifications specification status comment largest contentful paintthe definition of 'largestcontentfulpaint' in that specification. editor's draft initial definition. ...
LayoutShift - Web APIs
editor's draft initial definition. ...
LayoutShiftAttribution - Web APIs
h have shifted. properties layoutshiftattribution.node returns the element that has shifted (null if it has been removed). layoutshiftattribution.previousrect returns a domrect representing the position of the element before the shift. layoutshiftattribution.currentrect returns a domrect representing the position of the element after the shift. specifications specification status comment layout instability apithe definition of 'layoutshiftattribution' in that specification. editor's draft initial definition. ...
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
hould be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends on device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'linearaccelerationsensor' in that specification. candidate recommendation ...
LinearAccelerationSensor.x - Web APIs
xty times a second. let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'x' in that specification. candidate recommendation ...
LinearAccelerationSensor.y - Web APIs
xty times a second. let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'y' in that specification. candidate recommendation ...
LinearAccelerationSensor.z - Web APIs
xty times a second. let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'z' in that specification. candidate recommendation ...
LinearAccelerationSensor - Web APIs
xty times a second. let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. accelerometerthe definition of 'linearaccelerationsensor' in that specification. candidate recommendation ...
LinkStyle - Web APIs
Web › API › LinkStyle
linkstyle is a raw interface and no object of this type can be created; it is implemented by htmllinkelement and htmlstyleelement objects. properties there is no inherited property. linkstyle.sheet read only returns the cssstylesheet object associated with the given element, or null if there is none. methods this interface implements no method. specifications specification status comment css object model (cssom)the definition of 'linkstyle' in that specification. working draft linkstyle.sheet returns more specialized cssstylesheet instead of stylesheet document object model (dom) level 2 style specificationthe definition of 'linkstyle' in that specification. obsolete initial definition ...
Location: ancestorOrigins - Web APIs
object. you can use location.ancestororigins in the script for a document to determine, for example, whenever the document is being framed by a site which you don’t expect it to be framed by. you can also use it to vary the behavior of the document based on what site or list of sites is framing it. syntax const ancestors = location.ancestororigins; specifications specification status comment html living standardthe definition of 'ancestororigins ' in that specification. living standard ...
Location: assign() - Web APIs
Web › API › Location › assign
n the script is hosted on a different domain. if the provided url is not valid, a domexception of the syntax_error type is thrown. syntax location.assign(url); parameters url is a domstring containing the url of the page to navigate to. example // navigate to the location.reload article window.location.assign('/docs/web/api/location/reload'); specifications specification status comment html living standardthe definition of 'location.assign()' in that specification. living standard no change from html5. html5the definition of 'location.assign()' in that specification. recommendation initial definition. ...
Location: hash - Web APIs
Web › API › Location › hash
nt-decoded. if the url does not have a fragment identifier, this property contains an empty string, "". syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/location.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'hash' in that specification. living standard initial definition ...
Location: host - Web APIs
Web › API › Location › host
living standard initial definition ...
Location: hostname - Web APIs
Web › API › Location › hostname
ce is a usvstring containing the domain of the url. syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'hostname' in that specification. living standard initial definition. ...
Location: href - Web APIs
Web › API › Location › href
want redirection, use location.replace(). syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/location/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/location/href' specifications specification status comment html living standardthe definition of 'href' in that specification. living standard initial definition. ...
Location: origin - Web APIs
Web › API › Location › origin
pendant; for url using the blob: scheme, the origin of the url following blob:. e.g "blob:https://mozilla.org" will have "https://mozilla.org". note: this feature is available in web workers. syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'origin' in that specification. living standard initial definition. ...
Location: pathname - Web APIs
Web › API › Location › pathname
e url (or the empty string if there is no path). syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/location.pathname' specifications specification status comment html living standardthe definition of 'pathname' in that specification. living standard initial definition. ...
Location: port - Web APIs
Web › API › Location › port
url. if the url does not contain an explicit port number, it will be set to ''. syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/location.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'location.port' in that specification. living standard initial definition. ...
Location: protocol - Web APIs
Web › API › Location › protocol
representing the protocol scheme of the url, including the final ':'. syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/location.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'protocol' in that specification. living standard initial definition. ...
Location: reload() - Web APIs
Web › API › Location › reload
the location.reload() method reloads the current url, like the refresh button. the reload may be blocked and a security_error domexception thrown. this happens if the origin of the script calling location.reload() differs from the origin of the page that owns the location object. see same-origin policy for more information. syntax location.reload(); specifications specification status comment html living standardthe definition of 'location.reload()' in that specification. living standard no change from html5. html5the definition of 'location.reload()' in that specification. recommendation initial definition. ...
Location: replace() - Web APIs
Web › API › Location › replace
n a different domain. if the provided url is not valid, a domexception of the syntax_error type is thrown. syntax object.replace(url); parameters url is a domstring containing the url of the page to navigate to. examples // navigate to the location.reload article by replacing this page window.location.replace('/docs/web/api/location.reload'); specifications specification status comment html living standardthe definition of 'location.replace()' in that specification. living standard no change from html5. html5the definition of 'location.replace()' in that specification. recommendation initial definition. ...
Location: search - Web APIs
Web › API › Location › search
living standard initial definition. ...
Location: toString() - Web APIs
Web › API › Location › toString
ad-only version of location.href. ...
Location - Web APIs
Web › API › Location
living standard ...
Locks.mode - Web APIs
Web › API › Lock › mode
draft initial definition. ...
Locks.name - Web APIs
Web › API › Lock › name
le the following examples show how the name property passed in the call to lockmanager.request(). lockmanager is the object returned by navigator.locks. navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'name' in that specification. draft initial definition. ...
Lock - Web APIs
Web › API › Lock
manager.request(). lockmanager is the object returned by navigator.locks. navigator.locks.request("net_db_sync", show_lock_properties); navigator.locks.request("another_lock", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'lock' in that specification. draft initial definition. ...
LockManager.query() - Web APIs
Web › API › LockManager › query
ts for held locks. 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. draft initial definition. ...
LockManager.request() - Web APIs
. const controller = new abortcontroller(); // wait at most 200ms. settimeout(() => controller.abort(), 200); try { await navigator.locks.request('my_resource', {signal: controller.signal}, async lock => { // the lock was acquired! }); } catch (ex) { if (ex.name === 'aborterror') { // the request aborted before it could be granted. } } specifications specification status comment web locks apithe definition of 'request()' in that specification. draft initial definition. ...
LockManager - Web APIs
ect and querying for an existing lock object. to get an instance of lockmanager, call navigator.locks. methods lockmanager.request() requests a lock object with parameters specifying its name and characteristics. lockmanager.query() returns a promise that resolves with a lockmanagersnapshot which contains information about held and pending locks. specifications specification status comment web locks apithe definition of 'lockmanager' in that specification. draft initial definition. ...
LockedFile.abort() - Web APIs
Web › API › LockedFile › abort
g operations are canceled. ...
LockedFile.active - Web APIs
Web › API › LockedFile › active
ows to know if the lockedfile object is still usable (true) or not (false). if the object is inactive then it is impossible to perform any read or write operation with it. typically, a lockedfile object becomes inactive when the lockedfile.abort() method is called or if an error occurs. syntax var state = instanceoflockedfile.active value a boolean. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.append() - Web APIs
Web › API › LockedFile › append
tion is performed at the end of the file, regardless of the lockedfile.location value, and actually sets this value to null. syntax var request = instanceoflockedfile.append(data); parameters data the data to write into the file. it can be a string or an arraybuffer. return a filerequest object to handle the success or failure of the operation. specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.fileHandle - Web APIs
cing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary the filehandle property gives access to the filehandle object that produced the lockedfile object. syntax var handler = instanceoflockedfile.filehandle value a filehandle object. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.flush() - Web APIs
Web › API › LockedFile › flush
operations. periodically, the data are written onto disk. ...
LockedFile.getMetadata() - Web APIs
data 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. they have the following format: size : a number lastmodified : a date object specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.location - Web APIs
read/write pointer within the file. its value indicates at which bytes within the file any write or read operation will start. this value is changed automatically after every read and write operation. the special value null means end-of-file. this property can be changed at will. syntax var location = instanceoflockedfile.location value a number. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.mode - Web APIs
Web › API › LockedFile › mode
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary the mode property provides the read/write status of the lockedfile file. syntax var mode = instanceoflockedfile.mode value a string, one of readonly or readwrite. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.onabort - Web APIs
ities between implementations and the behavior may change in the future. summary specifies an event listener to receive abort events. these events occur when the locked file has been aborted with the lockedfile.abort() method. syntax instanceoflockedfile.onabort = funcref; where funcref is a function to be called when the abort event occurs. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.oncomplete - Web APIs
e incompatibilities between implementations and the behavior may change in the future. summary specifies an event listener to receive complete events. these events occur each time a read or write operation is successful. syntax instanceoflockedfile.oncomplete = funcref; where funcref is a function to be called when the complete event occurs. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.onerror - Web APIs
very user. there may also be large incompatibilities between implementations and the behavior may change in the future. summary specifies an event listener to receive error events. these events occur when something goes wrong. syntax instanceoflockedfile.onerror = funcref; where funcref is a function to be called when the error event occurs. specifications specification status comment filesystem api editor's draft draft proposal. ...
LockedFile.readAsArrayBuffer() - Web APIs
.location property. ...
LockedFile.readAsText() - Web APIs
of bytes to read in the file. ...
LockedFile.truncate() - Web APIs
s all the bytes starting at the index corresponding to the parameter and regardless of the value of lockedfile.location. 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. specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.write() - Web APIs
Web › API › LockedFile › write
he file. ...
LockedFile - Web APIs
allows to write some data at the end of the file. returns a filerequest object. lockedfile.truncate() allows to truncate the file's content. returns a filerequest object. lockedfile.flush() allows to guarantee that any buffered data has been transferred to disk. lockedfile.abort() makes the lockedfile inactive and cancels all ongoing operations. specifications specification status comment filesystem api editor's draft draft proposal. ...
Long Tasks API - Web APIs
...
MIDIAccess - Web APIs
...
MIDIConnectionEvent - Web APIs
...
MIDIInput - Web APIs
Web › API › MIDIInput
...
MIDIInputMap - Web APIs
...
MIDIMessageEvent - Web APIs
working draft initial definition. ...
MIDIOutputMap - Web APIs
...
Magnetometer.Magnetometer() - Web APIs
hould be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends on device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment generic sensor api candidate recommendation defines sensors in general. magnetometerthe definition of 'magnetometer' in that specification. candidate recommendation ...
Magnetometer.x - Web APIs
Web › API › Magnetometer › x
below this occurs sixty times a second. let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. magnetometerthe definition of 'x' in that specification. candidate recommendation ...
Magnetometer.y - Web APIs
Web › API › Magnetometer › y
below this occurs sixty times a second. let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. magnetometerthe definition of 'y' in that specification. candidate recommendation ...
Magnetometer.z - Web APIs
Web › API › Magnetometer › z
below this occurs sixty times a second. let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. magnetometerthe definition of 'z' in that specification. candidate recommendation ...
Magnetometer - Web APIs
below this occurs sixty times a second. let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general. magnetometerthe definition of 'magnetometer' in that specification. candidate recommendation ...
MathMLElement - Web APIs
his interface has no methods, but inherits methods from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement examples mathml <math xmlns="http://www.w3.org/1998/math/mathml"> <msqrt> <mi>x</mi> </msqrt> </math> javascript document.queryselector('msqrt').constructor.name; // mathmlelement specifications specification status comment mathmlelement interface ...
MediaCapabilities.decodingInfo() - Web APIs
that 1s. }, }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported, ' + (result.smooth ? '' : 'not ') + 'smooth, and ' + (result.powerefficient ? '' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'decodinginfo()' in that specification. draft initial definition ...
MediaCapabilities.encodingInfo() - Web APIs
p that 1s. } }; // check support and performance navigator.mediacapabilities.encodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported, ' + (result.smooth ? '' : 'not ') + 'smooth, and ' + (result.powerefficient ? '' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'encodinginfo()' in that specification. draft initial definition ...
MediaCapabilities - Web APIs
th information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient. mediacapabilities.decodinginfo() when passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether decoding such media would be smooth and power efficient. specifications specification status comment media capabilitiesthe definition of 'mediacapabilities' in that specification. draft initial definition ...
MediaCapabilitiesInfo - Web APIs
draft initial definition ...
MediaConfiguration - Web APIs
draft initial definition ...
MediaDecodingConfiguration - Web APIs
the video bitrate : 10000, // number of bits used to encode 1s of video framerate : 30 // number of frames making up that 1s. } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediadecodingconfiguration' in that specification. draft initial definition ...
MediaDeviceInfo.deviceId - Web APIs
the represented device and is persisted across sessions. it is un-guessable by other applications, and unique to the origin of the calling application. it is reset when the user clears cookies. for private browsing, a different identifier is used that is not persisted across sessions. syntax var deviceid = mediadeviceinfo.deviceid value a domstring. specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrom...
MediaDeviceInfo.groupId - Web APIs
e returns a domstring that is a group identifier. two devices have the same group identifier if they belong to the same physical device; for example, a monitor with both a built-in camera and microphone. syntax var groupid = mediadeviceinfo.groupid; value a domstring which uniquely identifies the group of related devices to which this device belongs. specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification. candidate recommendation initial definition. examples in this example, we assemble a list of the devices which are part of the same group as a given device. this might be used to produce a user interface that gathers associated devices together for presentation purposes, or to make it eas...
MediaDeviceInfo.kind - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
MediaDeviceInfo.label - Web APIs
have been granted. syntax var label = mediadeviceinfo.label; value a domstring which describes the media device. for security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a stream from the microphone or camera, or by persistent permissions being granted. specifications specification status comment media capture and streamsthe definition of 'label' in that specification. candidate recommendation initial definition. ...
MediaDeviceInfo - Web APIs
candidate recommendation initial definition ...
MediaDevices: devicechange event - Web APIs
candidate recommendation ...
MediaDevices.enumerateDevices() - Web APIs
candidate recommendation initial definition. ...
MediaDevices.getDisplayMedia() - Web APIs
working draft initial definition ...
MediaDevices.getSupportedConstraints() - Web APIs
candidate recommendation initial definition. ...
MediaDevices.getUserMedia() - Web APIs
e cases, like webrtc transmissions with bandwidth restrictions. var constraints = { video: { framerate: { ideal: 10, max: 15 } } }; front and back camera on mobile phones. var front = false; document.getelementbyid('flip-button').onclick = function() { front = !front; }; var constraints = { video: { facingmode: (front? "user" : "environment") } }; specifications specification status comment media capture and streamsthe definition of 'mediadevices.getusermedia()' in that specification. candidate recommendation initial definition ...
MediaDevices.ondevicechange - Web APIs
e stream is opened. the second is in the event handler for devicechange: navigator.mediadevices.ondevicechange = function(event) { updatedevicelist(); } with this code in place, each time the user plugs in a camera, microphone, or other media device, or turns one on or off, we call updatedevicelist() to redraw the list of connected devices. result specifications specification status comment media capture and streamsthe definition of 'ondevicechange' in that specification. candidate recommendation initial specification. ...
MediaDevices - Web APIs
candidate recommendation initial definition ...
MediaElementAudioSourceNode() - Web APIs
diaelement: an htmlmediaelement that will be used as the source for the audio. return value a new mediaelementaudiosourcenode object instance. example var ac = new audiocontext(); var mediaelement = document.createelement('audio'); var options = { mediaelement : mediaelement } var myaudiosource = new mediaelementaudiosourcenode(ac, options); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification. working draft ...
MediaElementAudioSourceNode.mediaElement - Web APIs
nt; value an htmlmediaelement representing the element which contains the source of audio for the node. examples const audioctx = new window.audiocontext(); const audioelem = document.queryselector('audio'); let options = { mediaelement: audioelem } let source = new mediaelementaudiosourcenode(audioctx, options); console.log(source.mediaelement); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode.mediaelement' in that specification. working draft ...
MediaElementAudioSourceNode - Web APIs
working draft ...
MediaEncodingConfiguration - Web APIs
the video bitrate : 10000, // number of bits used to encode 1s of video framerate : 30 // number of frames making up that 1s. } }; // check support and performance navigator.mediacapabilities.encodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediaencodingconfiguration' in that specification. draft initial definition ...
MediaError.code - Web APIs
Web › API › MediaError › code
<video> element, establishes an error handler for it, and then sets the element's src attribute to the video resource to present in the element. the error handler simply outputs a message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https://example.com/blahblah.mp4"; specifications specification status comment html living standardthe definition of 'mediaerror.code' in that specification. living standard initial definition ...
MediaError.message - Web APIs
udioelement representing the audio player. the error's code attribute is checked to determine a generic error message to display, and, if message is not empty, it's appended to provide additional details. then the resulting text is output to the log. result you can try out this example below, and can see the example in action outside this page here. specifications specification status comment html living standardthe definition of 'mediaerror.message' in that specification. living standard initial definition ...
MediaError - Web APIs
on to help in understanding what exactly went wrong. this text and its format is not defined by the specification and will vary from one user agent to another. if no diagnostics are available, or no explanation can be provided, this value is an empty string (""). methods this interface doesn't implement or inherit any methods, and has none of its own. specifications specification status comment html living standardthe definition of 'mediaerror' in that specification. living standard ...
MediaImage - Web APIs
mage's data. sizes specifies the resource in multiple sizes so that user agent does not have to scale a single image. type the mime type hint for the user agant. note that it is just a hint so that user agent may ignore images of types it does not support; user agent still may use mime type sniffing after downloading the image to determine its type. specifications specification status comment media session standardthe definition of 'mediaimage' in that specification. draft initial definition. ...
message - Web APIs
the mediakeymessageevent.message read-only property returns an arraybuffer with a message from the content decryption module. messages vary by key system. syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'message' in that specification. recommendation initial definition. ...
MediaKeyMessageEvent.messageType - Web APIs
the mediakeymessageevent.messagetype read-only property indicates the type of message. it may be one of license-request, license-renewal, license-release, or individualization-request. syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'messagetype' in that specification. recommendation initial definition ...
MediaKeyMessageEvent - Web APIs
read only returns an arraybuffer with a message from the content decryption module. messages vary by key system. mediakeymessageevent.messagetype read only indicates the type of message. may be one of license-request, license-renewal, license-release, or individualization-request. methods inherits methods from its parent, event. examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeymessageevent' in that specification. recommendation initial definition. ...
close() - Web APIs
recommendation initial definition ...
MediaKeySession.closed - Web APIs
the mediakeysession.closed read-only property returns a promise signaling when a mediakeysession closes. this promise can only be fulfilled and is never rejected. closing a session means that licenses and keys associated with it are no longer valid for decrypting media data. syntax var promise = mediakeysessionobj.closed; value a promise. specifications specification status comment encrypted media extensionsthe definition of 'closed' in that specification. recommendation initial definition ...
expiration - Web APIs
the current session can no longer be used to decrypt media data, or nan if no such time exists. this value is determined by the cdm and measured in milliseconds since january 1, 1970, utc. this value may change during a session lifetime, such as when an action triggers the start of a window. syntax ​var expirationtime = mediakeysessionobj.expiration; specifications specification status comment encrypted media extensionsthe definition of 'expiration' in that specification. recommendation initial definition ...
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. recommendation initial definition ...
load() - Web APIs
specified session object. syntax mediakeysession.load(sessionid).then(function(booleanvalue) { ... }); parameter sessionid a unique string generated by the content decription module for the current media object and its associated keys or licenses. return value a promise that resolves to a boolean indicating whether the load succeeded or failed. specifications specification status comment encrypted media extensionsthe definition of 'load()' in that specification. recommendation initial definition ...
MediaKeySession.onmessage - Web APIs
recommendation initial definition. ...
remove() - Web APIs
the mediakeysession.remove() method returns a promise after removing any session data associated with the current object. return value a promise that resolves to a boolean indicating whether the load succeeded or failed. specifications specification status comment encrypted media extensionsthe definition of 'remove()' in that specification. recommendation initial definition ...
sessionId - Web APIs
recommendation initial definition ...
update() - Web APIs
the mediakeysession.update() method loads messages and licenses to the cdm, and then returns a promise . syntax mediakeysession.update(response).then(function() { ... }); parameters response an instance of type buffersource. return value a promise. specifications specification status comment encrypted media extensionsthe definition of 'update()' in that specification. recommendation initial definition ...
createMediaKeys() - Web APIs
the mediakeysystemaccess.createmediakeys() method returns a promise that resolves to a new mediakeys object. syntax var mediakeys = await mediakeysystemaccess.createmediakeys(); specifications specification status comment encrypted media extensionsthe definition of 'createmediakeys()' in that specification. recommendation initial definition ...
getConfiguration() - Web APIs
the mediakeysystemaccess.getconfiguration() method returns a mediakeysystemconfiguration object with the supported combination of configuration options. syntax var mediakeysystemconfiguration = mediakeysystemaccess.getconfiguration(); specifications specification status comment encrypted media extensionsthe definition of 'getconfiguration()' in that specification. recommendation initial definition ...
keySystem - Web APIs
the mediakeysystemaccess.keysystem read-only property returns a domstring identifying the key system being used. syntax var keysystem = mediakeysystemaccess.keysystem; specifications specification status comment encrypted media extensionsthe definition of 'keysystem' in that specification. recommendation initial definition ...
MediaKeySystemAccess - Web APIs
diakeysystemaccess.keysystem read only returns a domstring identifying the key system being used. methods mediakeysystemaccess.createmediakeys() returns a promise that resolves to a new mediakeys object. mediakeysystemaccess.getconfiguration() returns a mediakeysystemconfiguration object with the supported combination of configuration options. specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemaccess' in that specification. recommendation initial definition. ...
audioCapabilities - Web APIs
the mediakeysystemconfiguration.audiocapabilities read-only property returns an array of supported audio type and capability pairs. syntax var audiocapabilities[ {contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.audiocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'audiocapabilities' in that specification. recommendation initial definition ...
distinctiveIdentifier - Web APIs
the mediakeysystemconfiguration.distinctiveidentifier read-only property indicates whether a persistent distinctive identifier is required. syntax var distinctiveidentifier = mediasystemconfiguration.distinctiveidentifier; specifications specification status comment encrypted media extensionsthe definition of 'distinctiveidentifier' in that specification. recommendation initial definition ...
initDataTypes - Web APIs
the mediakeysystemconfiguration.initdatatypes read-only property returns a list of supported initialization data type names. an initialization data type is a string indicating the format of the initialization data. syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification. recommendation initial definition ...
persistentState - Web APIs
the mediakeysystemconfiguration.persistentstate read-only property indicates whether the ability to persist state is required. syntax var persistentstate = mediasystemconfiguration.persistentstate; specifications specification status comment encrypted media extensionsthe definition of 'persistentstate' in that specification. recommendation initial definition ...
videoCapabilities - Web APIs
the mediakeysystemconfiguration.videocapabilities read-only property returns an array of supported video type and capability pairs. syntax var videocapabilities[{contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.videocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'videocapabilities' in that specification. recommendation initial definition ...
MediaKeySystemConfiguration - Web APIs
stemconfiguration.videocapabilities read only returns a list of supported video type and capability pairs. mediakeysystemconfiguration.distinctiveidentifier read only indicates whether a persistent distinctive identifier is required. mediakeysystemconfiguration.persistentstate read only indicates whether the ability to persist state is required. specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemconfiguration' in that specification. recommendation initial definition ...
createSession() - Web APIs
recommendation initial definition ...
setServerCertificate() - Web APIs
the mediakeys.setservercertificate() method a promise to a server certificate to be used to encrypt messages to the license server. syntax mediakeys.setservercertificate([mediakeysessiontype]).then(function() { ... }); specifications specification status comment encrypted media extensionsthe definition of 'setservercertificate()' in that specification. recommendation initial definition ...
MediaKeys - Web APIs
Web › API › MediaKeys
a data during playback. properties none. methods mediakeys.createsession() returns a new mediakeysession object, which represents a context for message exchange with a content decryption module (cdm). mediakeys.setservercertificate() returns a promise to a server certificate to be used to encrypt messages to the license server. examples //tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeys' in that specification. recommendation initial definition. ...
MediaList.mediaText - Web APIs
ediatext to null, it will be treated as an empty string, i.e. the value will be set to "". examples the following would log to the console a textual representation of the medialist of the first stylesheet applied to the current document. const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'mediatext' in that specification. working draft ...
MediaList - Web APIs
Web › API › MediaList
esenting a media query as text, given the media query's index value inside the medialist. examples the following would log to the console a textual representation of the medialist of the first stylesheet applied to the current document. const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'medialist' in that specification. working draft ...
MediaMetadata.MediaMetadata() - Web APIs
draft initial definition. ...
MediaMetadata.album - Web APIs
draft initial definition. ...
MediaMetadata.artist - Web APIs
draft initial definition. ...
MediaMetadata.artwork - Web APIs
draft initial definition. ...
MediaMetadata.title - Web APIs
draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
MediaMetadata - Web APIs
or sets the title of the media to be played. mediametadata.artist returns or sets the name of the artist, group, creator, etc. of the media to be played. mediametadata.album returns or sets the name of the album or collection containing the media to be played. mediametadata.artwork returns or sets an array of images associated with playing media. specifications specification status comment media session standardthe definition of 'mediametadata' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinter...
MediaPositionState.duration - Web APIs
ty). example in this example, an app performing a live stream provides information to the browser by preparing a mediapositionstate object and submitting it by calling navigator.mediasession.setpositionstate(). let positionstate = { duration: infinity; playbackrate: 1.0; position: 0.0; }; navigator.mediasession.setpositionstate(positionstate); specifications specification status comment media session standardthe definition of 'mediapositionstate.duration' in that specification. draft initial definition. ...
MediaPositionState.playbackRate - Web APIs
e-speed mode. it begins by creating a mediapositionstate object, then submits it to the browser it by calling navigator.mediasession.setpositionstate(). let positionstate = { duration: mymediaduration; playbackrate: 2.0; position: mymediaposition; }; navigator.mediasession.setpositionstate(positionstate); note the value 2.0 as the playbackrate. specifications specification status comment media session standardthe definition of 'mediapositionstate.playbackrate' in that specification. draft initial definition. ...
MediaPositionState.position - Web APIs
erval handler. let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediapositionstate.position' in that specification. draft initial definition. ...
MediaPositionState - Web APIs
speed, 2 is playing at double speed, and so forth. negative values indicate that the media is playing in reverse; -1 indicates playback at the normal speed but backward, -2 is double speed in reverse, and so on. position a floating-point value indicating the last reported playback position of the media in seconds. this must always be a positive value. specifications specification status comment media session standardthe definition of 'mediapositionstate' in that specification. draft initial definition. ...
MediaQueryList.matches - Web APIs
working draft initial definition ...
MediaQueryList.media - Web APIs
e media query to match into matchmedia() to compile it, then sets the <span>'s innertext to the value of the result's media property. html <span class="mq-value"></span> a simple <span> to receive the output. css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification. working draft initial definition ...
MediaQueryList.removeListener() - Web APIs
working draft initial definition ...
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
the mediaquerylistevent constructor creates a new mediaquerylistevent instance. syntax var mymqlevent = new mediaquerylistevent(init); parameters init an init object that defines features of the new object instance. the available properties are: media: a domstring representing a serialized media query. matches: a boolean representing the media query status — true if it matches, false if not. examples var media = '(max-width: 600px)'; var matches = true; var mymediaquerylistevent = new mediaquerylistevent({media, matches}); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent()' in that specification. working draft initial definition ...
MediaQueryListEvent.matches - Web APIs
working draft initial definition ...
MediaQueryListEvent.media - Web APIs
working draft initial definition ...
MediaQueryListEvent - Web APIs
working draft initial definition ...
MediaQueryListListener - Web APIs
the values periodically, if you need to detect changes to the values of media queries on a document. a mediaquerylistlistener is a callback function that gets invoked with a single argument, the mediaquerylist for which the evaluated result changed. syntax function( mediaquerylist ) { ... } parameters mediaquerylist the mediaquerylist instance. specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistlistener' in that specification. working draft initial definition ...
MediaRecorder() - Web APIs
.mediadevices.getusermedia) { var constraints = { audio: true, video: true }; var chunks = []; var onsuccess = function(stream) { var options = { audiobitspersecond : 128000, videobitspersecond : 2500000, mimetype : 'video/mp4' } var mediarecorder = new mediarecorder(stream,options); m = mediarecorder; ... } } specifications specification status comment mediastream recording working draft initial definition ...
MediaRecorder.audioBitsPerSecond - Web APIs
the audiobitspersecond read-only property of the mediarecorder interface returns the audio encoding bit rate in use. this may differ from the bit rate specified in the constructor (if it was provided). syntax var audiobitspersecond = mediarecorder.audiobitspersecond value a number (unsigned long). specifications specification status comment mediastream recordingthe definition of 'audiobitspersecond' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
MediaRecorder: dataavailable event - Web APIs
corder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } ... specifications specification status mediastream recording working draft ...
MediaRecorder: error event - Web APIs
the same, but using the onerror event handler property: async function record() { const stream = await navigator.mediadevices.getusermedia({audio: true}); const recorder = new mediarecorder(stream); recorder.onerror = (event) => { console.error(`error recording stream: ${event.error.name}`) }; recorder.start(); } record(); specifications specification status mediastream recording working draft ...
MediaRecorder.isTypeSupported - Web APIs
working draft initial definition. ...
MediaRecorder.mimeType - Web APIs
profile level 4 for video and aac-lc (low complexity) for audio, which is good for mobile and other possible resource-constrained situations. mimetype: 'video/mp4; codecs="avc1.424028, mp4a.40.2"' assuming this configuration is acceptable to the user agent, the value returned later by m.mimetype would then be video/mp4; codecs="avc1.424028, mp4a.40.2". specifications specification status comment mediastream recordingthe definition of 'mediarecorder.mimetype' in that specification. working draft initial definition ...
MediaRecorder.ondataavailable - Web APIs
working draft initial definition ...
MediaRecorder.onerror - Web APIs
working draft initial definition ...
MediaRecorder.onpause - Web APIs
working draft initial definition ...
MediaRecorder.onresume - Web APIs
working draft initial definition ...
MediaRecorder.onstart - Web APIs
recorder.onstart = function(event) { ... } mediarecorder.addeventlistener('start', function(event) { ... }) example ... record.onclick = function() { mediarecorder.start(); console.log("recorder started"); } mediarecorder.onstart = function() { // do something in response to // recording being started } ... properties none. specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstart' in that specification. working draft initial definition ...
MediaRecorder.onstop - Web APIs
working draft initial definition ...
MediaRecorder.pause() - Web APIs
diarecorder.pause() return value undefined. exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active. if you call pause() while already paused, it silently does nothing. example ... pause.onclick = function() { mediarecorder.pause(); console.log("recording paused"); } ... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.pause()' in that specification. working draft initial definition ...
MediaRecorder.requestData() - Web APIs
ed while the mediarecorder object’s mediarecorder.state is not "recording" — the media cannot be captured if recording is not occurring. example ... capturemedia.onclick = function() { mediarecorder.requestdata(); // makes snapshot available of data so far // ondataavailable fires, then capturing continues // in new blob } ... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.requestdata()' in that specification. working draft initial definition ...
MediaRecorder.resume() - Web APIs
t already paused; if mediarecorder.state is already "recording", resume() has no effect. example ... pause.onclick = function() { if(mediarecorder.state === "recording") { mediarecorder.pause(); // recording paused } else if(mediarecorder.state === "paused") { mediarecorder.resume(); // resume recording } } ... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.resume()' in that specification. working draft initial definition ...
MediaRecorder.start() - Web APIs
constraint on the source stream. this exception may also be delivered as an error event if the security options for the source media change after recording begins. unknownerror something else went wrong during the recording process. example ... record.onclick = function() { mediarecorder.start(); console.log("recorder started"); } ... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.start()' in that specification. working draft initial definition ...
MediaRecorder.state - Web APIs
recording recording has been started and the ua is capturing data. paused recording has been started, then paused, but not yet stopped or resumed. example ... record.onclick = function() { mediarecorder.start(); console.log(mediarecorder.state); // will return "recording" console.log("recorder started"); } ... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.state' in that specification. working draft initial definition ...
MediaRecorder.stop() - Web APIs
working draft initial definition ...
MediaRecorder.stream - Web APIs
working draft initial definition ...
MediaRecorder.videoBitsPerSecond - Web APIs
the videobitspersecond read-only property of the mediarecorder interface returns the video encoding bit rate in use. this may differ from the bit rate specified in the constructor, if it was provided. syntax var videobitspersecond = mediarecorder.videobitspersecond value a number (unsigned long). example // tbd specifications specification status comment mediastream recordingthe definition of 'videobitspersecond' in that specification. working draft initial definition. ...
MediaRecorder - Web APIs
ttgt.parentnode); } } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } }) .catch(function(err) { console.log('the following error occurred: ' + err); }) } this code sample is inspired by the web dictaphone demo. some lines have been omitted for brevity; refer to the source for the complete code. specifications specification status comment mediastream recording working draft initial definition ...
MediaRecorderErrorEvent() - Web APIs
he error that occurred. the other fields may or may not be present. some user agents add to the error object other properties that provide information such as stack dumps, the name of the javascript file and the line number where the error occurred, and other debugging aids, but you should not rely on this information in a production environment. specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent()' in that specification. working draft initial definition. ...
MediaRecorderErrorEvent.error - Web APIs
working draft initial specification. ...
MediaRecorderErrorEvent - Web APIs
ies inherits properties from its parent interface, event. error read only a domexception containing information about the error that occurred. read only. constructor mediastreamrecorderevent() creates and returns a new mediarecordererrorevent event object with the given parameters. methods inherits methods from its parent interface, event. specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent' in that specification. working draft initial definition. ...
MediaSession.metadata - Web APIs
draft initial definition. ...
MediaSession.playbackState - Web APIs
draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinter...
MediaSession.setActionHandler() - Web APIs
draft initial definition. ...
MediaSession.setPositionState() - Web APIs
rval handler. let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediasession.setpositionstate()' in that specification. draft initial definition. ...
MediaSession - Web APIs
draft initial definition. ...
Media Session action types - Web APIs
draft initial definition. ...
MediaSessionActionDetails.action - Web APIs
ition through the media. seekto moves the playback position to the specified time within the media. skipad skips past the currently playing advertisement or commercial. this action may or may not be available, depending on the platform and user agent, or may be disabled due to subscription level or other circumstances. stop halts playback entirely. specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.action' in that specification. draft initial definition. ...
MediaSessionActionDetails.fastSeek - Web APIs
draft initial definition. ...
MediaSessionActionDetails.seekOffset - Web APIs
draft initial definition. ...
MediaSessionActionDetails.seekTime - Web APIs
draft initial definition. ...
MediaSessionActionDetails - Web APIs
draft initial definition. ...
MediaSettingsRange.max - Web APIs
the max read-only property of the mediasettingsrange interface returns the maximum value of the settings range. syntax var max = mediasettingsrange.max value a double integer. specifications specification status comment mediastream image capturethe definition of 'max' in that specification. working draft initial definition. ...
MediaSettingsRange.min - Web APIs
the min read-only property of the mediasettingsrange interface returns the minimum value of the settings range. syntax var min = mediasettingsrange.min value a double integer. specifications specification status comment mediastream image capturethe definition of 'min' in that specification. working draft initial definition. ...
MediaSettingsRange.step - Web APIs
the step read-only property of the mediasettingsrange interface returns the minimum difference between consecutive values of the settings range. syntax var step = mediasettingsrange.step value a double integer. specifications specification status comment mediastream image capturethe definition of 'step' in that specification. working draft initial definition. ...
MediaSettingsRange - Web APIs
working draft initial definition. ...
MediaSource.activeSourceBuffers - Web APIs
recommendation initial definition. ...
MediaSource.addSourceBuffer() - Web APIs
recommendation initial definition. ...
MediaSource.clearLiveSeekableRange() - Web APIs
the clearliveseekablerange() method of the mediasource interface clears a seekable range previously set with a call to setliveseekablerange(). syntax mediasource.clearliveseekablerange() parameters none. return value undefined specifications specification status comment media source extensionsthe definition of 'clearliveseekablerange()' in that specification. recommendation initial definition. ...
MediaSource.duration - Web APIs
recommendation initial definition. ...
MediaSource.endOfStream() - Web APIs
recommendation initial definition. ...
MediaSource.isTypeSupported() - Web APIs
recommendation initial definition. ...
MediaSource.readyState - Web APIs
recommendation initial definition. ...
MediaSource.removeSourceBuffer() - Web APIs
be removed. return value undefined exceptions exception explanation notfounderror the supplied sourcebuffer doesn't exist in mediasource.sourcebuffers. examples for (i = 0; i < 10; i++) { var sourcebuffer = mediasource.addsourcebuffer(mimecodec); } mediasource.removesourcebuffer(mediasource.sourcebuffers[0]); specifications specification status comment media source extensionsthe definition of 'removesourcebuffer()' in that specification. recommendation initial definition. ...
MediaSource.setLiveSeekableRange() - Web APIs
no greater than this value. end the end of the seekable range to set in seconds measured from the beginning of the source. if the duration of the media source is positive infinity, then the timeranges object returned by the htmlmediaelement.seekable property will have an end timestamp no less than this value. return value undefined example // tbd specifications specification status comment media source extensionsthe definition of 'setliveseekablerange()' in that specification. recommendation initial definition. ...
MediaSource.sourceBuffers - Web APIs
recommendation initial definition. ...
MediaSource - Web APIs
recommendation initial definition. ...
MediaStream() - Web APIs
ct whose tracks are added to the newly-created stream automatically. the tracks are not removed from the original stream, so they're shared by the two streams. tracks an array of mediastreamtrack objects, one for each track to add to the stream. return value a newly-created mediastream object, either empty, or containing the tracks provided, if any. specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification. candidate recommendation ...
active - Web APIs
able (that is, when the returned promise is fulfilled, a button on the page is updated based on whether or not the stream is currently active. var promise = navigator.mediadevices.getusermedia({ audio: true, video: true }); promise.then(function(stream) { var startbtn = document.queryselector('#startbtn'); startbtn.disabled = stream.active; };) specifications specification status comment media capture and streamsthe definition of 'active' in that specification. candidate recommendation initial definition. ...
MediaStream.addTrack() - Web APIs
the mediastream.addtrack() method adds a new track to the stream. the track is specified as a parameter of type mediastreamtrack. if the specified track is already in the stream's track set, this method has no effect. syntax stream.addtrack(track); parameters track a mediastreamtrack to add to the stream. return value undefined example specifications specification status comment media capture and streamsthe definition of 'addtrack()' in that specification. candidate recommendation initial specification. ...
MediaStream: addtrack event - Web APIs
candidate recommendation ...
MediaStream.clone() - Web APIs
Web › API › MediaStream › clone
as a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called. syntax var stream = mediastream.clone(); parameters none. return value a new mediastream instance which has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called. specifications specification status comment media capture and streamsthe definition of 'mediastream.clone()' in that specification. candidate recommendation initial definition. ...
MediaStream.getAudioTracks() - Web APIs
xpiring, will stop the first audio track found on the stream. navigator.mediadevices.getusermedia({audio: true, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the audio stream after 5 seconds settimeout(() => { const tracks = mediastream.getaudiotracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'getaudiotracks()' in that specification. candidate recommendation initial definition. ...
MediaStream.getTrackById() - Web APIs
rack object is returned. otherwise, the returned value is null. example this example activates a commentary track on a video by ducking the audio level of the main audio track to 50%, then enabling the commentary track. stream.gettrackbyid("primary-audio-track").applyconstraints({ volume: 0.5 }); stream.gettrackbyid("commentary-track").enabled = true; specifications specification status comment media capture and streamsthe definition of 'gettrackbyid()' in that specification. candidate recommendation initial specification. ...
MediaStream.getTracks() - Web APIs
rs none. return value an array of mediastreamtrack objects. example navigator.mediadevices.getusermedia({audio: false, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the stream after 5 seconds settimeout(() => { const tracks = mediastream.gettracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'gettracks()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmob...
MediaStream.getVideoTracks() - Web APIs
rieve a track for passing to the imagecapture() constructor. var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) specifications specification status comment media capture and streamsthe definition of 'getvideotracks()' in that specification. candidate recommendation initial definition. ...
MediaStream.id - Web APIs
Web › API › MediaStream › id
the mediastream.id() read-only property is a domstring containing 36 characters denoting a unique identifier (guid) for the object. syntax var id = mediastream.id; example var p = navigator.mediadevices.getusermedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); }) specifications specification status comment media capture and streamsthe definition of 'mediastream.id' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafaria...
MediaStream.onaddtrack - Web APIs
he stream, appends a new item to a list of tracks; the new item shows the track's kind ("audio" or "video") and label. stream.onaddtrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onaddtrack' in that specification. candidate recommendation initial specification. ...
MediaStream.onremovetrack - Web APIs
mple adds a listener which, when a track is removed from the stream, logs the track that was removed. stream.onremovetrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = "removed: " + event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onremovetrack' in that specification. candidate recommendation initial specification. ...
MediaStream: removetrack event - Web APIs
candidate recommendation ...
MediaStream - Web APIs
g happens. events addtrack fired when a new mediastreamtrack object is added. also available via the onaddtrack property. removetrack fired when a mediastreamtrack object has been removed. also available via the onremovetrack property. active fired when the mediastream is activated. inactive fired when the mediastream is inactivated. specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification. candidate recommendation ...
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
context you want the node to be associated with. options optional an audionodeoptions dictionary object defining the properties you want the mediastreamaudiodestinationnode to have. return value a new mediastreamaudiodestinationnode object instance. example var ac = new audiocontext(); var mydestination = new mediastreamaudiodestinationnode(ac); specifications specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification. working draft ...
MediaStreamAudioDestinationNode.stream - Web APIs
k with the same number of channels as the node itself. you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder. syntax var audioctx = new audiocontext(); var destination = audioctx.createmediastreamdestination(); var mystream = destination.stream; value a mediastream. example specifications specification status comment web audio apithe definition of 'stream' in that specification. working draft ...
MediaStreamAudioDestinationNode - Web APIs
dionode. mediastreamaudiodestinationnode.stream is a mediastream containing a single audiomediastreamtrack with the same number of channels as the node itself. you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder. methods inherits methods from its parent, audionode. example specification specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification. working draft ...
MediaStreamAudioSourceNode() - Web APIs
working draft ...
MediaStreamAudioSourceNode.mediaStream - Web APIs
lti-track streams. if the specific track matters to you, or you need to have access to the track itself, you should use a mediastreamtrackaudiosourcenode instead. examples const audioctx = new window.audiocontext(); let options = { mediastream : stream } let source = new mediastreamaudiosourcenode(audioctx, options); console.log(source.mediastream); specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode.mediastream' in that specification. working draft ...
MediaStreamAudioSourceNode - Web APIs
working draft ...
MediaStreamAudioSourceOptions.mediaStream - Web APIs
g a mediastreamaudiosourcenode using the mediastreamaudiosourcenode() constructor. syntax mediastreamaudiosourceoptions = { mediastream: audiosourcestream; } mediastreamaudiosourceoptions.mediastream = audiosourcestream; value a mediastream representing the stream from which to use a mediastreamtrack as the source of audio for the node. example specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions.mediastream' in that specification. working draft ...
MediaStreamAudioSourceOptions - Web APIs
working draft ...
MediaStreamConstraints.audio - Web APIs
nabled 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). as long as an audio input device is available and the user allows it to be used, an audio track will be included in the resulting stream, and it will match the specified constraints as well as possible. result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.audio' in that specification. candidate recommendation initial specification. ...
MediaStreamConstraints.video - Web APIs
a video track whose dimensions are as close as possible to 160x120 pixels, and whose frame rate is as close to 15 frames per second as possible. as long as a video input device is available and the user allows it to be used, a video track will be included in the resulting stream, and it will match the specified constraints as well as possible. result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.video' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.applyConstraints() - Web APIs
navigator.mediadevices.getusermedia({ video: true }) .then(mediastream => { const track = mediastream.getvideotracks()[0]; track.applyconstraints(constraints) .then(() => { // do something with the track such as using the image capture api. }) .catch(e => { // the constraints could not be satisfied by the available devices. }); }); specifications specification status comment media capture and streamsthe definition of 'applyconstraints()' in that specification. candidate recommendation initial definition. mediastream image capturethe definition of 'applyconstraints()' in that specification. working draft adds image constraints. ...
MediaStreamTrack.clone() - Web APIs
the clone() method of the mediastreamtrack interface creates a duplicate of the mediastreamtrack. this new mediastreamtrack object is identical except for its unique id. syntax const newtrack = track.clone() return value a new mediastreamtrack instance which is identical to the one clone() was called, except for its new unique id. specifications specification status comment media capture and streamsthe definition of 'clone()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.enabled - Web APIs
candidate recommendation initial specification. ...
MediaStreamTrack.getCapabilities() - Web APIs
or acceptable settings. see capabilities, constraints, and settings for details on how to work with constrainable properties. syntax const capabilities = track.getcapabilities() return value a mediatrackcapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties. specifications specification status comment media capture and streamsthe definition of 'getcapabilities()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.getConstraints() - Web APIs
l constrainable properties, you should instead call getsettings(). example this example obtains the current constraints for a track, sets the facingmode, and applies the updated constraints. function switchcameras(track, camera) { const constraints = track.getconstraints(); constraints.facingmode = camera; track.applyconstraints(constraints); } specifications specification status comment media capture and streamsthe definition of 'getconstraints()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.getSettings() - Web APIs
rainable properties. note: the returned object identifies the current values of every constrainable property, including those which are platform defaults rather than having been expressly set by the site's code. to instead fetch the most-recently established constraints for the track's properties, as specified by the site's code, use getconstraints(). specifications specification status comment media capture and streamsthe definition of 'getsettings()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.id - Web APIs
the mediastreamtrack.id read-only property returns a domstring containing a unique identifier (guid) for the track, which is generated by the user agent. syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.kind - Web APIs
urns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track. it doesn't change if the track is deassociated from its source. syntax const type = track.kind value the possible values are a domstring with on of the following values: "audio": the track is an audio track. "video": the track is a video track. specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.kind' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.label - Web APIs
mediastreamtrack.label read-only property returns a domstring containing a user agent-assigned label that identifies the track source, as in "internal microphone". the string may be left empty and is empty as long as no source has been connected. when the track is deassociated from its source, the label is not changed. syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack: mute event - Web APIs
t; similarly, the onunmute event handler is available for setting up a handler for the unmute event. the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'mute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onended - Web APIs
diastreamtrack.onended = function; value a function to serve as an eventhandler for the ended event. the event handler function receives a single parameter: the event object, which is a simple event object. examples this example sets up an event handler for the ended event which changes an on-screen icon to indicate that the track is no longer active. track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onended' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onmute - Web APIs
an eventhandler for the mute event. the event handler function receives a single parameter: the event object, which is a simple event object. example in this example, an onmute handler is established to set the content html of an element to display the "muted speaker" emoji. mytrack.onmute = function(evt) { playstateicon.innerhtml = "&#1f507;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onunmute - Web APIs
eives the unmute event. the event handler receives as input a single parameter: an event whose kind is "unmute". example this example creates an unmute event handler which changes the state of a visual indicator to display the emoji character representing a "speaker" icon. mytrack.onunmute = function(evt) { playstateicon.innerhtml = "&#x1f508;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onunmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.readyState - Web APIs
the mediastreamtrack.readystate read-only property returns an enumerated value giving the status of the track. syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data. in that case, the output of data can be switched on or off using the mediastreamtrack.enabled property. "ended" which indicates that the input is not giving any more data and will never provide new data. specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.readystate' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.stop() - Web APIs
e video element's stream from its srcobject property. then the stream's track list is obtained by calling its gettracks() method. from there, all that remains to do is to iterate over the track list using foreach() and calling each track's stop() method. finally, srcobject is set to null to sever the link to the mediastream object so it can be released. specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.stop()' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack: unmute event - Web APIs
event; similarly, the onmute event handler is available for setting up a handler for the mute event. the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'unmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrackAudioSourceNode() - Web APIs
working draft ...
MediaStreamTrackAudioSourceNode - Web APIs
working draft ...
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
working draft ...
MediaStreamTrackAudioSourceOptions - Web APIs
the mediastreamtrackaudiosourceoptions dictionary is used when specifying options to the mediastreamtrackaudiosourcenode() constructor. it isn't needed when using the audiocontext.createmediastreamtracksource() method. properties mediastreamtrack the mediastreamtrack from which to take audio data for this node's output. specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions' in that specification. working draft ...
MediaStreamTrackEvent() - Web APIs
ents from event(). type a domstring representing the name of the type of the mediastreamtrackevent. it is case-sensitive and can be "addtrack" or "removetrack". track a mediastreamtrack object representing the track which was added to or removed from the stream. return value a new mediastreamtrackevent, initialized based on the provided options. specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent()' in that specification. candidate recommendation ...
MediaStreamTrackEvent - Web APIs
removetrack properties also inherits properties from its parent interface, event. track read only a mediastreamtrack object representing the track which was added to the stream. constructor mediastreamtrackevent() constructs a new mediastreamtrackevent with the specified configuration. methods also inherits methods from its parent event. specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent' in that specification. candidate recommendation ...
MediaStream Image Capture API - Web APIs
...
Using the MediaStream Recording API - Web APIs
eate an object url pointing to it, using window.url.createobjecturl(blob). ...
MediaTrackConstraints.aspectRatio - Web APIs
d. otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required aspect ratio (if exact is specified or both min and max are provided and have the same value) or to a best-possible value. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.autoGainControl - Web APIs
t fail if this can't be done. 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. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.channelCount - Web APIs
candidate recommendation initial specification. ...
MediaTrackConstraints.cursor - Web APIs
ing visible if the user agent doesn't support in-motion only cursor rendering. let displaymediaoptions = { cursor: ["motion", "always"] }; example: require that the cursor not be visible this constraints object explicitly requires that the cursor not be rendered into the video track. let displaymediaoptions = { cursor: { exact: "none" } }; specifications specification status comment screen capturethe definition of 'mediatrackconstraints.cursor' in that specification. unknown initial specification. ...
MediaTrackConstraints.deviceId - Web APIs
e it to ensure that you get the same source for multiple calls to getusermedia(). an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.displaySurface - Web APIs
drop, or to "cut" the individual display areas out of the received frames of video. examples here are some example constraints objects for getdisplaymedia() that make use of the displaysurface property. in addition, see example: constraint exerciser in capabilities, constraints, and settings for a complete example showing how constraints are used. tbd specifications specification status comment screen capturethe definition of 'mediatrackconstraints.displaysurface' in that specification. unknown initial specification. ...
MediaTrackConstraints.echoCancellation - Web APIs
ll not fail if this can't be done. 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. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.facingMode - Web APIs
acing toward the user but to their left, such as a camera aimed toward the user but over their left shoulder. "right" the video source is facing toward the user but to their right, such as a camera aimed toward the user but over their right shoulder. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.frameRate - Web APIs
ied. otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required frame rate (if exact is specified or both min and max are provided and have the same value) or to a best-possible value. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.groupId - Web APIs
candidate recommendation initial specification. ...
MediaTrackConstraints.height - Web APIs
specified. otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required height (if exact is specified or both min and max are provided and have the same value) or to a best-possible value. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'height' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.latency - Web APIs
min and max are provided and have the same value) or to a best-possible value. latency is always prone to some variation due to hardware usage demands, network constraints, and so forth, so even in an "exact" match, some variation should be expected. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'latency' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.logicalSurface - Web APIs
working draft initial specification. ...
MediaTrackConstraints.noiseSuppression - Web APIs
ll not fail if this can't be done. 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. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.sampleRate - Web APIs
fied. otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required sample rate (if exact is specified or both min and max are provided and have the same value) or to a best-possible value. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.sampleSize - Web APIs
act is specified or both min and max are provided and have the same value) or to a best-possible value. since this property can only represent linear sample sizes, this constraint can only be met by devices that can produce audio with linear samples. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.width - Web APIs
specified. otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required width (if exact is specified or both min and max are provided and have the same value) or to a best-possible value. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'width' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints - Web APIs
her or not to allow the user to choose source surfaces which do not directly correspond to display areas. these may include backing buffers for windows to allow capture of window contents that are hidden by other windows in front of them, or buffers containing larger documents that need to be scrolled through to see the entire contents in their windows. specifications specification status comment media capture and streams candidate recommendation initial definition. mediastream image capture working draft adds image constraints. ...
MediaTrackSettings.aspectRatio - Web APIs
k's aspect ratio. the aspect ratio is computed by taking the track's width, dividing by its height, and rounding the result to ten decimal places. for example, the standard 16:9 high-definition aspect ratio can be computed as 1920/1080, or 1.7777777778. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.autoGainControl - Web APIs
e browsers will simply ignore any constraints they're unfamiliar with. syntax var autogaincontrol = mediatracksettings.autogaincontrol; value a boolean value which is true if the track has automatic gain control enabled or false if agc is disabled. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.channelCount - Web APIs
re any constraints they're unfamiliar with. syntax var channelcount = mediatracksettings.channelcount; value an integer value indicating the number of audio channels on the track. a value of 1 indicates monaural sound, 2 means stereo, and so forth. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.cursor - Web APIs
working draft initial definition ...
MediaTrackSettings.deviceId - Web APIs
for any changes to constraints when calling mediastreamtrack.applyconstraints(). an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.displaySurface - Web APIs
ny empty space (if the displays are of different dimensions) is filled with a backdrop chosen by the user agent. window the stream's video track presents the contents of a single window selected by the user. the window may be from any application, not necessarily just from within the user agent. not all user agents support all of these surface types. specifications specification status comment screen capturethe definition of 'mediatracksettings.displaysurface' in that specification. working draft initial definition ...
MediaTrackSettings.echoCancellation - Web APIs
rconnection will never include this property. syntax var echocancellation = mediatracksettings.echocancellation; value a boolean value which is true if the track has echo cancellation functionality enabled or false if echo cancellation is disabled. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.facingMode - Web APIs
acing toward the user but to their left, such as a camera aimed toward the user but over their left shoulder. "right" the video source is facing toward the user but to their right, such as a camera aimed toward the user but over their right shoulder. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.frameRate - Web APIs
rs will simply ignore any constraints they're unfamiliar with. syntax var framerate = mediatracksettings.framerate; value a double-precision floating-point number indicating the current configuration of the track's frame rate, in frames per second. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.groupId - Web APIs
asks performed during the same browsing session use devices from the same group (or that they don't use devices from the same group). there is no situation in which the groupid is useful when calling applyconstraints(), since the value can't be changed. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.height - Web APIs
cally this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. syntax var height = mediatracksettings.height; value an integer value indicating the height, in pixels, of the video track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'height' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.latency - Web APIs
h a webrtc rtcpeerconnection will never include this property. syntax var latency = mediatracksettings.latency; value a double-precision floating-point number indicating the estimated latency, in seconds, of the audio track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'latency' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.logicalSurface - Web APIs
urns false) is the portion of a logical display surface which is currently visible onscreen. for example, a user agent may choose to allow the user to choose whether to share the entire document (a browser with logicalsurface value of true), or just the currently visible portion of the document (where the logicalsurface of the browser surface is false). specifications specification status comment screen capturethe definition of 'mediatracksettings.logicalsurface' in that specification. working draft initial definition ...
MediaTrackSettings.noiseSuppression - Web APIs
rowsers will simply ignore any constraints they're unfamiliar with. syntax var noisesuppression = mediatracksettings.noisesuppression; value a boolean value which is true if the input track has noise suppression enabled or false if agc is disabled. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.sampleRate - Web APIs
candidate recommendation initial specification. ...
MediaTrackSettings.sampleSize - Web APIs
-resolution professional audio). each audio channel on the track requires samplesize bits. that means that a given sample actually uses (samplesize/8)*channelcount bytes of data. for example, 16-bit stereo audio requires (16/8)*2 or 4 bytes per sample. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.width - Web APIs
ypically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. syntax var width = mediatracksettings.width; value an integer value indicating the width, in pixels, of the video track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and streamsthe definition of 'width' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings - Web APIs
w the stream contains a single window selected by the user for sharing. logicalsurface a boolean value which, if true, indicates that the video contained in the stream's video track contains a background rendering context, rather than a user-visible one. this is false if the video being captured is coming from a foreground (user-visible) source. specifications specification status comment screen capturethe definition of 'mediatracksettings' in that specification. working draft initial definition ...
MediaTrackSupportedConstraints.aspectRatio - Web APIs
s value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().aspectratio) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.autoGainControl - Web APIs
l constraint. html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().autogaincontrol) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.channelCount - Web APIs
its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().channelcount) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.cursor - Web APIs
unknown initial definition ...
MediaTrackSupportedConstraints.deviceId - Web APIs
k at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().deviceid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.displaySurface - Web APIs
working draft initial definition ...
MediaTrackSupportedConstraints.echoCancellation - Web APIs
value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().echocancellation) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.facingMode - Web APIs
if you try to look at its value. example html <div id="result"> </div> css #result { font: 14px "arial", sans-serif; } javascript let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().facingmode) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.frameRate - Web APIs
candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.groupId - Web APIs
ok at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().groupid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.height - Web APIs
ook at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().height) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'height' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.latency - Web APIs
ok at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().latency) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'latency' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.logicalSurface - Web APIs
working draft initial definition ...
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
constraint. html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().noisesuppression) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.sampleRate - Web APIs
at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.sampleSize - Web APIs
at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplesize) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification. candidate recommendation initial specification. ...
MediaTrackSupportedConstraints.width - Web APIs
look at its value. example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().width) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'width' in that specification. candidate recommendation initial specification. ...
Media Capabilities API - Web APIs
ameter to the mediacapabilities.encodinginfo() and mediacapabilities.decodinginfo() methods. audioconfiguration describes the required audio properties that must be configured when querying an audio configuration to be passed as part of a mediaconfiguration parameter to the mediacapabilities.encodinginfo() and mediacapabilities.decodinginfo() methods. specifications specification status comment media capabilities draft initial definition ...
Media Session API - Web APIs
...
Media Source API - Web APIs
...
Capabilities, constraints, and settings - Web APIs
he error message to a special logging <div> box under the video. function log(msg) { logelement.innerhtml += (msg + "<br>"); } function handleerror(reason) { log("error <code>" + reason.name + "</code> in constraint <code>" + reason.constraint + "</code>: " + reason.message); } result here you can see the complete example in action. specifications specification status comment media capture and streamsthe definition of 'constrainable pattern' in that specification. candidate recommendation initial definition. ...
MerchantValidationEvent() - Web APIs
mation that needs to be delivered to the client-side code to present to the user agent by calling complete(). exceptions typeerror the string specified as validationurl could not be parsed as a url. rangeerror the specified methodname does not correspond to a known and supported merchant or is not a well-formed standard payment method identifier. specifications specification status comment payment request apithe definition of 'merchantvalidationevent()' in that specification. candidate recommendation initial definition. ...
MerchantValidationEvent.complete() - Web APIs
iondatapromise); } function getvalidationdata(url) { /* ...retrieve the validation data from the url... */ } this code sets up a handler for the merchantvalidation event. the event handler calls a function, getvalidationdata(), which retrieves the data from the validation url, then passes that data (or a promise to deliver the data) into complete(). specifications specification status comment payment request apithe definition of 'merchantvalidationevent.complete()' in that specification. candidate recommendation initial definition. ...
MerchantValidationEvent.methodName - Web APIs
t method identifier which represents the payment handler that requires merchant validation. syntax methodid = merchantvalidationevent.methodname; value a read-only domstring which uniquely identifies the payment handler which is requesting merchant validation. see merchant validation in payment processing concepts for more information on the process. specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification. candidate recommendation initial definition. ...
MerchantValidationEvent.validationURL - Web APIs
ue a read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process. once this has been loaded, it should be passed into complete(), either directly or using a promise. see merchant validation in payment processing concepts for more information on the merchant validation process. specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification. candidate recommendation initial definition. ...
MerchantValidationEvent - Web APIs
a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant. methods merchantvalidationevent.complete() secure context pass the data retrieved from the url specified by validationurl into complete() to complete the validation process for the paymentrequest. specifications specification status comment payment request apithe definition of 'merchantvalidationevent' in that specification. candidate recommendation initial definition. ...
MessageChannel() - Web APIs
living standard ...
MessageChannel.port1 - Web APIs
living standard ...
MessageChannel.port2 - Web APIs
living standard ...
MessageChannel - Web APIs
living standard ...
MessageEvent.MessageEvent() - Web APIs
living standard ...
MessageEvent.data - Web APIs
Web › API › MessageEvent › data
the data read-only property of the messageevent interface represents the data sent by the message emitter. syntax var data = messageevent.data; value the data sent by the message emitter; this can be any data type. example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); }; specifications specification status comment html living standardthe definition of 'messageevent: data' in that specification. living standard ...
MessageEvent.lastEventId - Web APIs
teventid read-only property of the messageevent interface is a domstring representing a unique id for the event. syntax var myid = messageevent.lasteventid; value a domstring representing the id. example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of 'messageevent: lasteventid' in that specification. living standard ...
MessageEvent.origin - Web APIs
igin read-only property of the messageevent interface is a usvstring representing the origin of the message emitter. syntax var origin = messageevent.origin; value a usvstring representing the origin. example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of 'messageevent: origin' in that specification. living standard ...
MessageEvent.ports - Web APIs
an array of messageport objects. example onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener. otherwise called implicitly by onmessage setter. } specifications specification status comment html living standardthe definition of 'ports' in that specification. living standard initial definition ...
MessageEvent.source - Web APIs
esenting the message emitter. syntax let mysource = messageevent.source; value a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter. example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of ' messageevent: source' in that specification. living standard ...
MessageEvent - Web APIs
with messages sent from the main threads. onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener. otherwise called implicitly by onmessage setter. } specifications specification status comment html living standardthe definition of 'messageevent' in that specification. living standard ...
MessagePort.close() - Web APIs
Web › API › MessagePort › close
age handler function, run when a message is sent back to this document using eventtarget.addeventlistener. channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification. living standard ...
MessagePort: message event - Web APIs
fore any messages will be delivered to this port. ...
MessagePort: messageerror event - Web APIs
addeventlistener() method: if the receiver uses onmessage instead, start() is called implicitly: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.onmessage = (event) => { received.textcontent = event.data; }; myport.onmessageerror = (event) => { console.error(event.data); }; }); specifications specification status html living standard living standard ...
MessagePort.onmessage - Web APIs
living standard ...
MessagePort.onmessageerror - Web APIs
living standard ...
MessagePort.postMessage() - Web APIs
living standard ...
MessagePort.start() - Web APIs
Web › API › MessagePort › start
living standard ...
MessagePort - Web APIs
living standard ...
Metadata - Web APIs
Web › API › Metadata
't available through the global scope; instead, you obtain a metadata object describing a filesystementry using the method filesystementry.getmetadata(). properties modificationtime read only a date object indicating the date and time the entry was modified. size read only a 64-bit unsigned integer indicating the size of the entry in bytes. specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedg...
Microsoft API extensions - Web APIs
.msframestep() htmlvideoelement.mshorizontalmirror htmlvideoelement.msinsertvideoeffect() htmlvideoelement.msislayoutoptimalforplayback htmlvideoelement.msisstereo3d htmlvideoelement.mszoom htmlaudioelement.msaudiocategory htmlaudioelement.msaudiodevicetype htmlmediaelement.mscleareffects() htmlmediaelement.msinsertaudioeffect() mediaerror.msextendedcode msgraphicstrust msgraphicstruststatus msisboxed msplaytodisabled msplaytopreferredsourceuri msplaytoprimary msplaytosource msrealtime mssetmediaprotectionmanager mssetvideorectangle msstereo3dpackingmode msstereo3drendermode onmsvideoformatchanged onmsvideoframestepcompleted onmsvideooptimallayoutchanged msfirstpaint pinned sites apis mssitemodeevent mssitemodejumplistitemremoved msthumbnailclick other apis ...
MimeType - Web APIs
Web › API › MimeType
n empty string if an extension is not valid for the particular module. for example, a browser's content decryption module may appear in the plugin list but support more file extensions than can be anticipated. it might therefore return an empty string. mimetype.enabledplugin returns an instance of plugin containing information about the plugin itself. specifications specification status comment html living standardthe definition of 'mimetype' in that specification. living standard initial definition. ...
MimeTypeArray - Web APIs
plugin that is. var mimetypes = navigator.mimetype; var flashplugin = mimetypes['video/x-flv']; if (typeof flashplugin === "undefined") { var vid = document.createelement('video'); // use vid.canplaytype() to test for a supported mime type. } else { // notify the user that flash is being deprecated and they // should upgrade their browser. } specifications specification status comment html living standardthe definition of 'mimetypearray' in that specification. living standard initial definition. ...
MouseEvent() - Web APIs
the id of the hit region affected by the event. the absence of any hit region is affected, is represented by the null value. in some implementations, passing anything other than a number for the screen and client fields will throw a typeerror. the mouseeventinit dictionary also accepts fields from uieventinit and from eventinit dictionaries. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification. working draft redefines screen and client fields long to double. document object model (dom) level 3 events specificationthe definition of 'mouseevent()' in that specification. obsolete initial definition. ...
MouseEvent.altKey - Web APIs
Web › API › MouseEvent › altKey
ample this example logs the altkey property when you trigger a click event. html <p>click anywhere to test the <code>altkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the alt key is pressed: ${e.altkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.altkey' in that specification. obsolete no change from document object model (dom) level 2 events specification. document object model (dom) level 2 events specificationthe definition of 'mouseevent.altkey' in that specification. obsolete initial definition. ...
MouseEvent.button - Web APIs
Web › API › MouseEvent › button
obsolete compared to document object model (dom) level 2 events specification, the return value can be negative. document object model (dom) level 2 events specificationthe definition of 'mouseevent.button' in that specification. obsolete in...
MouseEvent.buttons - Web APIs
obsolete initial definition ui eventsthe definition of 'mouseevent.buttons' in that specification. working draft current working draft ...
MouseEvent.clientX - Web APIs
mousemove event. html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clientx' in that specification. working draft redefines mouseevent from long to double. document object model (dom) level 3 events specificationthe definition of 'mouseevent.clientx' in that specification. obsolete no change from document object model (dom) level 2 events specification. docume...
MouseEvent.clientY - Web APIs
mousemove event. html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clienty' in that specification. working draft redefines mouseevent from long to double. document object model (dom) level 3 events specificationthe definition of 'mouseevent.clienty' in that specification. obsolete no change from document object model (dom) level 2 events specification. docume...
MouseEvent.ctrlKey - Web APIs
e this example logs the ctrlkey property when you trigger a click event. html <p>click anywhere to test the <code>ctrlkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the ctrl key is pressed: ${e.ctrlkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.ctrlkey' in that specification. obsolete no change from document object model (dom) level 2 events specification. document object model (dom) level 2 events specificationthe definition of 'mouseevent.ctrlkey' in that specification. obsolete initial definition. ...
MouseEvent.getModifierState() - Web APIs
key is pressed or locked), otherwise, false. see the document of keyboardevent.getmodifierstate() for details. syntax var active =​ event.getmodifierstate(keyarg); returns a boolean parameters keyarg a modifier key value. the value must be one of the keyboardevent.key values which represent modifier keys or "accel". this is case-sensitive. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification. obsolete initial definition. ...
MouseEvent.initMouseEvent() - Web APIs
obsolete from document object model (dom) level 2 events specification, deprecated. document object model (dom) level 2 events specificationthe definition of 'mouseevent.initmouseevent()' in that specification. obsolete initial def...
MouseEvent.metaKey - Web APIs
e this example logs the metakey property when you trigger a click event. html <p>click anywhere to test the <code>metakey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the meta key is pressed: ${e.metakey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.metakey' in that specification. obsolete no change from document object model (dom) level 2 events specification. document object model (dom) level 2 events specificationthe definition of 'mouseevent.metakey' in that specification. obsolete initial definition. ...
MouseEvent.movementX - Web APIs
candidate recommendation initial definition ...
MouseEvent.movementY - Web APIs
ple logs the amount of mouse movement using movementx and movementy. html <p id="log">move your mouse around.</p> javascript function logmovement(event) { log.innertext = `movement: ${event.movementx}, ${event.movementy}\n${log.innertext}`; } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementy' in that specification. candidate recommendation initial definition. ...
MouseEvent.offsetX - Web APIs
of the mouseevent interface provides the offset in the x coordinate of the mouse pointer between that event and the padding edge of the target node. syntax var xoffset = instanceofmouseevent.offsetx; return value a double floating point value. early versions of the spec defined this as an integer. see the browser compatibility section for details. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification. working draft initial definition ...
MouseEvent.offsetY - Web APIs
y of the mouseevent interface provides the offset in the y coordinate of the mouse pointer between that event and the padding edge of the target node. syntax var yoffset = instanceofmouseevent.offsety; return value a double floating point value. early versions of the spec defined this as an integer. see the browser compatibility section for details. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification. working draft initial definition ...
MouseEvent.pageX - Web APIs
Web › API › MouseEvent › pageX
each time an event occurs to contain the latest mouse coordinates relative to the page. css the css used for this example is shown below. .box { width: 400px; height: 250px; border: 2px solid darkblue; background-color: blue; color: white; font: 16px "zilla", "open sans", "helvetica", "arial", sans-serif; } result try this out here: specifications specification status comment css object model (cssom) view modulethe definition of 'pagex' in that specification. working draft redefined from long to double. touch eventsthe definition of 'pagex' in that specification. unknown initial definition. prior to being added to the cssom view specification, pagex and pagey were available on the uievent interface in a limited subset of...
MouseEvent.pageY - Web APIs
Web › API › MouseEvent › pageY
e in pixels of the event relative to the whole document. this property takes into account any vertical scrolling of the page. syntax var pos = event.pagey; originally, this property was defined as a long integer. the cssom view module redefined it as a double float. see the browser compatibility section for details. examples var pagey = event.pagey; specifications specification status comment css object model (cssom) view modulethe definition of 'pagey' in that specification. working draft redefined from long to double. touch eventsthe definition of 'pagey' in that specification. unknown initial definition. ...
MouseEvent.relatedTarget - Web APIs
working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent.relatedtarget' in that specification. obsolete no change from document object model (dom) level 2 events specification. document object model (dom) level 2 events specific...
MouseEvent.screenX - Web APIs
working draft redefines mouseevent from long to double. document object model (dom) level 3 events specificationthe definition of 'mouseevent.screenx' in that specification. obsolete no change from document object model (dom) level 2 events specification. docume...
MouseEvent.screenY - Web APIs
mousemove event. html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'screeny' in that specification. working draft redefines mouseevent from long to double. document object model (dom) level 3 events specificationthe definition of 'mouseevent.screeny' in that specification. obsolete no change from document object model (dom) level 2 events specification. docume...
MouseEvent.shiftKey - Web APIs
his example logs the shiftkey property when you trigger a click event. html <p>click anywhere to test the <code>shiftkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the shift key is pressed: ${e.shiftkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.shiftkey' in that specification. obsolete no change from document object model (dom) level 2 events specification. document object model (dom) level 2 events specificationthe definition of 'mouseevent.shiftkey' in that specification. obsolete initial definition. ...
MouseEvent.x - Web APIs
Web › API › MouseEvent › x
the mouseevent.x property is an alias for the mouseevent.clientx property. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.x' in that specification. working draft initial definition ...
MouseEvent.y - Web APIs
Web › API › MouseEvent › y
the mouseevent.y property is an alias for the mouseevent.clienty property. specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.y' in that specification. working draft initial definition. ...
MouseEvent - Web APIs
working draft redefines mouseevent from long to double. this means that a pointerevent whose pointertype is mouse will be a double. pointer lockthe definition of 'mouseevent' in that specification. candidate recommendation from document object model (dom) level 3 ...
MutationObserver.MutationObserver() - Web APIs
ifying the callback() function. we begin observing the dom nodes of interest by calling observe(), specifying the target node and the options object. from this point until disconnect() is called, callback() will be called each time an element is added to or removed from the dom tree rooted at targetnode, or any of those elements' attributes are changed. specifications specification status comment domthe definition of 'mutationobserver()' in that specification. living standard ...
MutationObserver.disconnect() - Web APIs
tes an observer, then disconnects from it, leaving it available for possible reuse. const targetnode = document.queryselector("#someelement"); const observeroptions = { childlist: true, attributes: true } const observer = new mutationobserver(callback); observer.observe(targetnode, observeroptions); /* some time later... */ observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver.disconnect()' in that specification. living standard ...
MutationObserver.observe() - Web APIs
living standard ...
MutationObserver.takeRecords() - Web APIs
living standard ...
MutationObserver - Web APIs
living standard ...
MutationObserverInit.characterData - Web APIs
f changed text nodes to be provided using the mutationrecord's oldvalue property. subtree lets you specify whether to watch the target node and all of its descendants (true), or just the target node (false). if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such. example specifications specification status comment domthe definition of 'mutationobserverinit.characterdata' in that specification. living standard ...
MutationObserverInit.characterDataOldValue - Web APIs
hanges to the text of the node specified as the target parameter when you called observe() are monitored. to watch for changes to the text contents of all descendants of target, set the subtree option to true. if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such. example specifications specification status comment domthe definition of 'mutationobserverinit.characterdataoldvalue' in that specification. living standard ...
MutationObserverInit.childList - Web APIs
r or not to invoke the callback function when new nodes are added to or removed from the section of the dom being monitored.. if subtree is false, only the node indicated by the observer's target node is monitored for changes. setting subtree to true causes addition or removal of nodes anywhere within the subtree rooted at target to be reported. example specifications specification status comment domthe definition of 'mutationobserverinit.childlist' in that specification. living standard ...
MutationObserverInit.subtree - Web APIs
living standard ...
MutationObserverInit - Web APIs
default value is true if characterdataoldvalue is specified, otherwise the default value is false. characterdataoldvalue optional set to true to record the previous value of a node's text whenever the text changes on nodes being monitored. for details and an example, see monitoring text content changes in mutationobserver. the default value is false. specifications specification status comment domthe definition of 'mutationobserverinit' in that specification. living standard ...
MutationRecord - Web APIs
ttribute before the change. for characterdata, it is the data of the changed node before the change. for childlist, it is null. note that for this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification. living standard ...
NDEFMessage.records - Web APIs
...
NDEFMessage - Web APIs
...
NDEFReader() - Web APIs
...
NDEFReader.onerror - Web APIs
...
NDEFReader.onreading - Web APIs
...
NDEFReader.scan() - Web APIs
Web › API › NDEFReader › scan
...
NDEFReader - Web APIs
which is called to notify that an error occured during reading. methods the ndefreader interface inherits the methods of eventtarget, its parent interface. ndefreader.scan() called to activate the reader (after ensuring hardware and ua compatibility and obtaining permission from the user) or get an error explaining why feature is not available. specifications specification status comment web nfc, ndefreader draft initial definition. ...
NDEFReadingEvent - Web APIs
properties from its parent event. ndefreadingevent.serialnumber read only represents the serial number of the device used for anti-collision and identification, or empty string in case none is available. ndefreadingevent.message read only represents the received message as an ndefmessage object. methods inherits methods from its parent event. specifications specification status comment web nfc, ndefreadingevent draft initial definition. ...
NDEFRecord() - Web APIs
...
NDEFRecord.data - Web APIs
Web › API › NDEFRecord › data
...
NDEFRecord.encoding - Web APIs
...
NDEFRecord.id - Web APIs
Web › API › NDEFRecord › id
fier. this identifier is created by the generator of the record which is solely responsible for enforcing record identifier uniqueness. web nfc does not sign the nfc content, thus record consumer should not make any assumptions about integrity or authenticity of the identifier or any other part of the records. syntax ndefrecord.id value a usvstring. specifications specification status comment web nfc, ndefrecord draft initial definition. ...
NDEFRecord.lang - Web APIs
Web › API › NDEFRecord › lang
...
NDEFRecord.mediaType - Web APIs
...
NDEFRecord.recordType - Web APIs
lute url ndef record. "mime" represents a mime type ndef record. "unknown" represents an unknown ndef record. local type name represents a local type name, frequently used to specify ndef record embedded within another record. external type name represents a custom record type name that can be creted by organizations themselves for custom needs. specifications specification status comment web nfc, ndefrecord.recordtype draft initial definition. ...
NDEFRecord.toRecords() - Web APIs
eturns the result. in practice, it's possible to implement the parsing mechanism manually, but this method simplifies the process. syntax ndefrecord.torecords() parameters none. return value a list of ndefrecords. exceptions notsupported the user agent does not know how to parse this combination of ndefrecord.data and ndefrecord.recordtype. specifications specification status comment web nfc, ndefrecord.torecords() draft initial definition. ...
NDEFRecord - Web APIs
read only represents the payload of the record. ndefrecord.encoding read only represents the encoding name used for encoding the payload in the case it is textual data. ndefrecord.lang read only represents a language tag of the content, if it was encoded. methods ndefrecord.torecords() coverts ndefrecord.data to sequence of records. specifications specification status comment web nfc, ndefrecord draft initial definition. ...
NDEFWriter() - Web APIs
...
NDEFWriter.write() - Web APIs
Web › API › NDEFWriter › write
...
NDEFWriter - Web APIs
def, when these devices are within the reader's magnetic induction field. constructor ndefwriter.ndefwriter() returns an ndefwriter. methods ndefwriter.write() called to write ndef message to a tag (after ensuring hardware and ua compatibility and obtaining permission from the user) or get an error explaining why feature is not available. specifications specification status comment web nfc, ndefreader draft initial definition. ...
NameList - Web APIs
Web › API › NameList
value pairs. items can be accessed by a 0-based index. the dom spec does not specify how the collection is to be implemented. properties namelist.length read only methods namelist.contains() returns a boolean. namelist.containsns() returns a boolean. namelist.getname() returns a domstring. namelist.getnamespaceuri() returns a domstring. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'namelist' in that specification. obsolete initial definition ...
NamedNodeMap - Web APIs
he number of nodes. namednodemap.getnameditemns() returns a attr identified by a namespace and related local name. namednodemap.setnameditemns() replaces, or adds, the attr identified in the map by the given namespace and related local name. namednodemap.removenameditemns() removes the attr identified by the given namespace and related local name. specifications specification status comment domthe definition of 'namednodemap' in that specification. living standard deals with attr instead of node document object model (dom) level 3 core specificationthe definition of 'namednodemap' in that specification. obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificatio...
NavigationPreloadManager - Web APIs
espond 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. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
Navigation Timing API - Web APIs
...
Navigator.battery - Web APIs
Web › API › Navigator › battery
the battery read-only property returns a batterymanager which provides information about the system's battery charge level and whether the device is charging and exposes events that fire when these parameters change. this interface was introduced in early drafts of the battery status api and but has been replaced with promise-based navigator.getbattery(). the battery property has been removed in favor of the standard navigator.getbattery() method, which returns a battery promise. syntax var battery = navigator.battery; ...
Navigator.canShare() - Web APIs
draft initial definition. ...
Navigator.clipboard - Web APIs
e is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire. if the clipboard is empty or doesn't contain text, the "cliptext" element's contents are cleared. this happens because readtext() returns an empty string if the clipboard is empty or doesn't contain text. specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification. working draft initial definition. ...
Navigator.connection - Web APIs
rmation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered. this could be used to select high definition content or low definition content based on the user's connection. syntax networkinformation = navigator.connection value a networkinformation object. specifications specification status comment network information apithe definition of 'navigator.connection' in that specification. draft initial specification ...
Navigator.cookieEnabled - Web APIs
ed browsers. note: web browsers may prevent writing certain cookies in certain scenarios. for example, chrome 80+ does not allow creating cookies with samesite=none attribute, unless they are created over https and with secure attribute. example if (!navigator.cookieenabled) { // the browser does not support or is blocking cookies from being set. } specifications specification status comment html living standardthe definition of 'navigator.cookieenabled' in that specification. living standard initial definition ...
Navigator.credentials - Web APIs
can be used for feature detection. syntax var credentialscontainer = navigator.credentials value the credentialscontainer interface. example if ('credentials' in navigator) { navigator.credentials.get({password: true}) .then(function(creds) { //do something with the credentials. }); } else { //handle sign-in the way you did before. }; specifications specification status comment credential management level 1 working draft initial definition. ...
Navigator.deviceMemory - Web APIs
number by 1024. it is then clamped within lower and upper bounds to protect the privacy of owners of very low- or high-memory devices. syntax memoryamount = navigator.devicememory value a floating point number; one of 0.25, 0.5, 1, 2, 4, 8. example const memory = navigator.devicememory console.log (`this device has at least ${memory}gib of ram.`) specifications specification status comment device memory 1the definition of 'devicememory' in that specification. editor's draft initial definition. ...
Navigator.doNotTrack - Web APIs
tting, which indicates whether the user is requesting web sites and advertisers to not track them. the value of the property reflects that of the dnt http header, i.e. values of "1", "0", or "unspecified". example console.log(navigator.donottrack); // prints "1" if dnt is enabled; "0" if the user opted-in for tracking; otherwise this is "unspecified" specifications specification status comment tracking preference expression (dnt)the definition of 'navigator.donottrack' in that specification. obsolete initial definition ...
Navigator.geolocation - Web APIs
. this allows a web site or app to offer customized results based on the user's location. note: for security reasons, when a web page tries to access location information, the user is notified and asked to grant permission. be aware that each browser has its own policies and methods for requesting this permission. syntax geo = navigator.geolocation specifications specification status comment geolocation apithe definition of 'navigator.geolocation' in that specification. recommendation initial definition ...
Navigator.getGamepads() - Web APIs
e remaining gamepads retain the same index. syntax var gamepads = navigator.getgamepads(); example window.addeventlistener("gamepadconnected", function(e) { var gp = navigator.getgamepads()[e.gamepad.index]; console.log( "gamepad connected at index %d: %s. %d buttons, %d axes.", gp.index, gp.id, gp.buttons.length, gp.axes.length ); }); specifications specification status comment gamepadthe definition of 'the gamepad api specification' in that specification. working draft initial definition. ...
Navigator.keyboard - Web APIs
editor's draft initial definition. ...
Navigator.locks - Web APIs
Web › API › Navigator › locks
draft initial definition. ...
Navigator.maxTouchPoints - Web APIs
the maxtouchpoints read-only property of the navigator interface returns the maximum number of simultaneous touch contact points are supported by the current device. syntax touchpoints = navigator.maxtouchpoints; example if (navigator.maxtouchpoints > 1) { // browser supports multi-touch } specifications specification status comment pointer events – level 2the definition of 'maxtouchpoints' in that specification. recommendation non-stable version. pointer eventsthe definition of 'maxtouchpoints' in that specification. obsolete initial definition. ...
Navigator.mediaCapabilities - Web APIs
type : "audio/mp3", channels : 2, bitrate : 132700, samplerate : 5200 } }).then(function(result) { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported, ' + (result.smooth ? '' : 'not ') + 'smooth, and ' + (result.powerefficient ? '' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilities draft initial definition ...
Navigator.mediaDevices - Web APIs
eturns a mediadevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing. syntax var mediadevices = navigator.mediadevices; return value the mediadevices singleton object. usually, you just use this object's members directly, such as by calling navigator.mediadevices.getusermedia(). specifications specification status comment media capture and streamsthe definition of 'navigatorusermedia.mediadevices' in that specification. candidate recommendation initial definition. ...
Navigator.oscpu - Web APIs
Web › API › Navigator › oscpu
living standard initial definition ...
Navigator.permissions - Web APIs
the navigator.permissions read-only property returns a permissions object that can be used to query and update permission status of apis covered by the permissions api. syntax permissionsobj = globalobj.navigator.permissions value a permissions object. examples navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state === 'granted') { showmap(); } else if (result.state === 'prompt') { showbuttontoenablemap(); } // don't do anything if the permission was denied. }); specification specification status comment permissions working draft initial definition. ...
Navigator.productSub - Web APIs
b is a string. example <script> function prodsub() { var dt = document.getelementbyid("d").childnodes[0]; dt.data = window.navigator.productsub; } </script> <button onclick="prodsub();">productsub</button> // returns: 20010725 notes on ie, this property returns undefined. on apple safari and google chrome this property always returns 20030107. specifications specification status comment html living standardthe definition of 'navigatorid: productsub' in that specification. living standard initial definition ...
Navigator.registerContentHandler() - Web APIs
ation/rss+xml mime types are supported. all values have the same effect, and the registered handler will receive feeds in all atom and rss versions (see bug 391286). firefox is the only browser that implemented this feature, and it wasn't implemented to match the standard. this feature has since been removed from the html standard and shouldn't be used. specifications specification status comment html 5.2the definition of 'registercontenthandler()' in that specification. recommendation this feature is present in html 5.2, but has since been removed from the whatwg html living standard. ...
Navigator.registerProtocolHandler() - Web APIs
ceholder. this script must be run from the same origin as the handler url (so any page at https://burgers.example.com), and the handler url must be http or https. the user will be notified that your code asked to register the protocol handler, so that they can decide whether or not to allow it. see the screenshot below for an example on google.co.uk: specifications specification status comment html living standardthe definition of 'registerprotocolhandler()' in that specification. living standard living standard ...
Navigator.requestMediaKeySystemAccess() - Web APIs
recommendation initial definition ...
Navigator.sendBeacon() - Web APIs
lder techniques! the following example shows a theoretical analytics code pattern that submits data to a server using the sendbeacon() method. window.addeventlistener("unload", function logdata() { navigator.sendbeacon("/log", analyticsdata); }); the beacon sends an http request via the post method, with all relevant cookies available when called. specifications specification status comment beaconthe definition of 'sendbeacon()' in that specification. candidate recommendation initial definition ...
Navigator.serviceWorker - Web APIs
access to registration, removal, upgrade, and communication with the serviceworker. the feature may not be available in private mode. syntax var workercontainerinstance = navigator.serviceworker; value serviceworkercontainer examples this code checks if the browser supports service workers. if ('serviceworker' in navigator) { // supported! } specifications specification status comment service workersthe definition of 'navigator.serviceworker' in that specification. working draft initial definition. ...
Navigator.share() - Web APIs
Web › API › Navigator › share
d. if (navigator.canshare && navigator.canshare({ files: filesarray })) { navigator.share({ files: filesarray, title: 'pictures', text: 'our pictures.', }) .then(() => console.log('share was successful.')) .catch((error) => console.log('sharing failed', error)); } else { console.log(`your system doesn't support sharing files.`); } specifications specification status comment web share apithe definition of 'share()' in that specification. draft ...
Navigator.vendor - Web APIs
Web › API › Navigator › vendor
the value of the navigator vendor property is always either "google inc.", "apple computer, inc.", or (in firefox) the empty string. syntax venstring = window.navigator.vendor value either "google inc.", "apple computer, inc.", or (in firefox) the empty string. specifications specification status comment html living standardthe definition of 'navigatorid: vendor' in that specification. living standard ...
Navigator.vendorSub - Web APIs
the value of the navigator.vendorsub property is always the empty string, in any browser. syntax vensub = window.navigator.vendorsub value the empty string specifications specification status comment html living standardthe definition of 'navigatorid: vendorsub' in that specification. living standard initial definition ...
Navigator.vibrate() - Web APIs
Web › API › Navigator › vibrate
then vibrate again. see vibration api for details. passing a value of 0, an empty array, or an array containing all zeros will cancel any currently ongoing vibration pattern. examples window.navigator.vibrate(200); // vibrate for 200ms window.navigator.vibrate([100,30,100,30,100,30,200,30,200,30,200,30,100,30,100,30,100]); // vibrate 'sos' in morse. specifications specification status comment vibration api recommendation linked to spec is the latest editor's draft; w3c version is a rec. ...
Navigator.wakeLock - Web APIs
the wakelock read-only property returns a wakelock interface which allows a document to acquire a screen wake lock. while a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver. syntax const wakelock = navigator.wakelock; specifications specification status comment screen wake lock api editor's draft initial definition ...
Navigator.xr - Web APIs
Web › API › Navigator › xr
time, a new xr instance is also created and attached to the navigator instance as navigator.xr. if the xr property exists and is non-null, you can use it to access the webxr device api. to determine if webxr is available, you can do something like this: if ("xr" in window.navigator) { /* webxr can be used! */ } else { /* webxr isn't available */ } specifications specification status comment webxr device apithe definition of 'navigator.xr' in that specification. working draft initial definition. ...
navigator.hardwareConcurrency - Web APIs
using that worker yet; these objects are, in turn, stored into an array for later use. this creates a pool of workers we can use to process requests later. let workerlist = []; for (let i = 0; i < window.navigator.hardwareconcurrency; i++) { let newworker = { worker: new worker('cpuworker.js'), inuse: false }; workerlist.push(newworker); } specification specification status comment html living standardthe definition of 'navigator.hardwareconcurrency' in that specification. living standard initial definition. ...
NavigatorConcurrentHardware - Web APIs
living standard initial definition. ...
NavigatorID.appCodeName - Web APIs
the value of the navigatorid.appcodename property is always "mozilla", in any browser. this property is kept only for compatibility purposes. note: do not rely on this property to return a real product name. all browsers return "mozilla" as the value of this property. syntax codename = navigator.appcodename value the string "mozilla". specifications specification status comment html living standardthe definition of 'navigatorid.appcodename' in that specification. living standard initial definition ...
NavigatorID.appName - Web APIs
the value of the navigatorid.appname property is always "netscape", in any browser. this property is kept only for compatibility purposes. note: do not rely on this property to return a real browser name. all browsers return "netscape" as the value of this property. syntax appname = navigator.appname value the string "netscape". specifications specification status comment html living standardthe definition of 'navigatorid.appname' in that specification. living standard initial definition ...
NavigatorID.appVersion - Web APIs
living standard initial definition ...
NavigatorID.platform - Web APIs
the browser is executing. for example: "macintel", "win32", "freebsd i386", "webtv os" example console.log(navigator.platform); usage notes most browsers, including chrome, edge, and firefox 63 and later, return "win32" even if running on a 64-bit version of windows. internet explorer and versions of firefox prior to version 63 still report "win64". specifications specification status comment html living standardthe definition of 'navigatorid.platform' in that specification. living standard initial definition. ...
NavigatorID.product - Web APIs
the value of the navigatorid.product property is always "gecko", in any browser. this property is kept only for compatibility purposes. note: do not rely on this property to return a real product name. all browsers return "gecko" as the value of this property. syntax productname = navigator.product value the string "gecko". specifications specification status comment html living standardthe definition of 'navigatorid.product' in that specification. living standard initial definition ...
NavigatorID.taintEnabled() - Web APIs
the navigatorid.taintenabled() method always returns false. tainting was a security method used by javascript 1.2. it has long been removed; this method only stays for maintaining compatibility with very old scripts. syntax result = window.navigator.taintenabled() specifications specification status comment html living standardthe definition of 'navigatorid.taintenabled' in that specification. living standard initial definition ...
NavigatorID.userAgent - Web APIs
living standard initial definition ...
NavigatorID - Web APIs
navigatorid.useragent read only returns the user-agent string for the current browser. methods the navigatorid interface doesn't inherit any methods. navigatorid.taintenabled() always returns false. javascript taint/untaint functions were removed in javascript 1.2. this method is only kept for compatibility purposes. not available in workers. specifications specification status comment html living standardthe definition of 'navigatorid' in that specification. living standard added the appcodename property and the taintenabled() method, for compatibility purpose. html5the definition of 'navigatorid' in that specification. recommendation initial specification. ...
NavigatorLanguage.language - Web APIs
tores a string representing the language version as defined in bcp 47. examples of valid language codes include "en", "en-us", "fr", "fr-fr", "es-es", etc. note that in safari on ios prior to 10.2, the country code returned is lowercase: "en-us", "fr-fr" etc. example if (/^en\b/.test(navigator.language)) { dolangselect(window.navigator.language); } specifications specification status comment html living standardthe definition of 'navigatorlanguage: language' in that specification. living standard initial definition ...
NavigatorLanguage.languages - Web APIs
living standard initial definition ...
NavigatorLanguage - Web APIs
ing the preferred language of the user, usually the language of the browser ui. the null value is returned when this is unknown. navigatorlanguage.languages read only returns an array of domstring representing the languages known to the user, by order of preference. methods the navigatorlanguage interface neither implements, nor inherit any method. specifications specification status comment html living standardthe definition of 'navigatorlanguage' in that specification. living standard since the html5 snapshot, the languages property has been added. html5the definition of 'navigatorlanguage' in that specification. recommendation initial specification; snapshot of an early version html living standard. ...
NavigatorOnLine - Web APIs
the navigatoronline interface contains methods and properties related to the connectivity status of the browser. there is no object of type navigatoronline, but other interfaces, like navigator or workernavigator, implement it. properties the navigatoronline interface doesn't inherit any property. navigatoronline.online read only returns a boolean indicating whether the browser is working online. methods the navigatoronline interface neither implements, nor inherit any method. specifications specification status html living standardthe definition of 'navigatoronline' in that specification. living standard ...
NavigatorPlugins.javaEnabled() - Web APIs
method indicates whether the current browser is java-enabled or not. syntax result = window.navigator.javaenabled() example if (window.navigator.javaenabled()) { // browser has java } notes the return value for this method indicates whether the preference that controls java is on or off - not whether the browser offers java support in general. specifications specification status comment html living standardthe definition of 'navigatorplugins.javaenabled' in that specification. living standard initial definition. ...
NavigatorPlugins.mimeTypes - Web APIs
name) methods. example function isjavapresent() { return 'application/x-java-applet' in navigator.mimetypes; } function getjavaplugindescription() { var mimetype = navigator.mimetypes['application/x-java-applet']; if (mimetype === undefined) { // no java plugin present return undefined; } return mimetype.enabledplugin.description; } specifications specification status comment html living standardthe definition of 'navigatorplugins.mimetypes' in that specification. living standard initial definition. ...
NavigatorPlugins.plugins - Web APIs
living standard initial definition. ...
NavigatorPlugins - Web APIs
isting the mime types supported by the browser. navigatorplugins.plugins read only returns a pluginarray listing the plugins installed in the browser. methods the navigatorplugins interface doesn't inherit any methods. navigatorplugins.javaenabled() read only returns a boolean flag indicating whether the host browser is java-enabled or not. specifications specification status comment html living standardthe definition of 'navigatorplugins' in that specification. living standard initial definition. ...
NavigatorStorage.storage - Web APIs
examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use. syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored. specifications specification status comment storagethe definition of 'navigator.storage' in that specification. living standard initial definition. ...
NavigatorStorage - Web APIs
...
NetworkInformation.downlink - Web APIs
determined by the properties of the underlying connection technology. note that chrome-based browsers do not conform to the specification, and arbitrarily cap the reported downlink at a maximum of 10 mbps as an anti-fingerprinting measure. similar caps exist for the reported latency. syntax var downlink = networkinformation.downlink value a double. specifications specification status comment network information apithe definition of 'downlink' in that specification. draft initial definition. ...
NetworkInformation.downlinkMax - Web APIs
draft initial definition ...
NetworkInformation.effectiveType - Web APIs
he networkinformation interface returns the effective type of the connection meaning one of 'slow-2g', '2g', '3g', or '4g'. this value is determined using a combination of recently observed, round-trip time and downlink values. syntax var effectivetype = networkinformation.effectivetype value a string containing one of 'slow-2g', '2g', '3g', or '4g'. specifications specification status comment network information apithe definition of 'effectivetype' in that specification. draft initial definition. ...
NetworkInformation.onchange - Web APIs
tax netinfo.onchange = function() { ... } examples // get the connection type. var type = navigator.connection.type; function changehandler(e) { // handle change of connection type here. } // register for event changes: navigator.connection.onchange = changehandler; // another way: navigator.connection.addeventlistener('change', changehandler); specifications specification status comment network information apithe definition of 'onchange' in that specification. draft initial definition ...
NetworkInformation.rtt - Web APIs
cation-layer rtt measurements across recently active connections. it excludes connections made to a private address space. if no recent measurement data is available, the value is based on the properties of the underlying connection technology. note: this feature is available in web workers. syntax rtt = networkinformation.rtt return value a number. specifications specification status comment network information apithe definition of 'rtt' in that specification. draft initial definition ...
NetworkInformation.type - Web APIs
information.type read-only property returns the type of connection a device is using to communicate with the network. note: this feature is available in web workers. syntax var type = netinfo.type return value an enumerated value that is one of the following values: "bluetooth" "cellular" "ethernet" "none" "wifi" "wimax" "other" "unknown" specifications specification status comment network information apithe definition of 'type' in that specification. draft initial definition ...
NetworkInformation - Web APIs
the network. it will be one of the following values: bluetooth cellular ethernet none wifi wimax other unknown event handlers networkinformation.onchange the event that's fired when connection information changes and the change is fired on this object. methods this interface also inherits methods of its parent, eventtarget. specifications specification status comment network information apithe definition of 'networkinformation' in that specification. draft initial definition ...
Node.appendChild() - Web APIs
Web › API › Node › appendChild
ppendchild() returning the child element: let ablock = document.createelement('block').appendchild( document.createelement('b') ); sets ablock to <b></b> only, which is probably not what you want. example // create a new paragraph element, and append it to the end of the document body let p = document.createelement("p"); document.body.appendchild(p); specifications specification status comment domthe definition of 'node.appendchild()' in that specification. living standard no change from document object model (dom) level 3 core specification. document object model (dom) level 3 core specificationthe definition of 'node.appendchild()' in that specification. obsolete no change from document object model (dom) level 2 core specification. ...
Node.baseURI - Web APIs
Web › API › Node › baseURI
normally equals the base url of the document the node is in. if the document contains xml:base attributes (which you shouldn't do in html documents), the element.baseuri takes the xml:base attributes of element's parents into account when computing the base url. see xml:base for details. you can use element.baseuri to obtain the base url of an element. specifications specification status comment domthe definition of 'node: baseuri' in that specification. living standard ...
Node.childNodes - Web APIs
Web › API › Node › childNodes
dename.) the document object itself has 2 children: the doctype declaration and the root element, typically referred to as documentelement. (in (x)html documents this is the html element.) childnodes includes all child nodes—including non-element nodes like text and comment nodes. to get a collection of only elements, use parentnode.children instead. specifications specification status comment domthe definition of 'node.childnodes' in that specification. living standard no change document object model (dom) level 3 core specificationthe definition of 'node.childnodes' in that specification. obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.childnodes' in that specification. obsolete ...
Node.cloneNode() - Web APIs
Web › API › Node › cloneNode
ent ids in a document! if the original node has an id attribute, and the clone will be placed in the same document, then you should modify the clone's id to be unique. name attributes may need to be modified also, depending on whether duplicate names are expected. to clone a node to insert into a different document, use document.importnode() instead. specifications specification status comment domthe definition of 'node.clonenode()' in that specification. living standard document object model (dom) level 3 core specificationthe definition of 'node.clonenode()' in that specification. obsolete document object model (dom) level 2 core specificationthe definition of 'node.clonenode()' in that specification. obsolete initial defi...
Node.compareDocumentPosition() - Web APIs
living standard document object model (dom) level 3 core specificationthe definition of 'node.comparedocumentposition()' in that specification. obsolete initial definition ...
Node.contains() - Web APIs
Web › API › Node › contains
on. syntax node.contains( othernode ) example this function checks to see if an element is in the page's body. as contains is inclusive and determining if the body contains itself isn't the intention of isinpage this case explicitly returns false. function isinpage(node) { return (node === document.body) ? false : document.body.contains(node); } specifications specification status comment domthe definition of 'node.contains()' in that specification. living standard initial definition ...
Node.firstChild - Web APIs
Web › API › Node › firstChild
nt.getelementbyid('para-01'); console.log(p01.firstchild.nodename); </script> now the console will show 'span'. to avoid the issue with node.firstchild returning #text or #comment nodes, parentnode.firstelementchild can be used to return only the first element node. however, node.firstelementchild requires a shim for internet explorer 9 and earlier. specifications specification status comment domthe definition of 'node.firstchild' in that specification. living standard no change document object model (dom) level 3 core specificationthe definition of 'node.firstchild' in that specification. obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.firstchild' in that specification. obsolete ...
Node.getRootNode() - Web APIs
Web › API › Node › getRootNode
living standard initial definition. ...
Node.getUserData() - Web APIs
Web › API › Node › getUserData
kmap can be used instead. syntax userdata = somenode.getuserdata(userkey); parameters userkey is the key to choose the specific data sought for the given node. more than one key may have been assigned on a given node, containing its own value. example var d = document.setuserdata('key', 15, null); console.log(document.getuserdata('key')); // 15 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.getuserdata()' in that specification. obsolete initial definition. ...
Node.hasChildNodes() - Web APIs
living standard ...
Node.insertBefore() - Web APIs
Web › API › Node › insertBefore
st child parentelement.insertbefore(newelement, thefirstchild) when the element does not have a first child, then firstchild is null. the element is still appended to the parent, after the last child. since the parent element did not have a first child, it did not have a last child, either. consequently, the newly inserted element is the only element. specifications specification status comment domthe definition of 'node.insertbefore' in that specification. living standard fixes errors in the insertion algorithm dom4the definition of 'node.insertbefore' in that specification. obsolete describes the algorithm in more detail document object model (dom) level 3 core specificationthe definition of 'node.insertbefore' in that specificatio...
Node.isConnected - Web APIs
Web › API › Node › isConnected
xpressed or implied. use at your own risk. */ if (!('isconnected' in node.prototype)) { object.defineproperty(node.prototype, 'isconnected', { get() { return ( !this.ownerdocument || !( this.ownerdocument.comparedocumentposition(this) & this.document_position_disconnected ) ); }, }); } specifications specification status comment domthe definition of 'isconnected' in that specification. living standard initial definition. ...
Node.isDefaultNamespace() - Web APIs
is a string representing the namespace against which the element will be checked. return value result is a boolean that holds the return value true or false. example var xulns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getelementsbytagnamens(xulns, 'textbox')[0]; alert(el.isdefaultnamespace(xulns)); // true specifications specification status comment domthe definition of 'node: isdefaultnamespace' in that specification. living standard ...
Node.isEqualNode() - Web APIs
Web › API › Node › isEqualNode
living standard ...
Node.isSameNode() - Web APIs
Web › API › Node › isSameNode
living standard no change (was for a long time removed from it). document object model (dom) level 3 core specificationthe definition of 'node.issamenode()' in that specification. obsolete initial definition ...
Node.isSupported() - Web APIs
Web › API › Node › isSupported
n 1, this is the string 2.0. if the version is not specified, supporting any version of the feature will cause the method to return true. example <div id="doc"> </div> <script> // get an element and check to see if its supports the dom2 html module. var main = document.getelementbyid('doc'); var output = main.issupported('html', '2.0'); </script> specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.issupported()' in that specification. obsolete no change from document object model (dom) level 2 core specification. document object model (dom) level 2 core specificationthe definition of 'node.issupported()' in that specification. obsolete initial definition. ...
Node.lastChild - Web APIs
Web › API › Node › lastChild
the node.lastchild read-only property returns the last child of the node. if its parent is an element, then the child is generally an element node, a text node, or a comment node. it returns null if there are no child elements. syntax var childnode = node.lastchild; example var tr = document.getelementbyid("row1"); var corner_td = tr.lastchild; specifications specification status comment domthe definition of 'node.lastchild' in that specification. living standard no change document object model (dom) level 3 core specificationthe definition of 'node.lastchild' in that specification. obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.lastchild' in that specification. obsolete no ...
Node.localName - Web APIs
Web › API › Node › localName
compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms. the tagname property continues to return in the upper case for html elements in html doms. for nodes of any type other than element_node and attribute_node localname is always null. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.localname' in that specification. obsolete document object model (dom) level 2 core specificationthe definition of 'node.localname' in that specification. obsolete initial definition ...
Node.lookupNamespaceURI() - Web APIs
iated with it on the given node if found (and null if not). syntax var namespace = node.lookupnamespaceuri(prefix); parameters prefix the prefix to look for. if this parameter is null, the method will return the default namespace uri, if any. return value a domstring containing the the namespace uri. if the prefix is not found, it returns null. specifications specification status comment domthe definition of 'node: lookupnamespaceuri' in that specification. living standard ...
Node.namespaceURI - Web APIs
Web › API › Node › namespaceURI
it its namespace from the element it is attached to. if an attribute is not explicitly given a namespace, it has no namespace. the dom does not handle or enforce namespace validation per se. it is up to the dom application to do any validation necessary. note too that the namespace prefix, once it is associated with a particular node, cannot be changed. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.namespaceuri' in that specification. obsolete specifies the behavior when it's set to null. document object model (dom) level 2 core specificationthe definition of 'dom level 2 core: xml namespaces' in that specification. obsolete document object model (dom) level ...
Node.nextSibling - Web APIs
Web › API › Node › nextSibling
**********************************/ in the above example, #text nodes are inserted in the dom where whitespace occurs between tags (i.e. after the closing tag of an element and before the opening tag of the next). the possible inclusion of text nodes must be allowed for when traversing the dom using nextsibling. see the resources in the notes section. specifications specification status comment domthe definition of 'node.nextsibling' in that specification. living standard no change document object model (dom) level 2 core specificationthe definition of 'node.nextsibling' in that specification. obsolete no change document object model (dom) level 1 specificationthe definition of 'node.nextsibling' in that specification. obsolete ...
Node.nodeName - Web APIs
Web › API › Node › nodeName
ml elements in doms flagged as html documents. read more details on nodename case sensitivity in different browsers. note that the element.tagname property could have been used instead, since nodename has the same value as tagname for an element. bear in mind, however, that nodename will return "#text" for text nodes while tagname will return undefined. specifications specification status comment domthe definition of 'nodename' in that specification. living standard ...
Node.nodeType - Web APIs
Web › API › Node › nodeType
nodetype === node.element_node; // true p.firstchild.nodetype === node.text_node; // true comments this example checks if the first node inside the document element is a comment, and displays a message if not. var node = document.documentelement.firstchild; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specifications specification status comment domthe definition of 'node.nodetype' in that specification. living standard deprecated attribute_node, entity_reference_node and notation_node types. document object model (dom) level 3 core specificationthe definition of 'node.nodetype' in that specification. obsolete no changes. document object model (dom) level 2 core specificationthe defin...
Node.nodeValue - Web APIs
Web › API › Node › nodeValue
living standard ...
Node.normalize() - Web APIs
Web › API › Node › normalize
living standard ...
Node.ownerDocument - Web APIs
living standard ...
Node.parentElement - Web APIs
y property returns the dom node's parent element, or null if the node either has no parent, or its parent isn't a dom element. syntax parentelement = node.parentelement parentelement is the parent element of the current node. this is always a dom element object, or null. example if (node.parentelement) { node.parentelement.style.color = "red"; } specifications specification status comment domthe definition of 'parentelement' in that specification. living standard initial definition. ...
Node.parentNode - Web APIs
Web › API › Node › parentNode
nt node. example if (node.parentnode) { // remove a node from the tree, unless // it's not in the tree already node.parentnode.removechild(node); } notes document and documentfragment nodes can never have a parent, so parentnode will always return null. it also returns null if the node has just been created and is not yet attached to the tree. specifications specification status comment domthe definition of 'node: parentnode' in that specification. living standard ...
Node.prefix - Web APIs
Web › API › Node › prefix
om4 this api was moved from node to the element and attr interfaces. syntax string = node.prefix examples the following logs "x" to the console. <x:div onclick="console.log(this.prefix)"/> notes this will only work when a namespace-aware parser is used, i.e. when a document is served with an xml mime type. this will not work for html documents. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.prefix' in that specification. obsolete specifies the behavior when it's set to null. document object model (dom) level 2 core specificationthe definition of 'initial definition' in that specification. obsolete initial definition ...
Node.previousSibling - Web APIs
fore a node obtained, for example, using node.firstchild or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get. see whitespace in the dom and w3c dom 3 faq: why are some text nodes empty? for more information. to navigate the opposite way through the child nodes list use node.nextsibling. specifications specification status comment domthe definition of 'node.previoussibling' in that specification. living standard no change document object model (dom) level 3 core specificationthe definition of 'node.previoussibling' in that specification. obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.previoussibling' in that specificatio...
Node.removeChild() - Web APIs
Web › API › Node › removeChild
living standard ...
Node.replaceChild() - Web APIs
Web › API › Node › replaceChild
living standard ...
Node.setUserData() - Web APIs
Web › API › Node › setUserData
obsolete initial definition ...
Node.textContent - Web APIs
Web › API › Node › textContent
living standard ...
Node - Web APIs
Web › API › Node
living standard added the following methods: getrootnode() dom4the definition of 'node' in that specification. obsolete removed the following properties: attributes, namespaceuri, prefix, and localname. removed the following methods: issupported(), hasattributes(), getfeature(), setuserdata(), and ...
NodeFilter.acceptNode() - Web APIs
living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter.acceptnode()' in that specification. obsolete initial definition. ...
NodeFilter - Web APIs
living standard document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter' in that specification. obsolete initial definition. ...
NodeIterator.detach() - Web APIs
err exception. syntax nodeiterator.detach(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodeiterator.detach(); // detaches the iterator nodeiterator.nextnode(); // throws an invalid_state_err exception specifications specification status comment domthe definition of 'nodeiterator.detach' in that specification. living standard transformed in a no-op document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.detach' in that specification. obsolete initial definition. ...
NodeIterator.expandEntityReferences - Web APIs
the nodeiterator.whattoshow method and the associated filter. syntax expand = nodeiterator.expandentityreferences; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = nodeiterator.expandentityreferences; specifications specification status comment document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.expandentityreferences' in that specification. obsolete initial definition. ...
NodeIterator.filter - Web APIs
be accepted and nodefilter.filter_reject for cases when the node should be rejected. syntax nodefilter = nodeiterator.filter; example const nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = nodeiterator.filter; specifications specification status comment domthe definition of 'nodeiterator.filter' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification. document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.filter' in that specification. obsolete initial definition. ...
NodeIterator.nextNode() - Web APIs
ver throw. syntax node = nodeiterator.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment domthe definition of 'nodeiterator.nextnode' in that specification. living standard as detach() is now a no-op method, this method cannot throw anymore. document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.nextnode' in that specification. obsolete initial definition. ...
NodeIterator.pointerBeforeReferenceNode - Web APIs
node indicated by the nodeiterator.referencenode property. syntax flag = nodeiterator.pointerbeforereferencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); flag = nodeiterator.pointerbeforereferencenode; specifications specification status comment domthe definition of 'nodeiterator.pointerbeforereferencenode' in that specification. living standard initial definition. ...
NodeIterator.previousNode() - Web APIs
living standard as detach() is now a no-op method, this method cannot throw anymore. document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.previousnode' in that specification. obsolete initial definition. ...
NodeIterator.referenceNode - Web APIs
the iterator remains anchored to the reference node as specified by this property. syntax node = nodeiterator.referencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); node = nodeiterator.referencenode; specifications specification status comment domthe definition of 'nodeiterator.referencenode' in that specification. living standard initial definition. ...
NodeIterator.root - Web APIs
Web › API › NodeIterator › root
epresents the node that is the root of what the nodeiterator traverses. syntax root = nodeiterator.root; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = nodeiterator.root; // document.body in this case specifications specification status comment domthe definition of 'nodeiterator.root' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification. document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.root' in that specification. obsolete initial definition. ...
NodeIterator.whatToShow - Web APIs
living standard no change from document object model (dom) level 2 traversal and range specification. document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.whattoshow' in that specification. obsolete initial definition. ...
NodeIterator - Web APIs
etach() this operation is a no-op. it doesn't do anything. previously it was telling the engine that the nodeiterator was no more used, but this is now useless. nodeiterator.previousnode() returns the previous node in the document, or null if there are none. nodeiterator.nextnode() returns the next node in the document, or null if there are none. specifications specification status comment domthe definition of 'nodeiterator' in that specification. living standard added the referencenode and pointerbeforereferencenode properties. removed the expandentityreferences property. the method detach() has been changed to be a no-op. the methods previousnode() and nextnode() don't raise an exception any more. document object model (dom) level 2...
NodeList.prototype.forEach() - Web APIs
Web › API › NodeList › forEach
ndow; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } or if (window.nodelist && !nodelist.prototype.foreach) { nodelist.prototype.foreach = array.prototype.foreach; } the above behavior is how many browsers actually implement nodelist.prototype.foreach() (chrome, for example). specifications specification status comment web idlthe definition of 'foreach' in that specification. candidate recommendation defines foreach on iterable declarations browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobile...
NodeList.item() - Web APIs
Web › API › NodeList › item
de in the nodelist returned by the item method. alternate syntax javascript also offers an array-like bracketed syntax for obtaining an item from a nodelist by index: nodeitem = nodelist[index] example var tables = document.getelementsbytagname("table"); var firsttable = tables.item(1); // or simply tables[1] - returns the second table in the dom specifications specification status comment domthe definition of 'nodelist: item' in that specification. living standard ...
NodeList.length - Web APIs
Web › API › NodeList › length
s the iterator in a for loop, as in this example. // all the paragraphs in the document var items = document.getelementsbytagname("p"); // for each item in the list, // append the entire element as a string of html var gross = ""; for (var i = 0; i < items.length; i++) { gross += items[i].innerhtml; } // gross is now all the html for the paragraphs specifications specification status comment domthe definition of 'nodelist: length' in that specification. living standard ...
NodeList - Web APIs
Web › API › NodeList
; } recent browsers also support iterator methods (foreach()) as well as entries(), values(), and keys(). there is also an internet explorer-compatible way to use array.prototype.foreach for iteration: const list = document.queryselectorall('input[type=checkbox]'); array.prototype.foreach.call(list, function (checkbox) { checkbox.checked = true; }); specifications specification status comment domthe definition of 'nodelist' in that specification. living standard document object model (dom) level 3 core specificationthe definition of 'nodelist' in that specification. obsolete document object model (dom) level 2 core specificationthe definition of 'nodelist' in that specification. obsolete document object model (dom...
NonDocumentTypeChildNode.nextElementSibling - Web APIs
living standard split the elementtraversal interface in childnode, parentnode, and nondocumenttypechildnode. this method is now defined on the former. the element and characterdata interfaces implemented the new interface. element traversal specificationthe definition of 'elementtraver...
NonDocumentTypeChildNode.previousElementSibling - Web APIs
living standard splitted the elementtraversal interface in childnode, parentnode, and nondocumenttypechildnode. this method is now defined on the former. the element and characterdata interfaces implemented the new interface. element traversal specificationthe defin...
NonDocumentTypeChildNode - Web APIs
its parent's children list, or null if there is no element in the list prior to this node. nondocumenttypechildnode.nextelementsibling read only returns the element immediately following this node in its parent's children list, or null if there is no element in the list following this node. methods there are neither inherited nor specific methods. specifications specification status comment domthe definition of 'nondocumenttypechildnode' in that specification. living standard splitted the elementtraversal interface in parentnode, childnode, and nondocumenttypechildnode. the previouselementsibling and nextelementsibling are now defined on the latter. the characterdata and element implemented the new interfaces. element traversal specificationthe...
Notation - Web APIs
Web › API › Notation
represents a dtd notation (read-only). may declare format of an unparsed entity or formally declare the document's processing instruction targets. inherits methods and properties from node. its nodename is the notation name. has no parent. properties notation.publicid read only is a domstring. notation.systemid read only is a domstring. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'notation' in that specification. obsolete no change document object model (dom) level 2 core specificationthe definition of 'notation' in that specification. obsolete no change document object model (dom) level 1 specificationthe definition of 'notation' in that specification...
Notification.Notification() - Web APIs
living standard initial definition. ...
Notification.actions - Web APIs
e: device and user agent might be able to display only a limited number of actions (due to, e.g., limited screen space). this limit can be infered from notification.maxactions. syntax var actions[] = notification.actions; value a read-only array of notificationaction objects, each describing a single action the user can choose within a notification. specifications specification status comment notifications apithe definition of 'actions' in that specification. living standard living standard ...
Notification.badge - Web APIs
note: this feature is available in web workers. the badge property of the notification interface returns the url of the image used to represent the notification when there is not enough space to display the notification itself. syntax var url = notification.badge value a usvstring containing a url. specifications specification status comment notifications apithe definition of 'badge' in that specification. living standard initial definition. ...
Notification.body - Web APIs
Web › API › Notification › body
ing of the notification, as specified in the body option of the notification() constructor. syntax var body = notification.body; value a domstring. examples function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle, options); console.log(n.body); } specifications specification status comment notifications apithe definition of 'body' in that specification. living standard living standard ...
Notification.close() - Web APIs
ion(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon }; var n = new notification(thetitle,options); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification. n.close(); } }); } specifications specification status comment notifications api living standard living standard ...
Notification.data - Web APIs
Web › API › Notification › data
ctured clone. examples the following snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor. var options = { body: 'do you like my body?', data: 'i like peas.' } var n = new notification('test notification',options); console.log(n.data) // should return 'i like peas.' specifications specification status comment notifications apithe definition of 'data' in that specification. living standard living standard ...
Notification.dir - Web APIs
Web › API › Notification › dir
with the browser-wide setting. examples the following snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor. var options = { body: 'do you like my body?', dir: 'rtl' } var n = new notification('test notification',options); console.log(n.dir) // should return 'rtl' specifications specification status comment notifications apithe definition of 'dir' in that specification. living standard living standard ...
Notification.icon - Web APIs
Web › API › Notification › icon
ication() constructor. syntax var icon = notification.icon; value a usvstring. examples in our to-do list app (view the app running live), we use the notification() constructor to fire a notification, passing it arguments to specify the body, icon and title we want. var notification = new notification('to do list', { body: text, icon: img }); specifications specification status comment notifications apithe definition of 'icon' in that specification. living standard living standard ...
Notification.image - Web APIs
note: this feature is available in web workers. the image read-only property of the notification interface contains the url of an image to be displayed as part of the notification, as specified in the image option of the notification() constructor. syntax var image = notification.image; value a usvstring. specifications specification status comment notifications apithe definition of 'image' in that specification. living standard living standard ...
Notification.lang - Web APIs
Web › API › Notification › lang
pecifying the language tag. examples the following snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor. var options = { body: 'do you like my body?', lang: 'en-us' } var n = new notification('test notification',options); console.log(n.lang) // should return 'en-us' specifications specification status comment notifications apithe definition of 'lang' in that specification. living standard living standard ...
Notification.maxActions - Web APIs
number which indicates the largest number of notification actions that can be presented to the user by the user agent and the device. examples the following snippet logs the maximum number of supported actions. const maxactions = notification.maxactions; console.log('this device can display at most ' + maxactions + ' actions on each notification.'); specifications specification status comment notifications api living standard living standard ...
Notification.onclick - Web APIs
living standard living standard. ...
Notification.onerror - Web APIs
note: this feature is available in web workers. the onerror property of the notification interface specifies an event listener to receive error events. these events occur when something goes wrong with a notification (in many cases an error preventing the notification from being displayed.) syntax notification.onerror = function() { ... }; specifications specification status comment notifications apithe definition of 'onerror' in that specification. living standard initial specification. ...
Notification.permission - Web APIs
living standard living standard ...
Notification.renotify - Web APIs
living standard living standard ...
Notification.requestPermission() - Web APIs
e spawn notifications in response to a user gesture (clicking a button). ...
Notification.requireInteraction - Web APIs
tting the requireinteraction option to true in the options object of the notification.notification() constructor. syntax function spawnnotification(thetitle,thebody,shouldrequireinteraction) { var options = { body: thebody, requireinteraction: shouldrequireinteraction } var n = new notification(thetitle,options); } value a boolean. specifications specification status comment notifications apithe definition of 'requireinteraction' in that specification. living standard living standard. ...
Notification.silent - Web APIs
ilent. examples the following snippet is intended to fire a silent notification; a simple options object is created, and then the notification is fired using the notification() constructor. var options = { body: 'do you like my body?', silent: true } var n = new notification('test notification', options); console.log(n.silent) // should log true specifications specification status comment notifications apithe definition of 'silent' in that specification. living standard living standard ...
Notification.tag - Web APIs
Web › API › Notification › tag
tification can share the same tag, linking them together. one notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar notifications. syntax var tag = notification.tag; value a domstring. examples our using the notifications api article has a good example of tag usage. specifications specification status comment notifications apithe definition of 'tag' in that specification. living standard living standard ...
Notification.timestamp - Web APIs
ing snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor. var dts = math.floor(date.now()); var options = { body: 'do you like my body?', timestamp: dts } var n = new notification('test notification',options); console.log(n.timestamp) // should log original timestamp specifications specification status comment notifications apithe definition of 'timestamp' in that specification. living standard living standard ...
Notification.title - Web APIs
of the notification, as specified in the title parameter of the notification() constructor. syntax var title = notification.title; value a domstring. examples function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); console.log(n.title) } specifications specification status comment notifications apithe definition of 'title' in that specification. living standard living standard ...
Notification.vibrate - Web APIs
living standard living standard ...
Notification - Web APIs
e spawn notifications in response to a user gesture (clicking a button). ...
NotificationAction - Web APIs
{ action: 'archive', title: 'archive' } ] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'archive') { // archive action was clicked archiveemail(); } else { // main body of notification was clicked clients.openwindow('/inbox'); } }, false); specifications specification status comment notifications api living standard living standard ...
NotificationEvent.NotificationEvent() - Web APIs
d notificationeventinit optional a dictionary object containing a notification object to be used as the notification the event is dispatched on. in later drafts of the specification, this parameter is not optional. example var n = new notification('hello'); var init = { notification: n }; var mynotificationevent = new notificationevent(type, init); specifications specification status comment notifications apithe definition of 'notificationevent() constructor' in that specification. living standard living standard. ...
NotificationEvent.action - Web APIs
a domstring object. example self.registration.shownotification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment notifications apithe definition of 'action' in that specification. living standard living standard. ...
NotificationEvent.notification - Web APIs
living standard living standard. ...
NotificationEvent - Web APIs
living standard living standard. note: this interface is specified in the notifications api, but accessed through serviceworkerglobalscope. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, plea...
Notifications API - Web APIs
n.getnotifications() method, for controlling the display of notifications. ...
OES_element_index_uint - Web APIs
l1 contexts. in webgl2, the functionality of this extension is available on the webgl2 context by default. extended methods this extension extends webglrenderingcontext.drawelements(): the type parameter now accepts gl.unsigned_int. examples var ext = gl.getextension('oes_element_index_uint'); gl.drawelements(gl.points, 8, gl.unsigned_int, 0); specifications specification status comment oes_element_index_uintthe definition of 'oes_element_index_uint' in that specification. recommendation initial definition. ...
OES_fbo_render_mipmap - Web APIs
vailable using the webglrenderingcontext.getextension() method. for more information, see also using extensions in the webgl tutorial. availability: this extension is only available to webgl 1. in webgl2, the functionality of this extension is available in the webgl 2 context by default. examples see the sample code in the khronos specification. specifications specification status oes_fbo_render_mipmap draft ...
OES_standard_derivatives - Web APIs
recommendation initial definition. ...
OES_texture_float - Web APIs
this extension implicitly enables the webgl_color_buffer_float extension (if supported), which allows rendering to 32-bit floating-point color buffers. examples var ext = gl.getextension('oes_texture_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_floatthe definition of 'oes_texture_float' in that specification. recommendation initial definition. ...
OES_texture_float_linear - Web APIs
ar_mipmap_linear, and use floating-point textures. examples gl.getextension('oes_texture_float'); gl.getextension('oes_texture_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_float_linearthe definition of 'oes_texture_float_linear' in that specification. recommendation initial definition. ...
OES_texture_half_float - Web APIs
ion implicitly enables the ext_color_buffer_half_float extension (if supported), which allows rendering to 16-bit floating point formats. examples var ext = gl.getextension('oes_texture_half_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, ext.half_float_oes, image); specifications specification status comment oes_texture_half_floatthe definition of 'oes_texture_half_float' in that specification. recommendation initial definition. ...
OES_texture_half_float_linear - Web APIs
extures. examples var halffloat = gl.getextension('oes_texture_half_float'); gl.getextension('oes_texture_half_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, halffloat.half_float_oes, image); specifications specification status comment oes_texture_half_float_linearthe definition of 'oes_texture_half_float_linear' in that specification. recommendation initial definition. ...
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
texarrayoes(arrayobject); parameters arrayobject a webglvertexarrayobject (vao) object to bind. return value none. examples var ext = gl.getextension('oes_vertex_array_object'); var vao = ext.createvertexarrayoes(); ext.bindvertexarrayoes(vao); // ... // calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification. recommendation initial definition. ...
OES_vertex_array_object.createVertexArrayOES() - Web APIs
none. return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data. examples var ext = gl.getextension('oes_vertex_array_object'); var vao = ext.createvertexarrayoes(); ext.bindvertexarrayoes(vao); // ... // calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification. recommendation initial definition. ...
OES_vertex_array_object.deleteVertexArrayOES() - Web APIs
webglvertexarrayobject object. syntax void ext.deletevertexarrayoes(arrayobject); parameters arrayobject a webglvertexarrayobject (vao) object to delete. return value none. examples var ext = gl.getextension('oes_vertex_array_object'); var vao = ext.createvertexarrayoes(); ext.bindvertexarrayoes(vao); // ... ext.deletevertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification. recommendation initial definition. ...
OES_vertex_array_object.isVertexArrayOES() - Web APIs
rs arrayobject a webglvertexarrayobject (vao) object to test. return value a glboolean indicating whether the given object is a webglvertexarrayobject object (true) or not (false). examples var ext = gl.getextension('oes_vertex_array_object'); var vao = ext.createvertexarrayoes(); ext.bindvertexarrayoes(vao); // ... ext.isvertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification. recommendation initial definition. ...
OES_vertex_array_object - Web APIs
xarrayobject. ext.bindvertexarrayoes() binds a given webglvertexarrayobject to the buffer. examples var oes_vao_ext = gl.getextension('oes_vertex_array_object'); var vao = oes_vao_ext.createvertexarrayoes(); oes_vao_ext.bindvertexarrayoes(vao); // ... // calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification. recommendation initial definition. ...
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
ent points. ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
syntax var offlineaudiocompletionevent = new offlineaudiocompletionevent(type, init) parameters type optional a domstring representing the type of object to create. init optional options are as follows: renderedbuffer: the rendered audiobuffer containing the audio data. return value a new offlineaudiocompletionevent object instance. specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
working draft initial definition. ...
OfflineAudioCompletionEvent - Web APIs
audiocompletionevent.offlineaudiocompletionevent creates a new offlineaudiocompletionevent object instance. properties also inherits properties from its parent, event. offlineaudiocompletionevent.renderedbuffer read only an audiobuffer containing the result of processing an offlineaudiocontext. methods inherits methods from its parent, event. specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification. working draft ...
OfflineAudioContext.OfflineAudioContext() - Web APIs
rget of events, therefore it implements the eventtarget interface. example const offlinectx = new offlineaudiocontext({ numberofchannels: 2, length: 44100 * 40, samplerate: 44100, }); const source = offlinectx.createbuffersource(); // etc... for a full working example, see our offline-audio-context-promise github repo (see the source code too.) specifications specification status comment web audio apithe definition of 'offlineaudiocontext()' in that specification. working draft ...
OfflineAudioContext: complete event - Web APIs
working draft ...
OfflineAudioContext.length - Web APIs
the length property of the offlineaudiocontext interface returns an integer representing the size of the buffer in sample-frames. syntax var length = offlineaudiocontext.length; value an integer representing the size of the buffer in sample-frames. specifications specification status comment web audio apithe definition of 'length' in that specification. working draft initial definition. ...
OfflineAudioContext.oncomplete - Web APIs
... } example when processing is complete, you might want to use the oncomplete handler the prompt the user that the audio can now be played, and enable the play button. offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'oncomplete' in that specification. working draft ...
OfflineAudioContext.resume() - Web APIs
ted, the promise is rejected with invalidstateerror. syntax offlineaudiocontext.resume().then(function() { ... }); parameters none. returns a promise resolving to void. exceptions the promise is rejected when the following exception is encountered. invalidstateerror if the context is not currently suspended or the rendering has not started. specifications specification status comment web audio apithe definition of 'resume()' in that specification. working draft initial definition. ...
OfflineAudioContext.startRendering() - Web APIs
working draft ...
OfflineAudioContext.suspend() - Web APIs
returns a promise resolving to void. exceptions the promise is rejected when any exception is encountered. invalidstateerror if the quantized frame number is one of the following: a negative number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification. working draft initial definition. ...
OfflineAudioContext - Web APIs
working draft initial definition ...
OffscreenCanvas() - Web APIs
eters width the width of the offscreen canvas. height the height of the offscreen canvas. examples this example creates a new offscreen canvas using the offscreencanvas() constructor. we then initialize a webgl context on it using the getcontext() method. let offscreen = new offscreencanvas(256, 256); let gl = offscreen.getcontext('webgl'); specifications specification status comment html living standardthe definition of 'offscreencanvas()' in that specification. living standard ...
OffscreenCanvas.convertToBlob() - Web APIs
return value a promise returning a blob object representing the image contained in the canvas. examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); // ... some drawing using the gl context ... offscreen.converttoblob().then(function(blob) { console.log(blob); }); // blob { size: 334, type: "image/png" } specifications specification status comment html living standardthe definition of 'offscreencanvas: converttoblob' in that specification. living standard ...
OffscreenCanvas.getContext() - Web APIs
ebgl2renderingcontext for "webgl2" and "experimental-webgl2" , or imagebitmaprenderingcontext for "bitmaprenderer". if the contexttype doesn't match a possible drawing context, null is returned. examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); gl; // webglrenderingcontext gl.canvas; // offscreencanvas specifications specification status comment html living standardthe definition of 'offscreencanvas.getcontext()' in that specification. living standard ...
OffscreenCanvas.height - Web APIs
the height property returns and sets the height of an offscreencanvas object. syntax var pxl = offscreen.height; offscreen.height = pxl; examples creating a new offscreen canvas and returning or setting the height of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.height; // 256 offscreen.height = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.height' in that specification. living standard ...
OffscreenCanvas.transferToImageBitmap() - Web APIs
ly rendered image of the offscreencanvas. syntax imagebitmap offscreencanvas.transfertoimagebitmap() return value an imagebitmap. examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); // ... some drawing using the gl context ... offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } specifications specification status comment html living standardthe definition of 'offscreencanvas.transfertoimagebitmap()' in that specification. living standard ...
OffscreenCanvas.width - Web APIs
the width property returns and sets the width of an offscreencanvas object. syntax var pxl = offscreen.width; offscreen.width = pxl; examples creating a new offscreen canvas and returning or setting the width of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.width; // 256 offscreen.width = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.width' in that specification. living standard ...
OffscreenCanvas - Web APIs
// ... some drawing using the gl context ... }; you can also use requestanimationframe in workers onmessage = function(evt) { const canvas = evt.data.canvas; const gl = canvas.getcontext("webgl"); function render(time) { // ... some drawing using the gl context ... requestanimationframe(render); } requestanimationframe(render); }; specifications specification status comment html living standardthe definition of 'offscreencanvas' in that specification. living standard ...
OrientationSensor.populateMatrix() - Web APIs
er. this is not something that would ever be shown to a user. see feature-policy for implementation instructions. syntax orientationinstance.populatematrix(targetmatrix) because orientationsensor is a base class, populatematrix may only be read from one of its derived classes. parameters targetmatrix tbd return value undefined example // tbd specifications specification status comment orientation sensorthe definition of 'populatematrix' in that specification. candidate recommendation initial definition. ...
OrientationSensor.quaternion - Web APIs
the unit quaternion representing the device's orientation. syntax var quaternion = orientationinstance.quaternion because orientationsensor is a base class, quaternion may only be read from one of its derived classes. value a array whose values are the x, y, z, and w components of the quaternion representing the device orientation. example // tbd specifications specification status comment orientation sensorthe definition of 'quaternion' in that specification. candidate recommendation initial definition. ...
OrientationSensor - Web APIs
candidate recommendation initial definition. ...
OscillatorNode.OscillatorNode() - Web APIs
he default is 'sine'. detune a detuning value (in cents) which will offset the frequency by the given amount. its default is 0. frequency the frequency (in hertz) of the periodic waveform. its default is 440. periodicwave an arbitrary period waveform described by a periodicwave object. return value a new oscillatornode object instance. specifications specification status comment web audio apithe definition of 'oscillatornode()' in that specification. working draft initial definition. ...
OscillatorNode.detune - Web APIs
working draft ...
OscillatorNode.frequency - Web APIs
theremin demo (see app.js for relevant code). // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'frequency' in that specification. working draft ...
OscillatorNode.onended - Web APIs
working draft ...
OscillatorNode.setPeriodicWave() - Web APIs
transform, where you get frequency domain values from time domain value. here, with createperiodicwave(), you specify the frequencies, and the browser performs a an inverse fourier transform to get a time domain buffer for the frequency of the oscillator. here, we only set one component at full volume (1.0) on the fundamental tone, so we get a sine wave. specifications specification status comment web audio apithe definition of 'setperiodicwave' in that specification. working draft ...
OscillatorNode.start() - Web APIs
theremin demo (see app.js for relevant code). // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification. working draft ...
OscillatorNode.stop() - Web APIs
e app.js for relevant code). // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification. working draft ...
OscillatorNode.type - Web APIs
theremin demo (see app.js for relevant code). // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'type' in that specification. working draft ...
OscillatorNode - Web APIs
de). // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'oscillatornode' in that specification. working draft ...
OverconstrainedError.OverconstrainedError() - Web APIs
rrently be met. when this event is thrown on a mediastreamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied. syntax var overconstrainederror = new overconstrainederror() parameters constraint the constraint that was not satified. message text for the error's message property. specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification. candidate recommendation initial definition. ...
OverconstrainedError.constraint - Web APIs
candidate recommendation initial definition. ...
OverconstrainedError.message - Web APIs
the message read-only property of the overconstrainederror interface returns the text supplied in the constructor. syntax var message = overconstrainederror.message; value a domstring. specifications specification status comment media capture and streamsthe definition of 'message' in that specification. candidate recommendation initial definition. ...
OverconstrainedError.name - Web APIs
the name read-only property of the overconstrainederror interface will always return 'overconstrainederror'. syntax var name = overconstrainederror.name; value a domstring. specifications specification status comment media capture and streamsthe definition of 'name' in that specification. candidate recommendation initial definition. ...
OverconstrainedError - Web APIs
ct. properties overconstrainederror.constraint read only returns the constraint that was supplied in the constructor, meaning the constraint that was not satisfied. overconstrainederror.message read only returns the text supplied in the constructor. overconstrainederror.name read only will always return overconstrainederror. methods none. specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification. candidate recommendation initial definition. ...
PageTransitionEvent.persisted - Web APIs
the persisted read-only property indicates if a webpage is loading from a cache. syntax window.addeventlistener('pageshow', function(event) { if (event.persisted) { console.log('page was loaded from cache.'); } }); value a boolean. specifications specification status comment html living standardthe definition of 'pagetransitionevent: persisted' in that specification. living standard initial definition ...
PageTransitionEvent - Web APIs
ly indicates if the document is loading from a cache. example html <!doctype html> <html> <body> </body> </html> javascript window.addeventlistener('pageshow', myfunction); function myfunction(event) { if (event.persisted) { alert("the page was cached by the browser"); } else { alert("the page was not cached by the browser"); } } specifications specification status comment html living standardthe definition of 'pagetransitionevent' in that specification. living standard initial definition ...
Page Visibility API - Web APIs
e an eventlistener providing the code to be called when the visibilitychange event is fired. //startsimulation and pausesimulation defined elsewhere function handlevisibilitychange() { if (document.hidden) { pausesimulation(); } else { startsimulation(); } } document.addeventlistener("visibilitychange", handlevisibilitychange, false); specifications specification status comment page visibility (second edition) recommendation initial definition. ...
Paint​Worklet​.device​Pixel​Ratio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels. syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer. specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification. working draft initial definition. ...
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels. syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer. specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification. working draft initial definition. ...
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels. syntax var devicepixelratio = paintworklet.devicepixelratio; value a double-precision integer. specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification. working draft initial definition. ...
PaintWorklet.registerPaint - Web APIs
he paint worklet using the registerpaint() function, as done above. to use it, you register it with the css.paintworklet.addmodule() method: <script> css.paintworklet.addmodule('checkboardworklet.js'); </script> you can then use the paint() css function in your css anywhere an <image> value is valid. li { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworklet.registerpaint' in that specification. working draft initial definition. ...
PaintWorklet - Web APIs
stylesheet, including the simplest way to provide a fallback if paintworklet isn't supported. <style> textarea { background-image: url(checkerboard); background-image: paint(checkerboard); } </style> <textarea></textarea> you can also use the @supports at-rule. @supports (background: paint(id)) { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworkletglobalscope' in that specification. working draft initial definition. ...
PannerNode.PannerNode() - Web APIs
tance, maxdistance, or rollofffactor properties have been given a value that is outside the accepted range. invalidstateerror the coneoutergain property has been given a value outside the accepted range (0–1). example var ctx = new audiocontext(); var options = { positionx : 1, maxdistance: 5000 } var mypanner = new pannernode(ctx, options); specifications specification status comment web audio apithe definition of 'pannernode()' in that specification. working draft ...
PannerNode.coneInnerAngle - Web APIs
working draft ...
PannerNode.coneOuterAngle - Web APIs
working draft ...
PannerNode.coneOuterGain - Web APIs
working draft ...
PannerNode.distanceModel - Web APIs
working draft ...
PannerNode.maxDistance - Web APIs
working draft ...
PannerNode.orientationX - Web APIs
working draft ...
PannerNode.orientationY - Web APIs
working draft ...
PannerNode.orientationZ - Web APIs
working draft ...
PannerNode.panningModel - Web APIs
working draft ...
PannerNode.positionX - Web APIs
working draft ...
PannerNode.positionY - Web APIs
working draft ...
PannerNode.positionZ - Web APIs
working draft ...
PannerNode.refDistance - Web APIs
working draft ...
PannerNode.rolloffFactor - Web APIs
working draft ...
PannerNode.setOrientation() - Web APIs
working draft ...
PannerNode.setPosition() - Web APIs
working draft ...
PannerNode - Web APIs
working draft ...
ParentNode.append() - Web APIs
Web › API › ParentNode › append
living standard initial definition. ...
ParentNode.childElementCount - Web APIs
living standard split the elementtraversal interface in childnode and parentnode. this method is now defined on the latter. the document and documentfragment implemented the new interfaces. element traversal specificationthe definition of 'elementtraversal.childelementcount' in that s...
ParentNode.children - Web APIs
living standard initial definition. ...
ParentNode.firstElementChild - Web APIs
living standard split the elementtraversal interface in childnode and parentnode. this method is now defined on the latter. the document and documentfragment implemented the new interfaces. element traversal specificationthe definition of 'elementtraversal.firstelementchild' in that s...
ParentNode.lastElementChild - Web APIs
living standard splitted the elementtraversal interface in childnode and parentnode. this method is now defined on the latter. the document and documentfragment implemented the new interfaces. ...
ParentNode.prepend() - Web APIs
living standard initial definition. ...
ParentNode.querySelector() - Web APIs
ng special characters for more information. return value the first element that matches at least one of the specified selectors or null if no such element is found. note: if the specified selectors include a css pseudo-element, the returned value is always null. exceptions syntaxerror the syntax of the specified selectors string is not valid. specifications specification status comment domthe definition of 'parentnode.queryselector()' in that specification. living standard living standard selectors api level 2the definition of 'parentnode.queryselector()' in that specification. obsolete no change dom4the definition of 'parentnode.queryselector()' in that specification. obsolete initial definition selectors api...
ParentNode.querySelectorAll() - Web APIs
by default, queryselectorall() only verifies that the last element in the selector is within the search scope. the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification. living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification. obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification. obsolete initial definition sele...
ParentNode.replaceChildren() - Web APIs
living standard initial definition. ...
ParentNode - Web APIs
ent with the current element as root that matches the specified group of selectors. parentnode.queryselectorall() returns a nodelist representing a list of elements with the current element as root that matches the specified group of selectors. parentnode.replacechildren() replaces the existing children of a node with a specified new set of children. specification specification status comment domthe definition of 'parentnode' in that specification. living standard split the elementtraversal interface into childnode and parentnode. the parentnode.firstelementchild, parentnode.lastelementchild, and parentnode.childelementcount properties are now defined on the latter. added the parentnode.children property, and the parentnode.queryselector(), parentnode.queryse...
PasswordCredential - Web APIs
...
PasswordCredential.additionalData - Web APIs
...
PasswordCredential.iconURL - Web APIs
the iconurl read-only property of the passwordcredential interface returns a usvstring containing a url pointing to an image for an icon. this image is intended for display in a credential chooser. the url must be accessible without authentication. syntax url =passwordcredential.iconurl value a usvstring containing a url. specifications specification status comment credential management level 1the definition of 'iconurl' in that specification. working draft initial definition. ...
PasswordCredential.idName - Web APIs
ote endpoint via fetch. this property defaults to 'username', but may be set to match whatever your backend service expects. syntax var idname = passwordcredential.idname passwordcredential.idname = "userid" value a usvstring represents the name used for the id field, when submitting the current object to a remote endpoint via fetch. example // tbd specifications specification status comment credential management level 1 working draft initial definition. ...
PasswordCredential.name - Web APIs
working draft initial definition. ...
PasswordCredential.password - Web APIs
the password read-only property of the passwordcredential interface returns a usvstring containing the password of the credential. syntax password =passwordcredential.password value a usvstring containing a password. specifications specification status comment credential management level 1the definition of 'password' in that specification. working draft initial definition. ...
PasswordCredential.passwordName - Web APIs
tch. this property defaults to 'password', but may be matched to anything your backend service expects. syntax var passwordname = passwordcredential.passwordname passwordcredential.passwordname = "passcode" value a usvstring representing the password field name, used when submitting the current object to a remote endpoint via fetch. example // tbd specifications specification status comment credential management level 1 working draft initial definition. ...
PasswordCredential - Web APIs
via fetch. this property defaults to 'password', but may be overridden to match whatever the backend service expects. event handlers none. methods none. examples var cred = new passwordcredential({ id: id, password: password, name: name, iconurl: iconurl }); navigator.credentials.store(cred) .then(function() { // do something else. }); specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchr...
Path2D() - Web APIs
Web › API › Path2D › Path2D
living standard initial definition. ...
Path2D.addPath() - Web APIs
Web › API › Path2D › addPath
living standard initial defintion. ...
Path2D - Web APIs
Web › API › Path2D
living standard ...
PayerErrors.email - Web APIs
Web › API › PayerErrors › email
candidate recommendation initial definition. ...
PayerErrors.name - Web APIs
Web › API › PayerErrors › name
candidate recommendation initial definition. ...
PayerErrors.phone - Web APIs
Web › API › PayerErrors › phone
candidate recommendation initial definition. ...
PayerErrors - Web APIs
ame property failed validation, and this string explains what needs to be corrected. if this property is absent, the paer name is fine phone optional if present, this string is an error message explaining why the payer's phone number (paymentresponse.payerphone) failed validation. this property is absent if the phone number passed validation. example specifications specification status comment payment request apithe definition of 'payererrors' in that specification. candidate recommendation initial definition. ...
PaymentAddress.addressLine - Web APIs
candidate recommendation initial definition. ...
PaymentAddress.city - Web APIs
the city read-only property of the paymentaddress interface returns a string containing the city or town portion of the address. syntax var paymentcity = paymentaddress.city; value a domstring indicating the city or town portion of the address described by the paymentaddress object. specifications specification status comment payment request apithe definition of 'paymentaddress.city' in that specification. candidate recommendation initial definition. ...
PaymentAddress.country - Web APIs
candidate recommendation initial definition. ...
PaymentAddress.dependentLocality - Web APIs
et names a sublocality is an area within a city, such as a neighborhood, borough, or district. in the united kingdom, this is used to indicate the post town in the united kingdom (known officially by the royal mail as the dependent locality). this is a disambiguating feature of addresses in places where a city may have areas that duplicate street names. specifications specification status comment payment request apithe definition of 'paymentaddress.dependentlocality' in that specification. candidate recommendation initial definition. ...
PaymentAddress.organization - Web APIs
candidate recommendation initial definition. ...
PaymentAddress.phone - Web APIs
f the paymentaddress interface returns a string containing the telephone number of the recipient or contact person. syntax var paymentphone = paymentaddress.phone; value a domstring containing the telephone number for the recipient of the shipment or of the responsible party for payment. if no phone number is available, this value is an empty string. specifications specification status comment payment request apithe definition of 'paymentaddress.phone' in that specification. candidate recommendation initial definition. ...
PaymentAddress.postalCode - Web APIs
the postal code portion of the address. a postal code is a string (either numeric or alphanumeric) which is used by a postal service to optimize mail routing and delivery. various countries use different terms for this. in most of the world, it's known as the "post code" or "postal code." in the united states, the zip code is used. india uses pin codes. specifications specification status comment payment request apithe definition of 'paymentaddress.postalcode' in that specification. candidate recommendation initial definition. ...
PaymentAddress.recipient - Web APIs
ace returns a string containing the name of the recipient, purchaser, or contact person at the payment address. syntax var paymentrecipient = paymentaddress.recipient; value a domstring giving the name of the person receiving or paying for the purchase, or the name of a contact person in other contexts. if no name is available, this string is empty. specifications specification status comment payment request apithe definition of 'paymentaddress.recipient' in that specification. candidate recommendation initial definition. ...
PaymentAddress.region - Web APIs
s, like belgium, it's uncommon for people to provide a region as part of their postal address. in such cases, the browser returns an empty string as the value of region. however, the address should still be acceptable to use for its intended purpose (e.g., to ship a product). however, always verify addresses to make sure what the user provides is usable. specifications specification status comment payment request apithe definition of 'paymentaddress.region' in that specification. candidate recommendation initial definition. ...
PaymentAddress.sortingCode - Web APIs
the sortingcode read-only property of the paymentaddress interface returns a string containing a postal sorting code such as is used in france. syntax var sortingcode = paymentaddress.sortingcode; value a domstring containing the sorting code portion of the address. specifications specification status comment payment request apithe definition of 'paymentaddress.sortingcode' in that specification. candidate recommendation initial definition. ...
PaymentAddress.toJSON() - Web APIs
candidate recommendation initial definition. ...
PaymentAddress - Web APIs
candidate recommendation initial definition. ...
PaymentCurrencyAmount.currency - Web APIs
ing the canonical, three-character currency identification code defined by the iso 4217 standard. this is the currency in which the payment's value is given. all currency values must include the currency system in this property. example this example represents the price of $42.95 in us dollars. let itemprice = { currency: "usd", value: "42.95" }; specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.currency' in that specification. candidate recommendation ...
PaymentCurrencyAmount.currencySystem - Web APIs
currencysystem = paymentcurrencyamount.currencysystem; value a domstring which specifies the currency standard used to specify the currency in which the payment value is represented. the default, urn:iso:std:iso:4217, indicates the iso 4217 standard. 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. candidate recommendation the march 20, 2018 version of the specification; the last one to include this proper...
PaymentCurrencyAmount.value - Web APIs
candidate recommendation ...
PaymentCurrencyAmount - Web APIs
cification and should no longer be used. currencysystem optional a string describing the standard or specification as well as the currency system identifier within that system which was used to provide the value. this has been removed; instead of allowing sites to choose the standard to use, iso 4217 is always used for the currency identifier now. specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification. candidate recommendation initial definition. ...
PaymentDetailsBase - Web APIs
constructor. paymentdetailsupdate provides updated payment details while the payment user interface is being handled. 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. candidate recommendation initial definition. ...
PaymentDetailsUpdate.error - Web APIs
etailsupdate object specifies no valid shipping options in its shippingoptions list. this message can be used to explain to the user why they cannot submit their payment as currently specified—whether that's because the selected products cannot be shipped to their region or because their address is not served by any of the shipping companies you use. specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.error' in that specification. candidate recommendation initial definition. ...
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
rrors in the properties of a paymentaddress. for each property in paymentaddress, a property by the same name is found in shippingaddresserrors if and only if a validation error occurred for that property. in that case, the property in shippingaddresserrors is a string describing the validation error, ideally including suggestions about fixing the error. specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.shippingaddresserrors' in that specification. candidate recommendation initial definition. ...
PaymentDetailsUpdate - Web APIs
item providing an updated total for the payment. make sure this equals the sum of all of the items in displayitems. this is not calculated automatically. you must update this value yourself anytime the total amount due changes. this lets you have flexibility for how to handle things like tax, discounts, and other adjustments to the total price charged. specifications specification status comment payment request apithe definition of 'paymentdetailsupdate' in that specification. candidate recommendation initial definition. ...
PaymentItem - Web APIs
on the design of the interface. pending secure context a boolean value which is true if the specified amount has not yet been finalized. this can be used to show items such as shipping or tax amounts that depend upon the selection of shipping address, shipping option, or so forth. the user agent may show this information but is not required to do so. specifications specification status comment payment request apithe definition of 'paymentitem' in that specification. candidate recommendation initial definition. ...
PaymentMethodChangeEvent - Web APIs
describing a change to the options specified for the payment method given in the methodname property. the type of the methoddetails property depends on the payment method. for example, if methodname is basic-card, indicating that the basic card payment method is being used for validation, the methoddetails field must be a basiccardchangedetails object. specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent()' in that specification. candidate recommendation initial definition. ...
PaymentMethodChangeEvent.methodDetails - Web APIs
ddetails); object.assign(newstuff, result); break; } } // finally... 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. candidate recommendation initial definition. ...
PaymentMethodChangeEvent.methodName - Web APIs
(cardtype) { case "visa": // do apple pay specific handling for visa card... // methoddetails contains the card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally... ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methodname' in that specification. candidate recommendation initial definition. ...
PaymentMethodChangeEvent - Web APIs
e payment method identifier, a string which uniquely identifies a particular payment method. this identifier is usually a url used during the payment process, but may be a standardized non-url string as well, such as basic-card. the default value is the empty string, "". methods this interface includes methods inherited from paymentrequestupdateevent. specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent' in that specification. candidate recommendation initial definition. ...
PaymentRequest.PaymentRequest() - Web APIs
truments, details, options); // add event listeners here. // call show() to trigger the browser's payment flow. request.show().then(function(instrumentresponse) { // do something with the response from the ui. }) .catch(function(err) { // do something with the error from request.show(). }); } catch (e) { // catch any other errors. } specifications specification status comment payment request apithe definition of 'paymentrequest() constructor' in that specification. candidate recommendation initial definition. ...
PaymentRequest.abort() - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefi...
PaymentRequest.canMakePayment() - Web APIs
pay logo, for instance return; } // otherwise... let's see if we can use basic card const supportsbasiccard = await new paymentrequest( [{ supportedmethods: "basic-card" }], details ).canmakepayment(); if (supportsbasiccard) { // show basic card support return; } // otherwise, make payments using html form element } specifications specification status comment payment request apithe definition of 'canmakepayment()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechr...
PaymentRequest.prototype.id - Web APIs
Web › API › PaymentRequest › id
the paymentresponse returned from the show() method, but under the requestid attribute. const response = await request.show(); console.log(response.requestid === request.id); // and in serialized form too const json = response.tojson(); console.log(json.requestid,response.requestid, request.id); syntax var id = paymentrequest.id value a domstring. specifications specification status comment payment request apithe definition of 'id' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
PaymentRequest: merchantvalidation event - Web APIs
candidate recommendation ...
PaymentRequest.onmerchantvalidation - Web APIs
candidate recommendation initial definition. ...
PaymentRequest.onpaymentmethodchange - Web APIs
e) { case "store": // do apple pay specific handling for store card... // methoddetails contains the store card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally... ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'onpaymentmethodchange' in that specification. candidate recommendation initial definition. ...
PaymentRequest.onshippingaddresschange - Web APIs
hange', function(evt) { evt.updatewith(new promise(function(resolve) { updatedetails(details, request.shippingaddress, resolve); })); }); payment.show().then(function(paymentresponse) { // processing of paymentresponse exerpted for the same of clarity. }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'onshippingaddresschange' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmo...
PaymentRequest.onshippingoptionchange - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmob...
PaymentRequest: paymentmethodchange event - Web APIs
to the paymentrequest in order to add any service fees that the payment method might require. before the event handler returns, it calls the event's paymentmethodchangeevent.updatewith.updatewith() method to integrate the changes into the request. related events merchantvalidation, shippingaddresschange, shippingoptionchange, and payerdetailchange specifications specification status comment payment request apithe definition of 'paymentmethodchange' in that specification. candidate recommendation ...
PaymentRequest.shippingAddress - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. no compatibility ...
PaymentRequest.shippingOption - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrom...
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. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for android...
PaymentRequest: shippingaddresschange event - Web APIs
ailsupdate 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. candidate recommendation initial definition. ...
PaymentRequest: shippingoptionchange event - Web APIs
candidate recommendation initial definition. ...
PaymentRequest.show() - Web APIs
no, so use a web form instead. } // let's update the total as the sheet is shown const updateddetails = { total: { label: "total", amount: { value: "20", currency: "aud" }, }, }; const response = await request.show(updateddetails); // check response, etc... } document.getelementbyid("buybutton").onclick = requestpayment; specifications specification status comment payment request apithe definition of 'show(optional detailspromise)' in that specification. candidate recommendation initial definition. ...
PaymentRequest - Web APIs
dler property. shippingaddresschange secure context dispatched whenever the user changes their shipping address. also available using the onshippingaddresschange event handler property. shippingoptionchange secure context dispatched whenever the user changes a shipping option. also available using the onshippingoptionchange event handler property. specifications specification status comment payment request apithe definition of 'paymentrequest' in that specification. candidate recommendation initial definition. ...
PaymentRequestEvent.instrumentKey - Web APIs
working draft initial definition. ...
PaymentRequestEvent.methodData - Web APIs
working draft initial definition. ...
PaymentRequestEvent.modifiers - Web APIs
the modifiers read-only property of the paymentrequestevent interface returns an array of objects containing changes to payment details. syntax var modifiers[] = paymentdetailsevent.modifiers value an array of modifier objects. specifications specification status comment payment handler apithe definition of 'modifiers' in that specification. working draft initial definition. ...
PaymentRequestEvent.openWindow() - Web APIs
is on the same origin as the calling page. it returns a promise that resolves with a reference to a windowclient. syntax var apromise = paymentrequestevent.openwindow(url) parameters url the url to open in the new window. it must be on the same origin as the calling page. return value a promise that resolves with a reference to a windowclient. specifications specification status comment payment handler apithe definition of 'openwindow' in that specification. working draft initial definition. ...
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. working draft initial definition. ...
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. working draft initial definition. ...
PaymentRequestEvent.respondWith() - Web APIs
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. ) parameters promise a promise that resolves with a paymentresponse object. return value a paymentresponse object. specifications specification status comment payment handler apithe definition of 'respondwith' in that specification. working draft initial definition. ...
PaymentRequestEvent.topOrigin - Web APIs
working draft initial definition. ...
PaymentRequestEvent.total - Web APIs
working draft initial definition. ...
PaymentRequestEvent - Web APIs
or payment. methods openwindow() opens the specified url in a new window, if and only if the given url is on the same origin as the calling page. it returns a promise that resolves with a reference to a windowclient. respondwith() prevents the default event handling and allows you to provide a promise for a paymentresponse object yourself. specifications specification status comment payment handler apithe definition of 'paymentrequestevent' in that specification. working draft initial definition. ...
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
s of a paymentrequest in response to a user action. actual updates are made by passing options to the updatewith() method. 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. candidate recommendation initial definition. ...
PaymentRequestUpdateEvent.updateWith() - Web APIs
tal for the payment. make sure this equals the sum of all of the items in displayitems. this is not calculated automatically. you must update this value yourself anytime the total amount due changes. this lets you have flexibility for how to handle things like tax, discounts, and other adjustments to the total price charged. return value undefined. specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent.updatewith()' in that specification. candidate recommendation initial definition. ...
PaymentRequestUpdateEvent - Web APIs
candidate recommendation initial definition. ...
PaymentResponse.details - Web APIs
ent server. payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
PaymentResponse.methodName - Web APIs
ent server. payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition. ...
PaymentResponse.onpayerdetailchange - Web APIs
candidate recommendation initial definition. ...
PaymentResponse.payerEmail - Web APIs
the payeremail read-only property of the paymentresponse interface returns the email address supplied by the user. 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. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androido...
PaymentRequest.payerName - Web APIs
the payername read-only property of the paymentresponse interface returns the name supplied by the user. this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor. syntax var payername = paymentresponse.payername; value a string containing the payer name. specifications specification status comment payment request apithe definition of 'payername' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinterne...
PayerResponse.payerPhone - Web APIs
...
PaymentResponse: payerdetailchange event - Web APIs
candidate recommendation ...
PaymentResponse.requestId - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
PaymentResponse.retry() - Web APIs
candidate recommendation initial definition. ...
PaymentResponse.shippingAddress - Web APIs
browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchr...
PaymentResponse.shippingOption - Web APIs
browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
PaymentResponse - Web APIs
erty of this interface. payerdetailchange secure context fired during a retry when the user makes changes to their personal information while filling out a payment request form. allows the developer to revalidate any requested user data (e.g., the phone number or the email address) if it changes. also available via the onpayerdetailchange property. specifications specification status comment payment request apithe definition of 'paymentresponse' in that specification. candidate recommendation initial definition. ...
PaymentValidationErrors - Web APIs
. this object's contents will vary depending on the payment used. for example, if the user chose to pay by credit card using the basic-card payment method, this is a basiccarderrors object. shippingaddress optional an addresserrors object which contains error messages for any of the fields in the shipping address that failed validation. example specifications specification status comment payment request api candidate recommendation initial definition. basic card payment working draft defines basiccarderrors ...
Payment processing concepts - Web APIs
t itself implements a payment handler. for instance, safari has integrated support for apple pay, so the apple pay payment handler uses this to ensure that apple pay can be used to pay the merchant by sending merchantvalidation to the client, instructing it to fetch the server's validation data and deliver it to the payment handler by calling complete(). specifications specification status comment payment request api candidate recommendation initial definition. basic card payment working draft defines basiccardrequest and basiccardresponse. payment method identifiers candidate recommendation defines payment method identifiers and how they are validated, and, where applicable, minted and formally registered with the w3c. ...
Using the Payment Request API - Web APIs
rface after successful payment demo for the full code. pre-authorizing transactions some use cases (e.g., paying for fuel at a service station) involve pre-authorization of payment. one way to do this is through a payment handler (see the payment handler api). at time of writing, that specification includes a canmakepayment event that a payment handler could make use of to return authorization status. the merchant code would look like this: let paymentrequest = new paymentrequest( [{supportedmethods: 'https://example.com/preauth'}], ...); // send `canmakepayment` event to the payment handler. paymentrequest.canmakepayment() .then(function(res) { if (res) { // the payment handler has pre-authorized a transaction // with some static amount, e.g., usd $1.00. }...
Payment Request API - Web APIs
paymentvalidationerrors object sent to the paymentrequest when an error occurs. basiccardrequest defines an object structure for containing payment request details such as card type. basiccardresponse defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address. specifications specification status comment payment request api candidate recommendation initial definition. basic card payment working draft defines basiccardrequest and basiccardresponse, among other things needed for handling credit card payment payment method identifiers candidate recommendation defines payment method identifiers and how they are validated, and, where applicable, ...
Pbkdf2Params - Web APIs
rivekey() operation will be. in this context, slow is good, since it makes it more expensive for an attacker to run a dictionary attack against the keys. the general guidance here is to use as many iterations as possible, subject to keeping an acceptable level of performance for your application. examples see the examples for subtlecrypto.derivekey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.pbkdf2params' in that specification. recommendation ...
performance.clearMarks() - Web APIs
erformance.mark("dog"); performance.mark("dog"); logmarkcount() // "found this many entries: 6" // delete just the "squirrel" performancemark entries. performance.clearmarks('squirrel'); logmarkcount() // "found this many entries: 4" // delete all of the performancemark entries. performance.clearmarks(); logmarkcount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmarks()' in that specification. working draft clarifies clearmarks(). user timingthe definition of 'clearmarks()' in that specification. recommendation basic definition. ...
performance.clearMeasures() - Web APIs
", "a", "b"); logmeasurecount() // "found this many entries: 5" // delete just the "from navigation" performancemeasure entries. performance.clearmeasures("from navigation"); logmeasurecount() // "found this many entries: 3" // delete all of the performancemeasure entries. performance.clearmeasures(); logmeasurecount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmeasures()' in that specification. working draft clarifies clearmeasures(). user timingthe definition of 'clearmeasures()' in that specification. recommendation basic definition. ...
performance.clearResourceTimings() - Web APIs
candidate recommendation initial definition. ...
performance.getEntries() - Web APIs
candidate recommendation performance timelinethe definition of 'getentries()' in that specification. recommendation initial definition. ...
performance.getEntriesByName() - Web APIs
candidate recommendation performance timelinethe definition of 'getentriesbyname()' in that specification. recommendation initial definition. ...
performance.getEntriesByType() - Web APIs
candidate recommendation performance timelinethe definition of 'getentriesbytype()' in that specification. recommendation initial definition. ...
performance.mark() - Web APIs
Web › API › Performance › mark
g"); // get all of the performancemark entries. const allentries = performance.getentriesbytype("mark"); console.log(allentries.length); // 6 // get all of the "monkey" performancemark entries. const monkeyentries = performance.getentriesbyname("monkey"); console.log(monkeyentries.length); // 2 // clear out all of the marks. performance.clearmarks(); specifications specification status comment user timing level 2the definition of 'mark()' in that specification. working draft clarifies mark() processing model. user timingthe definition of 'mark()' in that specification. recommendation basic definition. ...
performance.measure() - Web APIs
asure from navigation start to b", undefined, markernameb); performance.measure("measure from the start of navigation to now"); // pull out all of the measurements. console.log(performance.getentriesbytype("measure")); // finally, clean up the entries. performance.clearmarks(); performance.clearmeasures(); }, 1000); }, 1000); specifications specification status comment user timing level 2the definition of 'measure()' in that specification. working draft clarifies measure() processing model. user timingthe definition of 'measure()' in that specification. recommendation basic definition. ...
Performance.navigation - Web APIs
timing level 2 specification. the legacy performance.navigation read-only property returns a performancenavigation object representing the type of navigation that occurs in the given browsing context, such as the number of redirections needed to fetch the resource. this property is not available in workers. syntax navobject = performance.navigation; specifications specification status comment navigation timingthe definition of 'performance.navigation' in that specification. recommendation initial definition. ...
performance.now() - Web APIs
Web › API › Performance › now
same-origin cross-origin-embedder-policy: require-corp these headers ensure a top-level document does not share a browsing context group with cross-origin documents. coop process-isolates your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs-leaks. specifications specification status comment high resolution time level 2the definition of 'performance.now()' in that specification. recommendation stricter definitions of interfaces and types. high resolution timethe definition of 'performance.now()' in that specification. recommendation initial definition ...
Performance.onresourcetimingbufferfull - Web APIs
lback function on the onresourcetimingbufferfull property. function buffer_full(event) { console.log("warning: resource timing buffer is full!"); performance.setresourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> specifications specification status comment resource timing level 1the definition of 'onresourcetimingbufferfull' in that specification. candidate recommendation initial definition. ...
Performance: resourcetimingbufferfull event - Web APIs
candidate recommendation initial definition. ...
performance.setResourceTimingBufferSize() - Web APIs
not support web performance"); return; } var supported = typeof performance.setresourcetimingbuffersize == "function"; if (supported) { log("... performance.setresourcetimingbuffersize() = yes"); performance.setresourcetimingbuffersize(maxsize); } else { log("... performance.setresourcetimingbuffersize() = not supported"); } } specifications specification status comment resource timing level 1the definition of 'setresourcetimingbuffersize()' in that specification. candidate recommendation initial definition. ...
Performance.timeOrigin - Web APIs
the timeorigin read-only property of the performance interface returns the high resolution timestamp of the start time of the performance measurement. note: this feature is available in web workers. syntax var timeorigin = performance.timeorigin value a high resolution timestamp. specifications specification status high resolution time level 2the definition of 'timeorigin' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for andro...
Performance.timing - Web APIs
property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performance.timing read-only property returns a performancetiming object containing latency-related performance information. this property is not available in workers. syntax timinginfo = performance.timing; specifications specification status comment navigation timing level 2 working draft initial definition. ...
performance.toJSON() - Web APIs
epresentation of the performance object's properties. note: this feature is available in web workers. syntax myperf = performance.tojson() arguments none return value myperf a json object that is the serialization of the performance object. example var js; js = window.performance.tojson(); console.log("json = " + json.stringify(js)); specifications specification status comment high resolution time level 2the definition of 'tojson() serializer' in that specification. recommendation defines tojson(). ...
Performance - Web APIs
jsonizer returning a json object representing the performance object. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. resourcetimingbufferfull fired when the browser's resource timing buffer is full. also available via the onresourcetimingbufferfull property. specifications specification status comment high resolution time level 2the definition of 'performance' in that specification. recommendation defines tojson() method. high resolution timethe definition of 'performance' in that specification. recommendation defines now() method. performance timeline level 2the definition of 'performance extensions' in that specification. candidate recomme...
PerformanceEntry.duration - Web APIs
candidate recommendation performance timelinethe definition of 'duration' in that specification. recommendation initial definition. ...
PerformanceEntry.entryType - Web APIs
candidate recommendation performance timelinethe definition of 'entrytype' in that specification. recommendation initial definition. ...
PerformanceEntry.name - Web APIs
candidate recommendation performance timelinethe definition of 'name' in that specification. recommendation initial definition. ...
PerformanceEntry.startTime - Web APIs
candidate recommendation performance timelinethe definition of 'starttime' in that specification. recommendation initial definition. ...
PerformanceEntry.toJSON() - Web APIs
candidate recommendation initial definition of tojson() method. ...
PerformanceEntry - Web APIs
"duration"]; 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("... " + properties[i] + " = " + value); } else { console.log("... " + properties[i] + " is not supported"); } } } specifications specification status comment resource timing level 3 editor's draft resource timing level 2 working draft resource timing level 1 candidate recommendation adds the performanceresourcetiming interface and the resource value for entrytype. navigation timing level 2 working draft navigation timing recommendation adds the performancenavig...
PerformanceEventTiming - Web APIs
unknown initial definition. ...
PerformanceFrameTiming - Web APIs
performanceentry.name returns the document's address. performanceentry.starttime returns the timestamp when the frame was started. performanceentry.duration returns a timestamp indicating the difference between the starttimes of two successive frames. methods this interface has no methods. example see the example in using the frame timing api. specifications specification status comment frame timingthe definition of 'performanceframetiming' in that specification. draft initial definition. ...
PerformanceLongTaskTiming.attribution - Web APIs
working draft initial definition. ...
PerformanceLongTaskTiming - Web APIs
ze="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancelongtasktiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties performancelongtasktiming.attribution read only returns a sequence of taskattributiontiming instances. specifications specification status comment long tasks api 1the definition of 'performancelongtasktiming' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedg...
PerformanceMark - Web APIs
name returns the name given to the mark when it was created via a call to performance.mark(). performanceentry.starttime returns the domhighrestimestamp when performance.mark() was called. performanceentry.duration returns "0". (a mark has no duration.) methods this interface has no methods. example see the example in using the user timing api. specifications specification status comment user timing level 2the definition of 'performancemark' in that specification. working draft user timingthe definition of 'performancemark' in that specification. recommendation basic definition. ...
PerformanceMeasure - Web APIs
ttime returns a timestamp given to the measure when performance.measure() was called. performanceentry.duration returns a domhighrestimestamp that is the duration of the measure (typically, the measure's end mark timestamp minus its start mark timestamp). methods this interface has no methods. example see the example in using the user timing api. specifications specification status comment user timing level 2the definition of 'performancemeasure' in that specification. working draft user timingthe definition of 'performancemeasure' in that specification. recommendation basic definition. ...
PerformanceNavigation.redirectCount - Web APIs
f this property is deprecated in the navigation timing level 2 specification. please use the performancenavigationtiming interface instead. the legacy performancenavigation.redirectcount read-only property returns an unsigned short representing the number of redirects done before reaching the page. syntax amount = performancenavigation.redirectcount; specifications specification status comment navigation timingthe definition of 'performancenavigation.redirectcount' in that specification. recommendation initial definition. ...
PerformanceNavigation.type - Web APIs
on, a script, or typing the url in the address bar. 1 type_reload the page was accessed by clicking the reload button or via the location.reload() method. 2 type_back_forward the page was accessed by navigating into the history. 255 type_reserved any other way. syntax type = performancenavigation.type; specifications specification status comment navigation timingthe definition of 'performancenavigation.type' in that specification. recommendation initial definition. ...
PerformanceNavigation - Web APIs
ved (255) any other way. performancenavigation.redirectcount read only an unsigned short representing the number of redirects done before reaching the page. methods the performance interface doesn't inherit any methods. performancenavigation.tojson() is a jsonizer returning a json object representing the performancenavigation object. specifications specification status comment navigation timingthe definition of 'performancenavigation' in that specification. recommendation initial definition. ...
PerformanceNavigationTiming.domComplete - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.domInteractive - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.loadEventEnd - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.loadEventStart - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.redirectCount - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.toJSON() - Web APIs
rited interface and with entries for each of the serializable attributes. example // get a resource performance entry var perfentries = performance.getentriesbytype("navigation"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performancenavigationtiming.tojson() = " + s); specifications specification status comment navigation timing level 2the definition of 'tojson()' in that specification. working draft initial definition. ...
PerformanceNavigationTiming.type - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.unloadEventEnd - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming.unloadEventStart - Web APIs
working draft initial definition. ...
PerformanceNavigationTiming - Web APIs
working draft initial definition. ...
PerformanceObserver() - Web APIs
candidate recommendation initial definition of performanceobserver() constructor. ...
PeformanceObserver.disconnect() - Web APIs
// process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event // ... // disable additional performance events observer.disconnect(); } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'disconnect()' in that specification. candidate recommendation initial definition of disconnect() method. ...
PerformanceObserver.observe() - Web APIs
candidate recommendation initial definition of observe() method. ...
PerformanceObserver.takeRecords() - Web APIs
candidate recommendation initial definition of takerecords() method. ...
PerformanceObserver - Web APIs
iving performance entries. performanceobserver.takerecords() returns the current list of performance entries stored in the performance observer, emptying it out. example function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver' in that specification. candidate recommendation initial definition of performanceobserver interface. ...
PerformanceObserverEntryList.getEntries() - Web APIs
candidate recommendation initial definition. ...
PerformanceObserverEntryList.getEntriesByName() - Web APIs
candidate recommendation initial definition of getentriesbyname() method. ...
PerformanceObserverEntryList.getEntriesByType() - Web APIs
candidate recommendation initial definition of getentriesbytype() method. ...
PerformanceObserverEntryList - Web APIs
and entry type. example // create observer for all performance event types // list is of type performanceobserveentrylist var observe_all = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); // do something with it } }) specifications specification status comment performance timeline level 2the definition of 'performanceobserverentrylist' in that specification. candidate recommendation initial definition. ...
PerformancePaintTiming - Web APIs
working draft initial definition. ...
PerformanceResourceTiming.connectEnd - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.connectStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.decodedBodySize - Web APIs
working draft initial definition. ...
PerformanceResourceTiming.domainLookupEnd - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.domainLookupStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.encodedBodySize - Web APIs
working draft initial definition. ...
PerformanceResourceTiming.fetchStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.initiatorType - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.nextHopProtocol - Web APIs
working draft initial definition. ...
PerformanceResourceTiming.redirectEnd - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.redirectStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.requestStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.responseEnd - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.responseStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.secureConnectionStart - Web APIs
candidate recommendation initial definition. ...
PerformanceResourceTiming.serverTiming - Web APIs
the servertiming read-only property returns an array of performanceservertiming entries containing server timing metrics. syntax resource.servertiming; specifications specification status comment server timingthe definition of 'servertiming' in that specification. working draft initial definition. ...
PerformanceResourceTiming.toJSON() - Web APIs
he closest inherited interface and with entries for each of the serializable attributes. example // get a resource performance entry var perfentries = performance.getentriesbytype("resource"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performanceentry.tojson = " + s); specifications specification status comment resource timing level 2the definition of 'tojson' in that specification. working draft ...
PerformanceResourceTiming.transferSize - Web APIs
working draft initial definition. ...
PerformanceResourceTiming.workerStart - Web APIs
working draft initial definition. ...
PerformanceResourceTiming - Web APIs
applied content-codings. performanceresourcetiming.servertimingread only an array of performanceservertiming entries containing server timing metrics. methods performanceresourcetiming.tojson() returns a domstring that is the json representation of the performanceresourcetiming object. example see the example in using the resource timing api. specifications specification status comment resource timing level 1the definition of 'performanceresourcetiming' in that specification. candidate recommendation initial definition. ...
PerformanceServerTiming.description - Web APIs
the description read-only property returns a domstring value of the server-specified metric description, or an empty string. syntax servertiming.description; specifications specification status comment server timingthe definition of 'description' in that specification. working draft initial definition. ...
PerformanceServerTiming.duration - Web APIs
the duration read-only property returns a double that contains the server-specified metric duration, or value 0.0. syntax servertiming.duration; specifications specification status comment server timingthe definition of 'duration' in that specification. working draft initial definition. ...
PerformanceServerTiming.name - Web APIs
the name read-only property returns a domstring value of the server-specified metric name. syntax servertiming.name; specifications specification status comment server timingthe definition of 'name' in that specification. working draft initial definition. ...
PerformanceServerTiming.toJSON - Web APIs
working draft initial definition. ...
PerformanceServerTiming - Web APIs
working draft initial definition. ...
PerformanceTiming.connectEnd - Web APIs
the connection establishment is started again, the last connection establisment end time is given. if a persistent connection is used, the value will be the same as performancetiming.fetchstart. a connection is considered as opened when all secure connection handshake, or socks authentication, is terminated. syntax time = performancetiming.connectend; specifications specification status comment navigation timingthe definition of 'performancetiming.connectend' in that specification. recommendation initial definition. ...
PerformanceTiming.connectStart - Web APIs
och, where the request to open a connection is sent to the network. if the transport layer reports an error and the connection establishment is started again, the last connection establisment start time is given. if a persistent connection is used, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' in that specification. recommendation initial definition. ...
PerformanceTiming.domComplete - Web APIs
recommendation initial definition. ...
PerformanceTiming.domContentLoadedEventEnd - Web APIs
interface instead. the legacy performancetiming.domcontentloadedeventend read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after all the scripts that need to be executed as soon as possible, in order or not, has been executed. syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification. recommendation initial definition. ...
PerformanceTiming.domContentLoadedEventStart - Web APIs
recommendation initial definition. ...
PerformanceTiming.domInteractive - Web APIs
ing web sites that users feels. nevertheless there are a few caveats that happens if scripts are blocking rendering and not loaded asynchronously or with custom web fonts. check if you are in one of these cases before using this property as a proxy for the user experience of a web site's speed of loading. syntax time = performancetiming.dominteractive; specifications specification status comment navigation timingthe definition of 'performancetiming.dominteractive' in that specification. recommendation initial definition. ...
PerformanceTiming.domLoading - Web APIs
instead. the legacy performancetiming.domloading read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser started its work, that is when its document.readystate changes to 'loading' and the corresponding readystatechange event is thrown. syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification. recommendation initial definition. ...
PerformanceTiming.domainLookupEnd - Web APIs
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup is finished. if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification. recommendation initial definition. ...
PerformanceTiming.domainLookupStart - Web APIs
art read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup starts. if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart. syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification. recommendation initial definition. ...
PerformanceTiming.fetchStart - Web APIs
igationtiming interface instead. 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. this moment is before the check to any application cache. syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification. recommendation initial definition. ...
PerformanceTiming.loadEventEnd - Web APIs
recommendation initial definition. ...
PerformanceTiming.loadEventStart - Web APIs
loadeventstart read-only property instead.. the legacy performancetiming.loadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event was sent for the current document. if this event has not yet been sent, it returns 0. syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification. recommendation initial definition. ...
PerformanceTiming.navigationStart - Web APIs
recommendation initial definition. ...
PerformanceTiming.redirectEnd - Web APIs
recommendation initial definition. ...
PerformanceTiming.redirectStart - Web APIs
terface instead. the legacy performancetiming.redirectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the first http redirect starts. if there is no redirect, or if one of the redirect is not of the same origin, the value returned is 0. syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification. recommendation initial definition. ...
PerformanceTiming.requestStart - Web APIs
e 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. recommendation initial definition. ...
PerformanceTiming.responseEnd - Web APIs
recommendation initial definition. ...
PerformanceTiming.responseStart - Web APIs
ormancenavigationtiming interface instead. the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource. syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification. recommendation initial definition. ...
PerformanceTiming.secureConnectionStart - Web APIs
ancenavigationtiming interface instead. the legacy performancetiming.secureconnectionstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the secure connection handshake starts. if no such connection is requested, it returns 0. syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification. recommendation initial definition. ...
PerformanceTiming.unloadEventEnd - Web APIs
nloadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event handler finishes. if there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is 0. syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification. recommendation initial definition. ...
PerformanceTiming.unloadEventStart - Web APIs
adeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event has been thrown. if there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is 0. syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification. recommendation initial definition. ...
PerformanceTiming - Web APIs
oadeventend read only when the load event handler terminated, that is when the load event is completed. if this event has not yet been sent, or is not yet completed, it returns 0. methods the performancetiming interface doesn't inherit any methods. performancetiming.tojson() returns a json object representing this performancetiming object. specifications specification status comment navigation timingthe definition of 'performancetiming' in that specification. recommendation initial definition. ...
Performance Timeline - Web APIs
entries within the observer callback. besides the performanceobserver's interface's observe() method (which is used to register the entry types to observe), the performanceobserver interface also has a disconnect() method that stops an observer from receiving further events. performance observers were added to the level 2 version of the standard and were not widely implemented. implementation status a summary of the interfaces' implementation status is provided below, including a link to more detailed information. performance interface extensions: as shown in the performance interface's browser compatibility table, most of these interfaces are broadly implemented by desktop browsers and have less support on mobile devices. performanceentry: as shown in the performanceentry interface's b...
PeriodicWave.PeriodicWave() - Web APIs
.createperiodicwave). return value a new periodicwave object instance. example var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var options = { real : real, imag : imag, disablenormalization : false } var wave = new periodicwave(ac, options); specifications specification status comment web audio apithe definition of 'periodicwave' in that specification. working draft ...
PeriodicWave - Web APIs
we get a sine wave. the coefficients of the fourier transform should be given in ascending order (i.e. (a+bi)ei,(c+di)e2i,(f+gi)e3i\left(a+bi\right)e^{i} , \left(c+di\right)e^{2i} , \left(f+gi\right)e^{3i} etc.) and can be positive or negative. a simple way of manually obtaining such coefficients (though not the best) is to use a graphing calculator. specifications specification status comment web audio apithe definition of 'periodicwave' in that specification. working draft ...
Permissions.revoke() - Web APIs
ve been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notifications and push. note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api. returns a promise that calls its fulfillment handler with a permissionstatus object indicating the result of the request. exceptions typeerror retrieving the permissiondescriptor information failed in some way, or the permission doesn't exist or is currently unsupported (e.g. midi, or push with uservisibleonly). example this function can be used by an app to request that its own geolocation api permission be revoked. function revokepermission() { navigator.perm...
PhotoCapabilities.fillLightMode - Web APIs
le fill light options of the source device. options may include auto, off, or flash. syntax const lightmodes = photocapabilities.filllightmode value an array of available fill light modes. auto the device's fill light will be used automatically in low light conditions. off no fill light will be used. flash always use the device's fill light. specifications specification status comment mediastream image capturethe definition of 'filllightmode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
PhotoCapabilities.imageHeight - Web APIs
working draft initial definition. ...
imageWidth - Web APIs
working draft initial definition. ...
PhotoCapabilities.redEyeReduction - Web APIs
ax const redeyereduction = photocapabilities.redeyereduction value one of "never", "always", or "controllable". never red-eye reduction is not available. always red-eye reduction is available in the source and it is always turned on. controllable red-eye reduction is available in the source and it is configurable via the photosettings object. specifications specification status comment mediastream image capturethe definition of 'redeyereduction' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedg...
PhotoCapabilities - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromee...
Plugin - Web APIs
Web › API › Plugin
ame read only the filename of the plugin file. plugin.name read only the name of the plugin. plugin.version read only the plugin's version number string. methods plugin.item returns the mime type of a supported content type, given the index number into a list of supported types. plugin.nameditem returns the mime type of a supported item. specifications specification status comment html living standardthe definition of 'plugin' in that specification. living standard initial definition. ...
PluginArray - Web APIs
living standard initial definition. ...
PointerEvent.getCoalescedEvents() - Web APIs
the getcoalescedevents() method of the pointerevent interface returns a sequence of all pointerevent instances that were coalesced into the dispatched pointermove event. syntax var pointerevents[] = pointerevent.getcoalescedevents() parameters none. returns a sequence of pointerevent instances. specifications specification status comment pointer events – level 3the definition of 'getcoalescedevents()' in that specification. editor's draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid ...
PointerEvent.height - Web APIs
may produce a different value. if the input hardware cannot report the contact geometry to the browser, the height defaults to 1. syntax var contactheight = pointerevent.height; return value contactheight the height of the event's contact area (in css pixels). example an example of this property is included in the pointerevent.width example. specifications specification status comment pointer events – level 2the definition of 'height' in that specification. recommendation non-stable version. pointer eventsthe definition of 'height' in that specification. obsolete initial definition. ...
PointerEvent.isPrimary - Web APIs
for this event is the primary pointer and returns false otherwise. example this example illustrates using the value of isprimary to call the appropriate processing function. target.addeventlistener('pointerdown', function(event) { if (event.isprimary) process_primary_pointer(event); else process_secondary_pointer(event); }, false); specifications specification status comment pointer events – level 2the definition of 'isprimary' in that specification. recommendation non-stable version. pointer eventsthe definition of 'isprimary' in that specification. obsolete initial definition. ...
PointerEvent.pointerId - Web APIs
pointerid with the one of the pointerdown event that was just fired. let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that specification. recommendation non-stable version. pointer eventsthe definition of 'pointerid' in that specification. obsolete initial definition. ...
PointerEvent.pointerType - Web APIs
obsolete initial definition. pointer events – level 2the definition of 'pointertype' in that specification. recommendation non-stable version. css object model (cssom) view modulethe definition of 'mouseevent' in that specification. working draft redefines mouseevent from...
PointerEvent.pressure - Web APIs
ng on the value of the event's pressure property. someelement.addeventlistener('pointerdown', function(event) { if (event.pressure == 0) { // no pressure process_no_pressure(event); } else if (event.pressure == 1) { // maximum pressure process_max_pressure(event); } else { // default process_pressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'pressure' in that specification. recommendation non-stable version. pointer eventsthe definition of 'pressure' in that specification. obsolete initial definition. ...
PointerEvent.tangentialPressure - Web APIs
alpressure property. someelement.addeventlistener('pointerdown', function(event) { if (event.tangentialpressure == 0) { // no pressure process_no_tanpressure(event); } else if (event.tangentialpressure == 1) { // maximum pressure process_max_tanpressure(event); } else { // default process_tanpressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'tangentialpressure' in that specification. recommendation ...
PointerEvent.tiltX - Web APIs
range of values is -90 to 90, inclusive, where a positive value is a tilt to the right. for devices that do not support this property, the value is 0. example this example illustrates simple accessing of the tiltx and tilty properties. someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tiltx' in that specification. recommendation non-stable version. pointer eventsthe definition of 'tiltx' in that specification. obsolete initial definition. ...
PointerEvent.tiltY - Web APIs
nge of values is -90 to 90, inclusive, where a positive value is a tilt towards the user. for devices that do not support this property, the value is 0. example this example illustrates simple accessing of the tiltx and tilty properties. someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tilty' in that specification. recommendation non-stable version. pointer eventsthe definition of 'tilty' in that specification. obsolete initial definition. ...
PointerEvent.twist - Web APIs
t twist, the value is 0. example when a pointerdown event is fired, different functions are called depending on the value of the event's twist property. someelement.addeventlistener('pointerdown', function(event) { if (event.twist == 0) { // no twist process_no_twist(event); } else { // default process_twist(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'twist' in that specification. recommendation ...
PointerEvent.width - Web APIs
h; return value contactwidth the width of the event's contact area (in css pixels). example this example illustrates using the pointerevent interface's width and height properties to calculate the contact area. target.addeventlistener("pointerdown", function(ev) { // calculate the contact area var area = ev.width * ev.height; }, false); specifications specification status comment pointer events – level 2the definition of 'width' in that specification. recommendation non-stable version. pointer eventsthe definition of 'width' in that specification. obsolete initial definition. ...
PointerEvent - Web APIs
cancel a global event handler for the pointercancel event. globaleventhandlers.onpointerout a global event handler for the pointerout event. globaleventhandlers.onpointerleave a global event handler for the pointerleave event. example examples of each property, event type, and global event handler are included in their respective reference pages. specifications specification status comment pointer events – level 3the definition of 'pointerevent' in that specification. editor's draft added the getcoalescedevents() and getpredictedevents() methods and pointerrawupdate event. pointer events – level 2the definition of 'pointerevent' in that specification. recommendation added the twist and tangentialpressure properties. pointer ...
Using Pointer Events - Web APIs
recommendation non-stable version. pointer eventsthe definition of 'pointerevent' in that specification. obsolete initial definition. ...
Pointer events - Web APIs
dd the event handlers to a specific target element (rather than the entire document or nodes higher up in the document tree). the target element (node) should be large enough to accommodate the largest contact surface area (typically a finger touch). if the target area is too small, touching it could result in firing other events for adjacent elements. specifications specification status comment pointer events – level 3 editor's draft added new apis for getcoalescedevent and getpredictedevents, new pointerrawupdate event, additional touch-action property values pan-left, pan-right, pan-up, pan-down. pointer events – level 2 recommendation adds haspointercapture method and clarifies more edge cases and dynamic scenarios. pointer e...
PopStateEvent - Web APIs
living standard initial definition ...
PositionOptions.enableHighAccuracy - Web APIs
t will do so. note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example). on the other hand, if false (the default value), the device can take the liberty to save resources by responding more quickly and/or using less power. syntax positionoptions.enablehighaccuracy = booleanvalue specifications specification status comment geolocation apithe definition of 'positionoptions.enablehighaccuracy' in that specification. recommendation initial definition ...
PositionOptions.maximumAge - Web APIs
dicating the maximum age in milliseconds of a possible cached position that is acceptable to return. if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. if set to infinity the device must return a cached position regardless of its age. syntax positionoptions.maximumage = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.maximumage' in that specification. recommendation initial definition ...
PositionOptions.timeout - Web APIs
recommendation initial definition ...
PositionOptions - Web APIs
context is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. if set to infinity the device must return a cached position regardless of its age. default: 0. specifications specification status comment geolocation apithe definition of 'positionoptions' in that specification. recommendation initial definition ...
ProcessingInstruction - Web APIs
living standard xml specification ...
ProgressEvent() - Web APIs
t the part of the content itself, not headers and other overhead. it defaults to 0. total optional is an unsigned long long representing the total amount of work that the underlying process is in the progress of performing. when downloading a resource using http, this only represent the content itself, not headers and other overhead. it defaults to 0. specifications specification status comment xmlhttprequestthe definition of 'progressevent()' in that specification. living standard ...
ProgressEvent.lengthComputable - Web APIs
living standard ...
ProgressEvent.loaded - Web APIs
read-only property is an integer representing the amount of work already performed by the underlying process. the ratio of work done can be calculated with the property and progressevent.total. when downloading a resource using http, this only represent the part of the content itself, not headers and other overhead. syntax value = progressevent.loaded specifications specification status comment xmlhttprequestthe definition of 'progressevent.loaded' in that specification. living standard ...
ProgressEvent.total - Web APIs
living standard ...
ProgressEvent - Web APIs
source using http, this only represent the content itself, not headers and other overhead. methods also inherits methods from its parent event. progressevent.initprogressevent() initializes a progressevent created using the deprecated document.createevent("progressevent") method. 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 st...
PromiseRejectionEvent() - Web APIs
s on fire". the reason could just as easily be a number, or even an object with detailed information including the home address, how serious the fire is, and the phone number of an emergency contact who should be notified. let myrejectionevent = new promiserejectionevent("unhandledrejection", { promise : mypromise, reason : "my house is on fire" }); specifications specification status comment html living standardthe definition of 'the promiserejectionevent interface' in that specification. living standard initial definition. ...
PromiseRejectionEvent.promise - Web APIs
default() is called to indicate that the promise has now been handled. window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification. living standard initial definition. ...
PromiseRejectionEvent.reason - Web APIs
syntax reason = promiserejectionevent.reason value a value or object which provides information you can use to understand why the promise was rejected. this could be anything from an error code to an object with text, links, and whatever else you might wish to include. examples window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent.reason' in that specification. living standard initial definition. ...
PromiseRejectionEvent - Web APIs
handled by the promise's rejection handling code. unhandledrejection fired when a javascript promise is rejected but there is no rejection handler to deal with the rejection. examples this simple example catches unhandled promise rejections and logs them for debugging purposes. window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent' in that specification. living standard initial definition. ...
Proximity Events - Web APIs
nt.near property is true if the object is close or false if the object is far. example window.addeventlistener('userproximity', function(event) { if (event.near) { // let's power off the screen navigator.mozpower.screenenabled = false; } else { // otherwise, let's power on the screen navigator.mozpower.screenenabled = true; } }); specifications specification status comment proximity sensorthe definition of 'proximity events' in that specification. working draft initial specification ...
PublicKeyCredential.getClientExtensionResults() - Web APIs
recommendation initial definition. ...
PublicKeyCredential.id - Web APIs
recommendation specified in the context of publickeycredential. overrides the getter defined in credential. credential management level 1the definition of 'id' in that specification. working draft initial definition. ...
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
recommendation initial definition. ...
PublicKeyCredential.rawId - Web APIs
recommendation initial definition. ...
PublicKeyCredential.response - Web APIs
recommendation initial definition. ...
PublicKeyCredential - Web APIs
tials.get(). var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredential interface' in that specification. recommendation initial definition. ...
PublicKeyCredentialCreationOptions.attestation - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.challenge - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.extensions - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.rp - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.timeout - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions.user - Web APIs
recommendation initial definition. ...
PublicKeyCredentialCreationOptions - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions.challenge - Web APIs
n. examples var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification. recommendation initial definition. ...
PublicKeyCredentialRequestOptions.extensions - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions.rpId - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions.timeout - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions.userVerification - Web APIs
recommendation initial definition. ...
PublicKeyCredentialRequestOptions - Web APIs
recommendation initial definition. ...
PushEvent.data - Web APIs
Web › API › PushEvent › data
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorerope...
PushEvent - Web APIs
Web › API › PushEvent
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explor...
PushManager.getSubscription() - Web APIs
working draft initial definition. ...
PushManager.permissionState() - Web APIs
key: a public key your push server will use to send messages to client apps via a push server. this value is part of a signing key pair generated by your application server and usable with elliptic curve digital signature (ecdsa) over the p-256 curve. returns a promise that resolves to a domstring with a value of 'prompt', 'denied', or 'granted'. specifications specification status comment push apithe definition of 'permissionstate()' in that specification. working draft initial definition. ...
PushManager.register() - Web APIs
url. note: if you do not need the url any more, please use pushmanager.unregister() to clean up after yourself. example var req = navigator.push.register(); req.onsuccess = function(e) { var endpoint = req.result; debug("new endpoint: " + endpoint ); } req.onerror = function(e) { debug("error getting a new endpoint: " + json.stringify(e)); } specification specification status comment push api working draft defines the pushmanager interface. ...
PushManager.registrations() - Web APIs
...
PushManager.subscribe() - Web APIs
working draft initial definition. ...
PushManager.supportedContentEncodings - Web APIs
working draft initial definition. ...
PushManager.unregister() - Web APIs
of the unregistered endpoint. version undefined when unregister.onsuccess is called. example var req = navigator.push.unregister(pushendpoint); req.onsuccess = function(e) { var endpoint = req.result; debug("unregistered endpoint: " + endpoint ); } req.onerror = function(e) { debug("error unregistering the endpoint: " + json.stringify(e)); } specification specification status comment push api working draft defines the pushmanager interface. ...
PushMessageData.arrayBuffer() - Web APIs
arraybuffer()method of the pushmessagedata interface extracts push message data as an arraybuffer object. syntax var myarraybuffer = pushevent.data.arraybuffer(); parameters none. returns an arraybuffer. examples self.addeventlistener('push', function(event) { var buffer = event.data.arraybuffer(); // do something with your array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ex...
PushMessageData.blob() - Web APIs
the blob()method of the pushmessagedata interface extracts push message data as a blob object. syntax var myblob = pushevent.data.blob(); parameters none. returns a blob. examples self.addeventlistener('push', function(event) { var blob = event.data.blob(); // do something with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfiref...
PushMessageData.json() - Web APIs
t. syntax var mydata = pushevent.data.json(); parameters none. returns the result of parsing push event data as json. this could be anything that can be represented by json — an object, an array, a string, a number... examples self.addeventlistener('push', function(event) { var mydata = event.data.json(); // do something with your data }); specifications specification status comment push apithe definition of 'json()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorero...
PushMessageData.text() - Web APIs
the text()method of the pushmessagedata interface extracts push message data as a plain text string. syntax var mytext = pushevent.data.text(); parameters none. returns a usvstring. examples self.addeventlistener('push', function(event) { var textobj = event.data.text(); // do something with your text }); specifications specification status comment push apithe definition of 'text()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome fo...
PushMessageData - Web APIs
cts the data as a plain text string. examples self.addeventlistener('push', function(event) { var obj = event.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { firenotification(obj, event); port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); specifications specification status comment push apithe definition of 'pushmessagedata' in that specification. working draft initial definition. ...
PushRegistrationManager - Web APIs
returns an interface to register or unregister a push registration, get an active registration, or check the permission status of the registration. this interface has been superceded by pushmanager. methods pushregistrationmanager.register() returns a promise that resolves to a pushregistration with details of a new registration. pushregistrationmanager.unregister() returns a promise that resolves to a pushregistration with details of the unregistered registration. pushregistrationmanager.getregistration() returns a promise that resolves the pushregistration associated with the current webapp. pushregistrationmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp. browser compatibility the compatibility table on this page is...
PushSubscription.endpoint - Web APIs
working draft initial definition. ...
PushSubscription.expirationTime - Web APIs
the expirationtime read-only property of the pushsubscription interface returns a domhighrestimestamp of the subscription expiration time associated with the push subscription, if there is one, or null otherwise. syntax var expirationtime = pushsubscription.expirationtime value a domhighrestimestamp. specifications specification status comment push apithe definition of 'expirationtime' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for andr...
PushSubscription.options - Web APIs
scription will only be used for messages whose effect is made visible to the user. applicationserverkey: a public key your push server will use to send messages to client apps via a push server. this value is part of a signing key pair generated by your application server, and usable with elliptic curve digital signature (ecdsa), over the p-256 curve. specifications specification status comment push apithe definition of 'options' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorer...
PushSubscription.subscriptionId - Web APIs
the endpoint read-only property of the pushsubscription interface returns a domstring containing the subscription id associated with the push subscription. syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsubscriptionidchrome full support 42edge ...
PushSubscription.toJSON() - Web APIs
son() parameters none. returns a json object. it currently only contains the subscription endpoint, as an endpoint member. example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { var mysubscription = subscription.tojson(); // do something with subscription details }) }); specifications specification status comment push apithe definition of 'pushsubscription: tojson' in that specification. working draft ...
PushSubscription.unsubscribe() - Web APIs
the current subscription is successfully unsubscribed. example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'unsubscribe()' in that specification. working draft initial definition. ...
PushSubscription - Web APIs
he current subscription is successfully unregistered. example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'pushsubscription' in that specification. working draft initial definition ...
RTCAnswerOptions - Web APIs
ties this dictionary inherits properties from the rtcofferansweroptions dictionary, on which it's based. note: at this time, rtcansweroptions does not have any additional properties defined beyond those included in rtcofferansweroptions. however, this is likely to change in the future, so the type has been defined in preparation for that eventuality. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcansweroptions' in that specification. candidate recommendation initial definition. ...
RTCCertificate - Web APIs
the interface of the the webrtc api provides an object represents a certificate that an rtcpeerconnection uses to authenticate. properties rtccertificate.expires read only returns the expiration date of the certificate. specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition. ...
RTCConfiguration.bundlePolicy - Web APIs
on's bundlepolicy to max-compat to maximize compatibility while attempting to optimize network use. it also specifies stun:stun.example.com as the stun server for ice to use during negotiation. let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], bundlepolicy: "max-compat" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.bundlepolicy' in that specification. candidate recommendation initial definition. ...
RTCConfiguration.certificates - Web APIs
ou don't provide certificates, new ones are generated automatically. one obvious benefit to providing your own is identity key continuity—if you use the same certificate for subsequent calls, the remote peer can tell you're the same caller. this also avoids the cost of generating new keys. <<<--- add link to information about identity --->>> examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.certificates' in that specification. candidate recommendation initial definition. ...
RTCConfiguration.iceServers - Web APIs
candidate recommendation initial definition. ...
RTCConfiguration.iceTransportPolicy - Web APIs
callers from learning the callee's ip addresses until the callee has agreed to receive the call. examples in this example, a new connection is configured to only accept relay candidates. let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], icetransportpolicy: "relay" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtccandidate.icetransportpolicy' in that specification. candidate recommendation initial definition. ...
RTCConfiguration - Web APIs
candidate recommendation initial definition. ...
RTCDTMFSender.insertDTMF() - Web APIs
(that is, if you specify a lower value, 30 ms will be used instead); the default is 70 ms. return value undefined exceptions invalidstateerror the dtmf tones couldn't be sent because the track has been stopped, or is in a read-only or inactive state. invalidcharactererror one or more of the characters in tones is not valid dtmf. example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.insertdtmf()' in that specification. candidate recommendation ...
RTCDTMFSender.ontonechange - Web APIs
eives as input a single parameter of type rtcdtmftonechangeevent, which describes the change. syntax rtcdtmfsender.ontonechange = tonechangehandlerfunction; value a function which is called when a tonechange event is sent to the rtcdtmfsender, indicating that a dtmf tone has either started playing, or if all tones have finished playing. example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification. candidate recommendation ...
RTCDTMFSender.toneBuffer - Web APIs
es, you might use a string such as "*,1,5555". 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. settting the tone buffer to an empty string ("") cancels any pending dtmf codes. example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.tonebuffer' in that specification. candidate recommendation ...
RTCDTMFSender: tonechange event - Web APIs
candidate recommendation definition for the webrtc api ...
RTCDTMFSender - Web APIs
gning an event listener to the oneventname property of this interface. tonechange the tonechange event is sent to the rtcdtmfsender instance's event handler to indicate that a tone has either started or stopped playing. also available using the ontonechange event handler property. example see the article using dtmf with webrtc for a full example. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender' in that specification. candidate recommendation ...
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad. the comma (",") this character instructs the dialing process to pause for two seconds before sending the next character in the buffer. all other characters are unrecognized and will cause insertdtmf() to throw an invalidcharactererror exception. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent()' in that specification. candidate recommendation initial definition. ...
RTCDTMFToneChangeEvent.tone - Web APIs
establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>". dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent.tone' in that specification. candidate recommendation initial specification. ...
RTCDTMFToneChangeEvent - Web APIs
tone to a display box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "send" button, allowing the next dmtf string to be entered. dtmfsender.addeventlistener("change", function(event) { if (event.tone !== "") { dialstringbox.innertext += event.tone; } else { senddtmfbutton.disabled = false; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent' in that specification. candidate recommendation initial definition. ...
RTCDataChannel.binaryType - Web APIs
s a string representing the received data as a list of hexadecimal byte values. var dc = peerconnection.createdatachannel("binary"); dc.binarytype = "arraybuffer"; dc.onmessage = function(event) { let bytearray = new uint8array(event.data); let hexstring = ""; bytearray.foreach(function(byte) { hexstring += byte.tostring(16) + " "; }); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.binarytype' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.bufferedAmount - Web APIs
anges the contents of a block with the id "buffersize" to a string indicating the number of bytes currently buffered on an rtcdatachannel. var dc = peerconnection.createdatachannel("file transfer"); /* ... */ function showbufferedamount(channel) { let el = document.getelementbyid("buffersize"); el.innerhtml = channel.bufferedamount + " bytes"; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamount' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
ountlow event is established by setting the rtcdatachannel.onbufferedamountlow property to a function which should send more data into the buffer by calling send(). var dc = peerconnection.createdatachannel("file transfer"); dc.bufferedamountlowthreshold = 65535; dc.onbufferedamountlow = function() { /* use send() to queue more data to be sent */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamountlowthreshold' in that specification. candidate recommendation initial specification. ...
RTCDataChannel: bufferedamountlow event - Web APIs
en a listener is created for bufferedamountlow to refill the incoming data buffer any time its contents fall below 65536 bytes. you can also set up a listener for bufferedamountlow using its event handler property, onbufferedamountlow: pc.onbufferedamountlow = ev => { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'bufferedamountlow' in that specification. candidate recommendation ...
RTCDataChannel.close() - Web APIs
candidate recommendation initial specification. ...
RTCDataChannel: close event - Web APIs
its "send" button, and to enable the button used to start a call (while disabling the one that ends a call). you can also use the onclose event handler property to set a handler for close events: dc.onclose = ev => { messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'close' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.id - Web APIs
Web › API › RTCDataChannel › id
ally, known implementations of webrtc use the same id on both peers. a unique id makes it easier for your code to do its own out-of-band data channel-related signaling. this can be also useful for logging and debugging purposes. example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); console.log("channel id: " + dc.id); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.id' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.label - Web APIs
e this sample creates a data channel on an rtcpeerconnection, then, some time later, sets the content of a ui element to display the channel's name. var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); /* ... */ document.getelementbyid("channel-name").innerhtml = "<span class='channelname'>" + dc.label + "</span>"; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.label' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.maxPacketLifeTime - Web APIs
essage before giving up. syntax var lifetime = adatachannel.maxpacketlifetime; value the number of milliseconds over which the browser may continue to attempt to transmit the message until it either succeeds or gives up. if not set when rtcpeerconnection.createdatachannel() was called to create the data channel, this value is null. example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.maxRetransmits - Web APIs
cpeerconnection.createdatachannel(), using the maxretransmits field in the specified options. syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called. the default is null. example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxretransmits' in that specification. candidate recommendation initial specification. ...
RTCDataChannel: message event - Web APIs
raph to the end of the document's body. you can also use an rtcdatachannel object's onmessage event handler property to set the event handler: dc.onmessage = ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'the <code>message</code> event' in that specification. candidate recommendation ...
RTCDataChannel.negotiated - Web APIs
se. example the code snippet below checks the value of negotiated; if it's true, a function called shutdownremotechannel() is called with the channel's id; presumably this would be implemented to transmit a shutdown signal to the remote peer prior to terminating the connection. if (datachannel.negotiated) { shutdownremotechannel(datachannel.id); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.negotiated' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.onbufferedamountlow - Web APIs
up to 64kb of a file represented by an object source and calling rtcdatachannel.send() to queue up the retrieved data for sending on the data channel. pc = new rtcpeerconnection(); dc = pc.createdatachannel("sendfile"); /* ... */ dc.onbufferedamountlow = function() { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onbufferedamountlow' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.onclose - Web APIs
candidate recommendation initial specification. ...
RTCDataChannel.onclosing - Web APIs
to "closing" state. for example, after rtcdatachannel.close() was called but the underlying data transport might not have been closed yet. syntax rtcdatachannel.onclosing = function; value a function which the browser will call to handle the closing event. the function receives as its sole input parameter the event itself, as an object of type event. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclosing' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.onerror - Web APIs
candidate recommendation initial specification. ...
RTCDataChannel.onmessage - Web APIs
ssage's contents displayed inside it. the new elements are then attached to the end of the document. let pc = new rtcpeerconnection(); let dc = pc.createdatachannel(); dc.onmessage = function(event) { var el = document.createelement("p"); var txtnode = document.createtextnode(event.data); el.appendchild(txtnode); receivebox.appendchild(el); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onmessage' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.onopen - Web APIs
m for being used to send messages over the data channel. let dc = mypeerconnection.createdatachannel("message channel"); dc.onopen = function(event) { let messagebox = document.getelementbyid("messagebox"); let sendbutton = document.getelementbyid("sendbutton"); messagebox.disabled = false; messagebox.focus(); sendbutton.disabled = false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onopen' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.ordered - Web APIs
object passed as rtcpeerconnection.createdatachannel()'s options parameter. syntax var ordered = adatachannel.ordered; a boolean value which is true if in-order delivery is guaranteed and is otherwise false. example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); if (!dc.ordered) { // handle unordered messaging } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.ordered' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.protocol - Web APIs
empty string (""). example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel", { protocol: "json" }); function handlechannelmessage(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification. candidate recommendation initial specification. ...
RTCDataChannel.send() - Web APIs
d; it accepts an object as input and sends to the remote peer, over the rtcdatachannel, a json string with the specified object and a time stamp. var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("backchannel"); function sendmessage(msg) { let obj = { "message": msg, "timestamp": new date() } dc.send(json.stringify(obj)); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.send()' in that specification. candidate recommendation initial specification. ...
RTCDataChannel - Web APIs
ng sctp). older browsers may only specify "dtls/sctp". example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); dc.onmessage = function (event) { console.log("received: " + event.data); }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel' in that specification. candidate recommendation initial specification. ...
RTCDataChannelEvent() - Web APIs
"cancelable", optional, inherited from eventinit. indicates if the event can be canceled or not. default is false. value a new rtcdatachannelevent configured as specified. example in this example, a new datachannel event is created. dc is a data channel which already exists. var event = new rtcdatachannelevent("datachannel", {"channel": dc}); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification. candidate recommendation initial specification. ...
RTCDataChannelEvent.channel - Web APIs
ndler shown below takes the channel from the event object and saves it locally for use by the code handling data traffic. pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent.channel' in that specification. candidate recommendation initial specification. ...
RTCDataChannelEvent - Web APIs
n to the other peer. pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } see a simple rtcdatachannel sample for another, more complete, example of how to use data channels. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification. candidate recommendation initial definition. ...
RTCDtlsTransport.iceTransport - Web APIs
the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport. syntax var icetransport = rtcdtlstransport.icetransport; value the underlying rtcicetransport instance. examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.icetransport' in that specification. candidate recommendation initial definition. ...
RTCError - Web APIs
Web › API › RTCError
. any other error is treated as terminal, causing a terminatemyconnection() function to be called. the above example uses addeventlistener() to add the handler for error events. you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerror' in that specification. candidate recommendation initial definition. ...
RTCErrorEvent.error - Web APIs
. any other error is treated as terminal, causing a terminatemyconnection() function to be called. the above example uses addeventlistener() to add the handler for error events. you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent.error' in that specification. candidate recommendation initial definition. ...
RTCErrorEvent - Web APIs
vent. description there are other data types used for error events in webrtc, as needed for errors with special information sharing requirements. the most common of these is probably rtcpeerconnectioniceerrorevent, used by the icecandidateerror event, which signals an error that has occurred while gathering ice candidates during connection negotiation. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.RTCIceCandidate() - Web APIs
parsing of the candidate string is performed using the candidate-attribute grammar from the webrtc specification. exceptions typeerror the specified rtcicecandidateinit has values of null in both the sdpmid and sdpmlineindex properties. usage notes this constructor does not do complete validation of the specified candidateinfo object or string. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate()' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.address - Web APIs
4997325 1 udp 2043278322 192.168.0.56 44323 typ host the fifth field, "192.168.0.56" is the ip address in this candidate's a-line string. example this code snippet uses the value of address to implement an ip address based ban feature. if (ipbanlist.includes(candidate.address)) { rejectcandidate(candidate); } else { acceptcandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate: address' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.candidate - Web APIs
candidates for webrtc to consider using for the connection being established. this example could be simplified somewhat; you may more often see the code look something like this, taking advantage of more advanced ecmascript 2016 features: let handlenewicecandidate = candidatesdp => mypeerconnection.addicecandidate(new rtcicecandidate(candidatesdp)); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.candidate' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.component - Web APIs
nt would be "rtcp". example this code snippet examines a candidate's component type and dispatches the candidate to different handlers depending on the value. if (candidate.component == "rtp") { handlertpcandidate(candidate); } else if (candidate.component == "rtcp") { handlertcpcandidate(candidate); } else { handleunknowncandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.component' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.foundation - Web APIs
997325 1 udp 2043278322 192.168.0.56 44323 typ host the field "4234997325" is the foundation. example this code snippet uses the foundation of two candidates to determine if they're actually the same candidate. if (candidate1.foundation == candidate2.foundation) { /* the two candidates are the same, even if they're on different transports */ } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.foundation' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.port - Web APIs
udp 2043278322 192.168.0.56 44323 typ host the port number is found in the sixth field, which is "44323". in this case, the value of port will be 44323. example this code snippet fetches the ip address and port number of the candidate, storing them into an object for future use. var candidateloc = { address: candidate.ip, port: candidate.port } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.port' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.priority - Web APIs
a previously-seen candidate, remembers the candidate for later use. var bestcandidate = { candidate: "", sdpmid: null, sdpmlineindex: null, priority: 0 }; function handlecandidate(candidatestring) { var candidate = new rtcicecandidate(candidatestring); if (candidate.priority > bestcandidate.priority) { bestcandidate = candidate; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.priority' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.protocol - Web APIs
col type, indicating that the candidate would use the udp transport protocol. example this code snippet examines the value of protocol to decide if it should look at the value of tcptype to see if it's a simultaneous-open (s-o) candidate. if (candidate.protocol == "tcp") { if (candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.protocol' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.relatedAddress - Web APIs
candidate recommendation initial definition. ...
RTCIceCandidate.relatedPort - Web APIs
candidate recommendation initial definition. ...
RTCIceCandidate.sdpMLineIndex - Web APIs
ning a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available. note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception. example ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmlineindex' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.sdpMid - Web APIs
andidate.sdpmid; value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate. note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception. example ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmid' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.tcpType - Web APIs
ransport will try to open a connection simultaneously with its peer. tcptype is null for udp candidates. example in this example, the candidate's protocol and tcptype are used to adjust the user interface for simultaneous-open tcp candidates. if (candidate.protocol == "tcp" && candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tcptype' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate. toJSON() - Web APIs
re set to the corresponding values in the rtcicecandidate object. you can then get a stringified version of the object by calling stringify() on the returned object. see the example below. example this simple example obtains a json string representing an rtcicecandidate found in the variable candidate. var jsonstring = candidate.tojson().stringify(); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tojson()' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.type - Web APIs
erconnection.addicecandidate() to throw an operationerror exception. example in this example, the candidate's type is used to present a modified user interface for host candidates (those where the ip refers directly to the remote peer, rather than an intermediary). if (candidate.type == "host") { showhostcontrols(); } else { hidehostcontrols(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.type' in that specification. candidate recommendation initial definition. ...
RTCIceCandidate.usernameFragment - Web APIs
candidate recommendation initial definition. ...
RTCIceCandidate - Web APIs
usernamefragment, even across ice restarts. methods tojson() given the rtcicecandidate's current configuration, tojson() returns a domstring containing a json representation of that configuration in the form of a rtcicecandidateinit object. examples for examples, see the article signaling and video calling, which demonstrates the entire process. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate' in that specification. candidate recommendation initial definition. ...
RTCIceCandidateInit.candidate - Web APIs
icecandidate() constructor accepts the value of candidate as its only input, in place of the rtcicecandidateinit dictionary. that usage would change the above sample to look like this: function goticecandidatemessage(msg) { var icecandidate = new rtcicecandidate(msg.candidate); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.candidate' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateInit.sdpMLineIndex - Web APIs
ning a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available. note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception. example ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmlineindex' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateInit.sdpMid - Web APIs
pmid property. value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate. note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception. example ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmid' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateInit.usernameFragment - Web APIs
are left up to the browser implementation to decide. for example, a browser might choose to always use a 24-character ufrag in which bit 4 of each character is randomly selected between 0 and 1. another example: it might take a user-defined string and append three 8-bit random bytes to the end. or perhaps every character is entirely random. example ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.usernamefragment' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateInit - Web APIs
usernamefragment optional a domstring containing a string which uniquely identifies the remote peer. this string is generated by webrtc at the beginning of the session, and at least 24 bits worth of the string contain random data. the string may be up to 256 characters long. this property has no default value and is not present unless set explicitly. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit' in that specification. candidate recommendation initial definition. ...
RTCIceCandidatePair.local - Web APIs
getsenders()[0].transport.transport.getselectedcandidatepair(); var localcandidate = candidatepair.local; the rtcicetransport is found by getting the list of rtcrtpsender objects for the rtcpeerconnection pc. in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.local' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePair.remote - Web APIs
tsenders()[0].transport.transport.getselectedcandidatepair(); var remotecandidate = candidatepair.remote; the rtcicetransport is found by getting the list of rtcrtpsender objects for the rtcpeerconnection pc. in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.remote' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePair - Web APIs
candidate recommendation initial specification. ...
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
stream using the connection described by this candidate pair. the returned value doesn't take into account overhead introduced by underlying protocols, including ip, udp, or tcp. note: the returned value is computed using a method similar—but not identical—to the transport independent application specific maximum (tias) described in rfc 3890: 6.2. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableincomingbitrate' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
stream using the connection described by this candidate pair. the returned value doesn't take into account overhead introduced by underlying protocols, including ip, udp, or tcp. note: the returned value is computed using a method similar—but not identical—to the transport independent application specific maximum (tias) described in rfc 3890: 6.2. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableoutgoingbitrate' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.bytesReceived - Web APIs
number of bytes sent so far on the described connection. syntax received = rtcicecandidatepairstats.bytesreceived; value an integer value indicating the total number of bytes received so far on the connection described by this candidate pair. only data bytes are counted; overhead such as padding, headers, and the like are not included in this count. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytesreceived' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.bytesSent - Web APIs
orts the number of bytes received so far on the described connection. syntax sent = rtcicecandidatepairstats.bytessent; value an integer value indicating the total number of bytes sent so far on the connection described by this candidate pair. only data bytes are counted; overhead such as padding, headers, and the like are not included in this count. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytessent' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
breakertriggercount; value an integer value indicating the number of times the circuit-breaker has been triggered for the 5-tuple used by this connection. a 5-tuple defining a tcp connection is made up of the following data: the source ip address. the source port number. the destination ip address. the destination port number. network protocol. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.circuitbreakertriggercount' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
es the time at which the stun binding that allows the two peers described by this rtcicecandidatepair to communicate will expire (or the time at which the binding did expire, if the time has passed). this property's value is undefined if there have been no stun binding responses yet on the candidate pair. this is only possible if responsesreceived is 0. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentexpiredtimestamp' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
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. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
tepairstats object offers statistics. 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. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.currentroundtriptime' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
ed 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. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
connection described by the candidate pair last received a packet. stun packets are not included. syntax lastpacketreceivedtimestamp = rtcicecandidatepairstats.lastpacketreceivedtimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last received a packet, stun packets excluded. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketreceivedtimestamp' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
e time at which the connection described by the candidate pair last sent a packet, not including stun packets. syntax lastpacketsenttimestamp = rtcicecandidatepairstats.lastpacketsenttimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last sent a packet, stun packets excluded. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketsenttimestamp' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
d 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. candidate recommendation initial specification. ...
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
p indicates the time at which the last stun response was received on the described candidate pair. syntax lastresponsetimestamp = rtcicecandidatepairstats.lastresponsetimestamp; value a domhighrestimestamp object indicating the timestamp at which the most recent stun response was received on the connection defined by the described pair of candidates. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastresponsetimestamp' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.localCandidateId - Web APIs
idateid = rtcicecandidatepairstats.localcandidateid; value a domstring giving a unique identifier for the local rtcicecandidate for the connection described by this rtcicecandidatepairstats object. this candidate is the source of one of the two rtcicecandidatestats objects that were used to compute the contents of this rtcicecandidatepairstats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.localcandidateid' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.nominated - Web APIs
te pair are nominated at the same time, the one whose priority is higher will be selected for use. once a candidate pair has been nominated and the two peers have each reconfigured themselves to use the specified configuration, the ice negotiation process can potentially end (or it can continue, to allow the connection to adapt to changing conditions). specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.nominated' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.packetsReceived - Web APIs
the pair of candidates. the number of packets sent to date on the connection can be obtained using packetssent. syntax packetsreceived = rtcicecandidatepairstats.packetsreceived; value an integer value indicating the total number of packets, of any kind, which have been received on the connection described by the two candidates comprising this pair. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetsreceived' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.packetsSent - Web APIs
by the pair of candidates. the number of packets received to date on the connection can be obtained using packetsreceived. syntax packetssent = rtcicecandidatepairstats.packetssent; value an integer value indicating the total number of packets, of any kind, which have been sent on the connection described by the two candidates comprising this pair. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetssent' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.priority - Web APIs
s to be selelcted for use. note: this property was removed from the specification as its value cannot be guaranteed to be accurately represented in a javascript number. you can calculcate its value using the algorithm described in rfc 5245, section 5.7.2 if you need this information and can accept the risk that the result may not be entirely accurate. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.priority' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
the rtcicecandidatestats used to compute the statistics for this pair of candidates. syntax remotecandidateid = rtcicecandidatepairstats.remotecandidateid; value a domstring uniquely identifies the remote ice candidate—that is, the candidate describing a configuration for the remote peer—which is represented by the remote end of these statistics. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.remotecandidateid' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.requestsReceived - Web APIs
fference between requests made to check connectivity and requests made to check consent, the returned figure includes both. note: the reported number of requests includes retransmissions. if a request had to be repeated due to network issues, it will be counted multiple times here. this differs from requestssent, which does not include retransmisions. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestsreceived' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.requestsSent - Web APIs
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. if a request had to be repeated due to network issues, it will be counted multiple times here. this differs from requestsreceived, which does include retransmisions. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestssent' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.responsesReceived - Web APIs
nectivity check responses that have been received on the connection described by this pair of candidates. syntax responsesreceived = rtcicecandidatepairstats.responsesreceived; value an integer value which specifies the number of stun connectivity request responses that have been received on the connection described by this pair of candidates so far. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsesreceived' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.responsesSent - Web APIs
ibed by this pair of candidates. syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the number of times a repsonse has been sent to a stun connectivity check request. note: since it isn't possible to tell the difference between connectivity check requests and consent requests, this value includes both. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsessent' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
mitted 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). see rfc 7982 for further details. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionsreceived' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
ransmitted 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). see rfc 7982 for further details. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionssent' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.state - Web APIs
on the check list moves from the waiting state to the in-progress state, and its check begins. if the check fails for any reason, the pair moves into its final state, failed. if the check succeeds, the pair ends up in the succeeded state. the ice check list state for any given pair of ice candidates can be found in the corresponding the state property. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.state' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
requests and receiving their responses, for all such requests made so far on the connection described by this candidate pair. you can calculate the average round-trip time (rtt) by dividing this value by the value of the responsesreceived property: rtt = rtcicecandidatepairstats.totalroundtriptime / rtcicecandidatepairstats.responsesreceived; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.totalroundtriptime' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats.transportId - Web APIs
ts object. syntax transportid = rtcicecandidatepairstats.transportid; value a domstring which uniquely identifies the rtcicetransport object from which the transport-related data was obtained for the statistics contained in this rtcicecandidatepairstats object. the transport-related statistics come from the rtctransportstats dictionary's properties. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.transportid' in that specification. candidate recommendation initial specification. ...
RTCIceCandidatePairStats - Web APIs
equestssent; log("average time between ice connectivity checks: " + elapsed + " ms."); } the code begins by looking at rtcstats to see if its type is candidate-pair. if it is, then we know that rtcstats is in fact an rtcicecandidatepairstats object. if so, we compute the average time elapsed between stun connectivity checks and log that information. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.address - Web APIs
in response to the query, the user agent selects one, which is then used for the duration of ice processing. usage notes the address property was previously known as ip, and only permitted ipv4 and ipv6 addresses to be used. the addition of support for fully-qualified domain names to be used for the address brought about the renaming of the property. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.address' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.candidateType - Web APIs
nymously. prflx the candidate is a peer reflexive candidate; the ip is an intermediary address assigned by the stun server to represent the candidate's peer anonymously. relay the candidate is a relay candidate, obtained from a turn server. the relay candidate's ip address is an address the turn server uses to forward the media between the two peers. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.candidatetype' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.deleted - Web APIs
candidate recommendation initial specification. ...
RTCIceCandidateStats.port - Web APIs
the rtcicecandidatestats dictionary's port property specifies the network port used by the candidate. syntax candidateport = rtcicecandidatestats.port; value an integer value indicating the network port used by the rtcicecandidate described by the rtcicecandidatestats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.priority - Web APIs
candidate recommendation initial specification. ...
RTCIceCandidateStats.protocol - Web APIs
andidate, if selected, would use tcp as the transport protocol for its data. the tcptype property provides additional information about the kind of tcp candidate represented by the object. udp the candidate will use the udp transport protocol for its data. this is the preferred protocol for media interactions because of its better performance profile. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.protocol' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.relayProtocol - Web APIs
ransport control protocol) is being used to communicate with the turn server. tls tls (transport layer security) is being used to communicate with the turn server. udp udp (user datagram protocol) is being used to communicate with the turn server. note: this property is only present on rtcicecandidatestats objects that represent local candidates. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.relayprotocol' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.transportId - Web APIs
which information about this candidate was taken. syntax transportid = rtcicecandidatestats.transportid; value a domstring whose value uniquely identifies the transport from which any transport-related information accumulated in the rtcicecandidatestats was taken. this can be used to compare candidates that would use the same transport, for example. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.transportid' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats.url - Web APIs
ly available for local candidates. syntax url = rtcicecandidatestats.url; value a domstring specifying the url of the ice server from which the candidate described by the rtcicecandidatestats was obtained. this is the same url that would be received in the icecandidate event's url property. note: this property does not exist for remote candidates. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.url' in that specification. candidate recommendation initial specification. ...
RTCIceCandidateStats - Web APIs
candidate recommendation initial specification. ...
RTCIceCandidateType - Web APIs
ay candidate, obtained from a turn server. the relay candidate's ip address is an address the turn server uses to forward the media between the two peers. usage notes the rtcicecandidatetype enumeration is used by the type property of rtcicecandidate objects, as well as when reporting statistics on candidates using rtcicecandidatestats.candidatetype. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatetype' in that specification. candidate recommendation initial definition. ...
RTCIceComponent - Web APIs
ds to the component id field in the candidate a-line with the value 1. "rtcp" identifies an ice transport being used for rtcp, which is defined in rfc 3550, section 6. this value of rtcicecomponent corresponds to the component id 2. usage notes the rtcicecomponent type is used by the component property of rtcicecandidate and rtcicetransport objects. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecomponent' in that specification. candidate recommendation initial definition. ...
RTCIceCredentialType - Web APIs
iceserver requires a username and password to authenticate prior to using the described ice server. obsolete values the following values are no longer part of the webrtc specification, but were in the past. token authenticating with the ice server requires the use of an oauth 2.0 token as defined in rfc 7635. this value has been renamed to oauth. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecredentialtype' in that specification. candidate recommendation initial specification. ...
RTCIceGathererState - Web APIs
ndidates. "gathering" the transport is in the process of gathering candidates. "complete" the transport has finished gathering ice candidates and has sent the end-of-candidates indicator to the remote device. the transport won't gather any further candidates unless an ice restart occurs, at which point the gathering process starts over from scratch. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicegathererstate' in that specification. candidate recommendation initial definition. ...
RTCIceParameters.password - Web APIs
the rtciceparameters dictionary's password property specifies the ice password that, in tandem with the usernamefragment, uniquely identifies an ice session for its entire duration. syntax password = rtciceparameters.password; value a domstring containing the password that corresponds to the transport's usernamefragment string specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.password' in that specification. candidate recommendation initial specification. ...
RTCIceParameters.usernameFragment - Web APIs
syntax ufrag = rtciceparameters.usernamefragment; value a domstring containing the username fragment that, in tandem with the password, uniquely identify the ice session being used by the transport. the string may be up to 256 characters long. see rtcicecandidate.usernamefragment to learn more about username fragments and their role in a connection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.usernamefragment' in that specification. candidate recommendation initial specification. ...
RTCIceParameters - Web APIs
ld, ufrag. password a domstring specifying the session's password string. usage notes the username fragment and password uniquely identify the remote peer for the duration of the ice session, and are used to both ensure security and to avoid crosstalk across multiple ongoing ice sessions. see rtcicecandidate.usernamefragment for further information. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters' in that specification. candidate recommendation initial specification. ...
RTCIceProtocol - Web APIs
rovides additional information about the kind of tcp candidate represented by the object. udp the candidate will use the udp transport protocol for its data. this is the preferred protocol for media interactions because of its better performance profile. usage notes the rtciceprotocol type is used by the protocol property of rtcicecandidate objects. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceprotocol' in that specification. candidate recommendation initial definition. ...
RTCIceRole - Web APIs
connection's ice agent is serving as the controlling agent or the controlled agent, as indicated by rtcicetransport.role. you can learn more about ice roles in choosing a candidate pair in webrtc connectivity. values "controlling" the rtcicetransport object is serving as the controlling agent. "controlled" the transport is the controlled agent. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification. candidate recommendation initial definition. ...
RTCIceServer.credential - Web APIs
server at turnserver.example.org to negotiate connections. logging into the turn server uses the username "webrtc" and the creative password "turnpassword". mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification. candidate recommendation initial specification. ...
RTCIceServer.credentialType - Web APIs
gotiate connections. logging into the turn server will use the username "webrtc" and the creative password "turnpassword". mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword", credentialtype: "password" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification. candidate recommendation initial specification. ...
RTCIceServers.urls - Web APIs
Web › API › RTCIceServer › urls
"turn:turnserver.example.org"], username: "webrtc", credential: "turnpassword" }, { urls: "stun: stunserver.example.org" } ] }); two ice servers are provided. one is a turn server which can be accessed both over turn and turns. the other is a stun server. any number of servers could be listed of any combination of types. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.urls' in that specification. candidate recommendation initial specification. ...
RTCIceServer.username - Web APIs
er at turnserver.example.org to negotiate connections. logging into the turn server will use the username "webrtc" and the creative password "turnpassword". mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.username' in that specification. candidate recommendation initial specification. ...
RTCIceTcpCandidateType - Web APIs
nection but won't receive inoming connection requests. "passive" the transport will receive incoming connection requests but won't try to open an outbound connection. "so" the transport will try to open a connection simultaneously with its peer. usage notes the rtcicetcpcandidatetype type is used by the tcptype property of rtcicecandidate objects. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetcpcandidatetype' in that specification. candidate recommendation initial definition. ...
RTCIceTransport.component - Web APIs
multiplexed with the rtp control protocol (rtcp). rtp is defined in rfc 3550. an rtcicecomponent of this value corresponds to the component id field in the candidate a-line with the value 1. "rtcp" identifies an ice transport being used for rtcp, which is defined in rfc 3550, section 6. this value of rtcicecomponent corresponds to the component id 2. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.component' in that specification. candidate recommendation initial definition. ...
RTCIceTransport.gatheringState - Web APIs
ndidates. "gathering" the transport is in the process of gathering candidates. "complete" the transport has finished gathering ice candidates and has sent the end-of-candidates indicator to the remote device. the transport won't gather any further candidates unless an ice restart occurs, at which point the gathering process starts over from scratch. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.gatheringstate' in that specification. candidate recommendation initial definition. ...
RTCIceTransport.getLocalCandidates() - Web APIs
list from the rtcicetransport for the first rtcrtpsender on the rtcpeerconnection, then outputs to the console all of the candidates in the list. var localcandidates = pc.getsenders()[0].transport.transport.getlocalcandidates(); localcandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getlocalcandidates()' in that specification. candidate recommendation initial definition. ...
RTCIceTransport.getLocalParameters() - Web APIs
client calls rtcpeerconnection.setlocaldescription(). syntax parameters = rtcicetransport.getlocalparameters(); parameters none. return value an rtciceparameters object indicating the usernamefragment and password which uniquely identify the local peer for the duration of the ice session. returns null if the parameters have not yet been received. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getlocalparameters' in that specification. candidate recommendation initial specification. ...
RTCIceTransport.getRemoteCandidates() - Web APIs
ist from the rtcicetransport for the first rtcrtpsender on the rtcpeerconnection, then outputs to the console all of the candidates in the list. var remotecandidates = pc.getsenders()[0].transport.transport.getremotecandidates(); remotecandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getremotecandidates()' in that specification. candidate recommendation initial definition. ...
RTCIceTransport.getRemoteParameters() - Web APIs
lient calls rtcpeerconnection.setremotedescription(). syntax parameters = rtcicetransport.getremoteparameters(); parameters none. return value an rtciceparameters object indicating the usernamefragment and password which uniquely identify the remote peer for the duration of the ice session. returns null if the parameters haven't been received yet. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getremoteparameters' in that specification. candidate recommendation initial specification. ...
RTCIceTransport.getSelectedCandidatePair() - Web APIs
candidate recommendation initial specification. ...
RTCIceTransport.ongatheringstatechange - Web APIs
see if the state has changed to "complete", indicating that all ice candidates from both the local and remote peers have been received and processed. var icetransport = pc.getsenders()[0].transport.transport; icetransport.ongatheringstatechange = function(event) { if (icetransport.gatheringstate == "complete") { allcandidatesreceived(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.ongatheringstatechange' in that specification. candidate recommendation initial specification. ...
RTCIceTransport.onselectedcandidatepairchange - Web APIs
candidate recommendation initial specification. ...
RTCIceTransport.onstatechange - Web APIs
echange event that looks to see if the transport has entered the "failed" state, which indicates that the connection has failed with no chance of being automatically restored. var icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = function(event) { if (icetransport.state == "failed") { handlefailure(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onstatechange' in that specification. candidate recommendation initial specification. ...
RTCIceTransport.role - Web APIs
erole = rtcicetransport.role; value a domstring specifying whether the rtcicetransport represents the controlling agent or the controlled agent. the value must be one of those found in the enumerated type rtcicerole: "controlling" the rtcicetransport object is serving as the controlling agent. "controlled" the transport is the controlled agent. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.role' in that specification. candidate recommendation initial definition. ...
RTCIceTransport: selectedcandidatepairchange event - Web APIs
candidate recommendation ...
RTCIceTransport.state - Web APIs
es" notification from the remote peer, and has finished checking pairs of candidates, without successfully finding a pair that is both valid and for which consent can be obtained. this is a terminal state, indicating that the connection cannot be achieved or maintained. "closed" the transport has shut down and is no longer responding to stun requests. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransportstate' in that specification. candidate recommendation initial definition. ...
RTCIceTransport: statechange event - Web APIs
candidate recommendation ...
RTCIceTransport - Web APIs
sing getselectedcandidatepair(). also available using the onselectedcandidatepairchange event handler property. statechange sent to the rtcicetransport instance when the value of the state property has changed, indicating that the ice gathering process has changed state. also available through the onstatechange event handler property. examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport' in that specification. candidate recommendation initial definition. ...
RTCIceTransportState - Web APIs
candidate recommendation initial definition. ...
RTCIdentityAssertion - Web APIs
ebrtc api represents the identity of the a remote peer of the current connection. if no peer has yet been set and verified this interface returns null. once set it can't be changed. properties rtcidentityassertion.idp indicates the provider of the identity assertion. rtcidentityassertion.name indicates the name of the identity assertion provider. specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
e first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.averagertcpinterval' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.bytesReceived - Web APIs
ue indicating the total number of bytes received so far on this rtp stream, not including header and padding bytes. this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtpstreamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.bytesreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
yload has been discarded. this can happen if all the packets covered by the fec packet have already been received or recovered using another fec packet, or if the fec packet arrived outside the recovery window and the lost rtp packets have already been skipped during playback as a result. the value of fecpacketsreceived includes these discarded packets. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsdiscarded' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
ets have already been received successfully or have already been reconstructed using a previously-received fec packet. this may also happen if the fec packet arrives outside the window of time in which the client will attempt to use it. if you wish to know how many of the received packets were discarded, you can examine the value of fecpacketsdiscarded. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.firCount - Web APIs
his tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fircount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.framesDecoded - Web APIs
of frames which have been decoded successfully for this media source. syntax var framesdecoded = rtcinboundrtpstreamstats.framesdecoded; value an integer value indicating the total number of video frames which have been decoded for this stream so far. this represents the number of frames that would have been displayed assuming no frames were skipped. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.framesdecoded' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
rived from this source. syntax var lastpackettimestamp = rtcinboundrtpstreamstats.lastpacketreceivedtimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream. note: this value differs from the timestamp, which represents the time at which the statistics object was created. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.lastpacketreceivedtimestamp' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.nackCount - Web APIs
edgement, also called "generic nack") packet tells the sender that one or more of the rtp packets it sent were lost in transport. syntax var nackcount = rtcinboundrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.nackcount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
h time a packet is repeated, the value of packetsduplicated is incremented, even if the same packet is received more than twice. you can get a more accurate tally of how many packets have been lost on the stream by adding packetsduplicated to packetslost. the resulting value will be positive, although it will not match the count as computed in rfc 3660. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsduplicated' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
er of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session. syntax var packetsfaileddecryption = rtcinboundrtpstreamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsfaileddecryption' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
tpstreamstats.perdscppacketsreceived; value a record comprised of string/value pairs. each key is the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.perdscppacketsreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.pliCount - Web APIs
ize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.qpSum - Web APIs
urning 0 if the object doesn't describe an rtp stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.qpsum' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.receiverId - Web APIs
verstats or rtcvideoreceiverstats object representing the rtcrtpreceiver receiving the stream. syntax var receiverstatsid = rtcinboundrtpstreamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the streamed media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.receiverid' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.remoteId - Web APIs
object representing the remote peer's rtcrtpsender which is sending the media to the local peer. syntax var remotestatsid = rtcinboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteoutboundrtpstreamstats object that represents the remote peer's rtcrtpsender for the synchronization source represented by this stats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.remoteid' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.sliCount - Web APIs
t; value an unsigned integer indicating the number of sli packets this receiver sent to the remote sender due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. note: this value is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.slicount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.trackId - Web APIs
hmentstats object representing the mediastreamtrack which is receiving the incoming media. syntax var trackstatsid = rtcinboundrtpstreamstats.trackid; value a domstring containing the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the track which is receiving the media from this rtp session. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats - Web APIs
der) video macroblocks have been lost or corrupted. available only for video streams. trackid a string which identifies the statistics object representing the receiving track; this object is one of two types: rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats. this id is stable across multiple calls to getstats(). examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcinboundrtpstreamstats' in that specification. candidate recommendation initial specification. ...
RTCNetworkType - Web APIs
specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer. for example, if the networktype is wifi but the user is connected using a cellular hotspot, the connection will be bottlenecked by the underlying cellular network (and any other networks between the two peers). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcnetworktype' in that specification. candidate recommendation initial definition. ...
RTCOfferAnswerOptions - Web APIs
ffer() uses rtcofferoptions and createanswer() uses rtcansweroptions. properties voiceactivitydetection optional for configurations of systems and codecs that are able to detect when the user is speaking and toggle muting on and off automatically, this option enables and disables that behavior. the default value is true, enabling this functionality specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferansweroptions' in that specification. candidate recommendation initial definition. ...
RTCOfferOptions.iceRestart - Web APIs
ludes the restartice() method; if it does, we call that to request an ice restart. otherwise, we call back to the older technique: we manually create a new offer with icerestart set to true, then that offer is set as the new local description for the connection. after that, the offer is sent to the server by calling a custom function sendoffertoserver(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions.icerestart' in that specification. candidate recommendation initial definition. ...
RTCOfferOptions - Web APIs
candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
e first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.averagertcpinterval' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.firCount - Web APIs
his tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.fircount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
nary indicates the total number of frames that have been encoded by this rtcrtpsender for this media source. syntax var framesencoded = rtcoutboundrtpstreamstats.framesencoded; value an integer value indicating the total number of video frames that this sender has encoded so far for this stream. note: this property is only valid for video streams. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.framesencoded' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
et to the remote receiver. syntax var lastpackettimestamp = rtcoutboundrtpstreamstats.lastpacketsenttimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream. note: this value differs from the timestamp, which represents the time at which the statistics object was created. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.lastpacketsenttimestamp' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.nackCount - Web APIs
also called "generic nack") packet is used by the rtcrtpreceiver to inform the sender that one or more rtp packets it sent were lost in transport. syntax var nackcount = rtcoutboundrtpstreamstats.nackcount; value an integer value indicating how many times the sender received a nack packet from the receiver, indicating the loss of one or more packets. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.nackcount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
undrtpstreamstats.perdscppacketssent; value a record comprised of string/value pairs. each key is the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.perdscppacketssent' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.pliCount - Web APIs
packet is to allow the rtcrtpsender for which this rtcoutboundrtpstreamstats object provides statistics to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression or lowering resolution, although the mechanisms available to reduce the bit rate of the stream vary from codec to codec. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.qpSum - Web APIs
urning 0 if the object doesn't describe an rtp stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qpsum' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
found in qualitylimitationdurations. syntax var qualitylimitationreason = rtcoutboundrtpstreamstats.qualitylimitationreason; value a map whose keys are domstrings whose values come from the rtcqualitylimitationreason enumerated type, and whose values are the duration of the media, in seconds, whose quality was reduced for that reason. examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qualitylimitationreason' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.remoteId - Web APIs
g the remote peer's rtcrtpreceiver which is sending the media to the local peer for this ssrc. syntax var remotestatsid = rtcoutboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteinboundrtpstreamstats object that represents the remote peer's rtcrtpreceiver for the synchronization source represented by this stats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.remoteid' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.sliCount - Web APIs
unt; value an unsigned integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. note: this value is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.slicount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.trackId - Web APIs
entstats object representing the mediastreamtrack which is being sent on this stream. syntax var trackstatsid = rtcoutboundrtpstreamstats.trackid; value a domstring containing the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the track which is the source of the media being sent on this stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats - Web APIs
ncodetime a floating-point value indicating the total number of seconds that have been spent encoding the frames encoded so far by this rtcrtpsender. trackid the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object containing the current track attachment to the rtcrtpsender responsible for this stream. examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcoutboundrtpstreamstats' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection() - Web APIs
the rtcp mux policy to use when gathering ice candidates, in order to support non-multiplexed rtcp. the value must be one of those from the rtcrtcpmuxpolicy enum. the default is "require". return value a newly-created rtcpeerconnection object, configured as described by configuration, if specified; otherwise, configured to appropriate basic defaults. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.addIceCandidate() - Web APIs
the remote peer will be a special candidate denoting end-of-candidates. out of interest, end-of-candidates may be manually indicated as follows: pc.addicecandidate({candidate:''}); however, in most cases you won't need to look for this explicitly, since the events driving the rtcpeerconnection will deal with it for you, sending the appropriate events. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addicecandidate()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.addStream() - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection.addTrack() - Web APIs
<video> element which is referenced by the variable previewelement. the final step is to begin sending the local video across the peer connection to the caller. this is done by adding each track in the stream by iterating over the list returned by mediastream.gettracks() and passing them to addtrack() along with the stream which they're a component of. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtrack()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.addTransceiver() - Web APIs
eters. streams optional a list of mediastream objects to add to the transceiver'srtcrtpreceiver; when the remote peer's rtcpeerconnection's track event occurs, these are the streams that will be specified by that event. exceptions typeerror a string was specified as trackorkind which is not valid. the string must be either "audio" or "video". specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtransceiver()' in that specification. candidate recommendation ...
RTCPeerConnection.canTrickleIceCandidates - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection.close() - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection.connectionState - Web APIs
. "closed" the rtcpeerconnection is closed. this value was in the rtcsignalingstate enum (and therefore found by reading the value of the signalingstate) property until the may 13, 2016 draft of the specification. example var pc = new rtcpeerconnection(configuration); /* ... */ var connectionstate = pc.connectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.connectionstate' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.createAnswer() - Web APIs
e that succeeds, the answer is sent to the signaling server using whatever protocol you see fit. promise.catch() is used to trap and handle errors. see handling the invitation in signaling and video calling to see the complete code, in context, from which this snippet is derived; that will help you understand the signaling process and how answers work. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createanswer()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.createDataChannel() - Web APIs
candidate recommendation initial definition. ...
RTCPeerConnection.createOffer() - Web APIs
rom the webrtc specification, so it doesn't matter how the offer is sent as long as both the caller and potential receiver are using the same one. use promise.catch() to trap and handle errors. see signaling and video calling for the complete example from which this snippet is derived; this will help you to understand how the signaling code here works. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createoffer()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.currentLocalDescription - Web APIs
ooks at the currentlocaldescription and displays an alert containing the rtcsessiondescription object's type and sdp fields. var pc = new rtcpeerconnection(); … var sd = pc.currentlocaldescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentlocaldescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.currentRemoteDescription - Web APIs
ks at the currentremotedescription and displays an alert containing the rtcsessiondescription object's type and sdp fields. var pc = new rtcpeerconnection(); … var sd = pc.currentremotedescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentremotedescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection: datachannel event - Web APIs
nnel linking the remote peer to the local one. this same code can also instead use the rtcpeerconnection interface's ondatachannel event handler property, like this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'datachannel' in that specification. candidate recommendation basic definition. ...
RTCPeerConnection.generateCertificate() - Web APIs
erface itself, not an instance thereof. return value a reference to an rtccertificate object. example rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { var pc = new rtcpeerconnection({certificates: [cert]}); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'generatecertificate()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.getConfiguration() - Web APIs
is zero. if it's determined that there are no certificates in place, rtcpeerconnection.generatecertificate() is called to create a new certificate; we provide a fulfillment handler which adds a new array containing the one newly-created certificate to the current configuration and passes it to setconfiguration() to add the certificate to the connection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getconfiguration()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.getDefaultIceServers() - Web APIs
iguration of the rtcpeerconnection. ...
RTCPeerConnection.getIdentityAssertion() - Web APIs
n dealing with the rtcpeerconnection: this is automatically done; an explicit call only allows to anticipate the need. syntax pc.getidentityassertion(); there is neither parameter nor return value for this method. example var pc = new peerconnection(); pc.getidentityassertion(); // not mandatory, but we know that we will need it in the future. specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.getidentityassertion()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.getReceivers() - Web APIs
= rtcpeerconnection.getreceivers(); return value an array of rtcrtpreceiver objects, one for each track on the connection. the array is empty if there are no rtp receivers on the connection. the order of the returned rtcrtpreceiver instances is not defined by the specification, and may change from one call to getreceivers() to the next. example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getreceivers()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.getSenders() - Web APIs
ion, pc, and a boolean, muting. the function gets the list of the peer connection's senders and iterates over every sender, setting the corresponding media track's enabled to the inverse of the specified muting. function setmuting(pc, muting) { let senderlist = pc.getsenders(); senderlist.foreach(sender) { sender.track.enabled = !muting; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getsenders()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.getStats() - Web APIs
stats objects on the returned rtcstatsreport. a section is created for each report with a header and all of the statistics below, with the type, id, and timestamp handled specially to place them at the top of the list. once the html for the report is generated, it is injected into the element whose class is "stats-box" by setting its innerhtml property. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getstats()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.getTransceivers() - Web APIs
cts representing the transceivers handling sending and receiving all media on the rtcpeerconnection. the list is in the order in which the transceivers were added to the connection. example the following snippet of code stops all transceivers associated with an rtcpeerconnection. pc.gettransceivers().foreach(transceiver => { transceiver.stop(); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.gettransceivers()' in that specification. candidate recommendation ...
RTCPeerConnection.iceConnectionState - Web APIs
as spontaneously on less reliable networks, or during temporary disconnections. when the problem resolves, the connection may return to the "connected" state. "closed" the ice agent for this rtcpeerconnection has shut down and is no longer handling requests. example var pc = new rtcpeerconnection(); var state = pc.iceconnectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.iceconnectionstate' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection: icegatheringstatechange event - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection: icecandidate event - Web APIs
candidate recommendation ...
RTCPeerConnection: icecandidateerror event - Web APIs
candidate recommendation initial definition. ...
RTCPeerConnection: identityresult event - Web APIs
has been deprecated and removed from the specification. instead, the peeridentity property returns a promise that resolves with an identity or rejects if an error occurs or if unable to validate the identity. bubbles no cancelable no interface rtcidentityevent event handler property onidentityresult specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'identityresult' in that specification. candidate recommendation ...
RTCPeerConnection: idpassertionerror event - Web APIs
.onidpassertionerror property. bubbles no cancelable no interface rtcidentityerrorevent event handler property onidpassertionerror warning: this event is no longer used; instead, you can detect an assertion error by detecting when the promise returned by rtcpeerconnection.peeridentity is rejected. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpassertionerror' in that specification. candidate recommendation ...
RTCPeerConnection: idpvalidationerror event - Web APIs
nidpvalidationerror property. bubbles no cancelable no interface rtcidentityerrorevent event handler property onidpvalidationerror warning: this event is no longer used; instead, you can detect a validation error by detecting when the promise returned by rtcpeerconnection.peeridentity is rejected. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification. candidate recommendation ...
RTCPeerConnection.localDescription - Web APIs
this example looks at the localdescription and displays an alert containing the rtcsessiondescription object's type and sdp fields. var pc = new rtcpeerconnection(); … var sd = pc.localdescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.localdescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection: negotiationneeded event - Web APIs
candidate recommendation ...
RTCPeerConnection.onconnectionstatechange - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection.ondatachannel - Web APIs
n you provide which receives as input a single parameter: an rtcdatachannelevent which provides in its channel property the rtcdatachannel which has been created. example pc.ondatachannel = function(ev) { console.log('data channel is created!'); ev.channel.onopen = function() { console.log('data channel is open and ready to be used.'); }; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ondatachannel' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.onicecandidate - Web APIs
lling, sets up a handler for icecandidate events to send the candidates to the remote peer. pc.onicecandidate = function(event) { if (event.candidate) { // send the candidate to the remote peer } else { // all ice candidates have been sent } } notice that the end of negotiation is detected here when the event's candidate property is null. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidate' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.onicecandidateerror - Web APIs
/ stun errors are in the range 300-699. see rfc 5389, section 15.6 // for a list of codes. turn adds a few more error codes; see // rfc 5766, section 15 for details. } else if (event.errorcode >= 700 && event.errorcode <= 799) { // server could not be reached; a specific error number is // provided but these are not yet specified. } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidateerror' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.oniceconnectionstatechange - Web APIs
candidate recommendation initial specification. ...
RTCPeerConnection.onnegotiationneeded - Web APIs
ote peer through the signaling server }); }) .catch(reporterror); } first, it creates the offer by calling createoffer(). when that succeeds, the offer is passed into setlocaldescription() to set the local description for the connection. once that's succeeded in turn, the offer can be sent to the signaling server for delivery to the remote peer. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onnegotiationneeded' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.onsignalingstatechange - Web APIs
echange that looks for the "have-local-pranswer" signaling state—indicating that a remote offer has been received and a local description of type "pranswer" has been applied in response. pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have-local-pranswer") { // setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.ontrack - Web APIs
led = false; }; the first line of our ontrack event handler takes the first stream in the incoming track and sets the srcobject attribute to that. this connects that stream of video to the element so that it begins to be presented to the user. the second line of code simply enables a "hang up" button, which the user can use to disconnect from the call. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ontrack' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.peerIdentity - Web APIs
and the promise is rejected, this logs the error to the console and returns null to the caller. let pc = new rtcpeerconnection(); /* ... */ async function getidentityassertion(pc) { try { const identity = await pc.peeridentity; return identity; } catch(err) { console.log("error identifying remote peer: ", err); return null; } } specifications specification status comment identity for webrtc candidate recommendation initial specification. ...
RTCPeerConnection: peeridentity event - Web APIs
ved from the specification and are no longer available. instead of using this event to detect when an identity is available, simply wait for the promise returned by rtcpeerconnection.peeridentity to be resolved. once resolved, its value is the new identity. examples for the correct way to detect a new peer identity, see rtcpeerconnection.peeridentity. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'peeridentity' in that specification. candidate recommendation ...
RTCPeerConnection.pendingLocalDescription - Web APIs
configuration. otherwise, this returns null. example this example looks at the pendinglocaldescription to determine whether or not there's a description change being processed. var pc = new rtcpeerconnection(); … var sd = pc.pendinglocaldescription; if (sd) { // there's a description change underway! } else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendinglocaldescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.pendingRemoteDescription - Web APIs
onfiguration. otherwise, this returns null. example this example looks at the pendingremotedescription to determine whether or not there's a description change being processed. var pc = new rtcpeerconnection(); … var sd = pc.pendingremotedescription; if (sd) { // there's a description change underway! } else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendingremotedescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.remoteDescription - Web APIs
example looks at the remotedescription and displays an alert containing the rtcsessiondescription object's type and sdp fields. var pc = new rtcpeerconnection(); … var sd = pc.remotedescription; if (sd) { alert("remote session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no remote session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.remotedescription' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.removeTrack() - Web APIs
en the user clicks the button. var pc, sender; navigator.getusermedia({video: true}, function(stream) { pc = new rtcpeerconnection(); var track = stream.getvideotracks()[0]; sender = pc.addtrack(track, stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.removetrack()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.restartIce() - Web APIs
ransition 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. however, because you have called restartice(), your call to createoffer() which occurs in the handler for negotiationneeded will trigger an ice restart rather than just a regular renegotiation. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.restartice()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.sctp - Web APIs
ned. example var pc = new rtcpeerconnection(); var channel = pc.createdatachannel("mydata"); channel.onopen = function(event) { channel.send('sending a message'); } channel.onmessage = function(event) { console.log(event.data); } // determine the largest message size that can be sent var sctp = pc.sctp; var maxmessagesize = sctp.maxmessagesize; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.sctp' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.setConfiguration() - Web APIs
fig, specifying the new ice server and its credentials. this is then passed into setconfiguration(). ice negotiation is restarted by calling createoffer(), specifying true as the value of the icerestart option. from there, we handle the process as usual, by setting the local description to the returned offer and then sending that offer to the other peer. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'setconfiguration()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection.setIdentityProvider() - Web APIs
tocol optional is a domstring representing the protocol used to communicate with the idp. it defaults to "default" and is used to determine the url where the idp is listening. username optional is a domstring representing the username associated with the idp. example var pc = new peerconnection(); pc.setidentityassertion("developer.mozilla.org"); specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.setidentityprovider()' in that specification. candidate recommendation ...
RTCPeerConnection.setLocalDescription() - Web APIs
({ description: pc.localdescription }); } catch(err) { reporterror(err); } } this begins by creating an offer by calling createoffer(); when that succeeds, we call setlocaldescription(). we can then send the newly-created offer along to the other peer using the signaling server, which here is done by calling a function called signalremotepeer(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setlocaldescription()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.setRemoteDescription() - Web APIs
ent's webrtc layer what configuration the caller has proposed using. when our promise fulfillment handler is called, indicating that this has been done, we create a stream, add it to the connection, then create an sdp answer and call setlocaldescription() to set that as the configuration at our end of the call before forwarding that answer to the caller. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setremotedescription()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection.signalingState - Web APIs
o the rtcpeerconnectionstate enum in the may 13, 2016 draft of the specification, as it reflects the state of the rtcpeerconnection, not the signaling connection. you now detect a closed connection by checking for connectionstate to be "closed" instead. example var pc = new rtcpeerconnection(configuration); var state = pc.signalingstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.signalingstate' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection: track event - Web APIs
; the event handler assigns the new track's first stream to an existing <video> element, identified using the variable videoelement. you can also assign the event handler function to the ontrack property, rather than use addeventlistener(). pc.ontrack = e => { videoelement.srcobject = e.streams[0]; hangupbutton.disabled = false; return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. candidate recommendation initial specification. ...
RTCPeerConnectionIceErrorEvent.address - Web APIs
ry to open the connection, then calls a function to display those as well as the event's errortext property's contents. pc.addeventlistener("icecandidateerror", (event) => { let networkinfo = `[local interface: ${event.address}:${event.port}`; let iceserverinfo = `[ice server: ${event.url}`; showmessage(errortext, iceserverinfo, networkinfo); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent.address' in that specification. candidate recommendation initial definition. ...
RTCPeerConnectionIceErrorEvent - Web APIs
lace, using the ip address given in address. null if the connection hasn't been established (that is, if address is null). url read only a domstring indicating the url of the stun or turn server with which the error occurred. methods rtcpeerconnectioniceerrorevent has no methods other than any provided by the parent interface, event. examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent' in that specification. candidate recommendation initial definition. ...
RTCPeerConnectionIceEvent() - Web APIs
is false): inherited from eventinit(), this boolean option indicates whether or not the event must bubble. "cancelable" (optional, default is false, inherited from eventinit(), this boolean indicates whether or not the event can be canceled. return value a newly-created rtcpeerconnectioniceevent, configured as specified in the provided options. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent()' in that specification. candidate recommendation initial definition. ...
RTCPeerConnectionIceEvent.candidate - Web APIs
ate; value an rtcicecandidate object representing the ice candidate that has been received, or null to indicate that there are no further candidates for this negotiation session. example pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent.candidate' in that specification. candidate recommendation initial specification. ...
RTCPeerConnectionIceEvent - Web APIs
tcicecandidate it refers to. methods a rtcpeerconnectioniceevent being an event, this event also implements these properties. there is no specific rtcdatachannelevent method. examples pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection: idpvalidationerror event - Web APIs
candidate recommendation initial definition. ...
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
by the local peer. if this property is present, it comes from the rtcp sender report (sr) block, which reflects the clock on the remote peer at the time the message was sent. keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.remotetimestamp' in that specification. candidate recommendation initial definition. ...
RTCRemoteOutboundRtpStreamStats - Web APIs
locks that this ssrc has sent. usage notes the rtcremoteoutboundrtpstreamstats object's remotetimestamp proeprty provides statistics based on the received data's ntp timestamp taken from an rtcp sender report (sr) block. be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses). specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats' in that specification. candidate recommendation initial definition. ...
RTCRtcpParameters - Web APIs
6) is in effect. if false, compund rtcp is in use, as found in rfc 3550. this property cannot be changed once initialized. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpsender or rtcrtpreceiver. function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtcpparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpCapabilities - Web APIs
tx (retransmission) this component is responsible for retransmission of data; it's media type should be video/rtx. there will only be one entry for rtx, and it will not have an sdpfmtpline property. don't be surprised to see these show up ijn the list; be prepared to ignore them if you're only interested in the actual codecs used for the media itself. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcapabilities' in that specification. candidate recommendation ...
RTCRtpCodecCapability - Web APIs
rtcrtpcodeccapabilities describes the basic parameters for a single codec supported by the user's device. an array of objects of this type is returned in the codecs property of the rtcrtpcapabilities object returned in response to a call to either of the static functions rtcrtpsender.getcapabilities() or rtcrtpreceiver.getcapabilities(). examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcodeccapability' in that specification. candidate recommendation ...
RTCRtpContributingSource.audioLevel - Web APIs
onsource, the audio level is converted to this form from the values defined in the specifications corresponding to each type of source. audiolevel may be absent from rtcrtpcontributingsource objects, which indicates that no volume level was provided by the source; however, it is required and always available on all rtcrtpsynchronizationsource objects. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'audiolevel' in that specification. candidate recommendation initial definition. ...
RTCRtpContributingSource.rtpTimestamp - Web APIs
ned. syntax let rtptimestamp = rtcrtpcontributingsource.rtptimestamp value an integer value specifiying a source-generated timestamp indicating the time at which the media in this packet, scheduled for play out at the time indicated by timestamp, was initially sampled or generated. this value may be useful for sequencing and synchronization purposes. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtptimestamp' in that specification. candidate recommendation initial definition. ...
RTCRtpContributingSource.source - Web APIs
nchronizationsource, which is based on the former. syntax var sourceid = rtcrtpcontributingsource.source value an unsigned, 32-bit integer value which uniquely identifies the source of rtp packets described by this rtcrtpcontributingsource (in which case the value is a csrc identifier) or rtcrtpsynchronizationsource (the value is an ssrc identifier). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'source' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull req...
RTCRtpContributingSource.timestamp - Web APIs
of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the most recent time of playout of an rtp packet from the source. syntax var domhighrestimestamp = rtcrtpcontributingsource.timestamp value a domhighrestimestamp which indicates the time at which the most recent rtp packet from the corresponding source was played out. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'timestamp' in that specification. candidate recommendation initial definition. ...
RTCRtpContributingSource - Web APIs
ed time value which can be used to help with sequencing and synchronization. source optional a 32-bit unsigned integer value specifying the csrc identifier of the contributing source. timestamp optional a domhighrestimestamp indicating the most recent time at which a frame originating from this source was delivered to the receiver's mediastreamtrack specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcontributingsource' in that specification. candidate recommendation initial definition. ...
RTCRtpEncodingParameters.maxBitrate - Web APIs
nterface can support the specified bandwidth, in which case the actual bandwidth will be lower. this value is computed using the standard transport independent application specific maximum (tias) bandwidth as defined by rfc 3890, section 6.2.2; this is the maximum bandwidth needed without considering protocol overheads from ip, tcp or udp, and so forth. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.maxbitrate' in that specification. candidate recommendation initial definition. ...
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
ically, resulting in a video 25% the original size. a value less than 1.0 would cause the video to get larger rather than smaller, which is not the intent of this property. therefore, specifying a value less than 1.0 is not permitted and will cause a rangeerror exception to be thrown by rtcpeerconnection.addtransceiver() or rtcrtpsender.setparameters(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.scaleresolutiondownby' in that specification. candidate recommendation initial definition. ...
RTCRtpParameters - Web APIs
he configuration parameters used for rtcp on the sender or receiver. this parameter cannot be changed once initially set. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpsender or rtcrtpreceiver. function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiveParameters - Web APIs
currently has no properties of its own; it exists for future expansion. it inherits all of the properties of its parent, rtcrtpparameters. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpreceiver. function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.getCapabilities() static function - Web APIs
probable support, attempting to receive h.264 video might still fail even after getting a positive response from this function. function canreceiveh264() { let capabilities = rtcrtpreceiver.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getcapabilities()' in that specification. candidate recommendation ...
RTCRtpReceiver.getContributingSources() - Web APIs
tifier received by the current rtcrtpreceiver in the last ten seconds. syntax var rtcrtpcontributingsources = rtcrtpreceiver.getcontributingsources() parameters none. return value an array of rtcrtpcontributingsource instances. each instance describes one of the contributing sources that provided data to the incoming stream in the past ten seconds. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getcontributingsources()' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.getParameters() - Web APIs
.getparameters(); parameters none. return value an rtcrtpreceiveparameters object indicating the current configuration of the receiver. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpreceiver. function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getparameters()' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.getStats() - Web APIs
coming in through the rtcrtpreceiver, as well as any of their dependencies. example this simple example obtains the statistics for an rtcrtpreceiver and updates an element's innertext to display the number of packets lost. receiver.getstats().then(function(stats) { document.getelementbyid("lostpackets").innertext = stats.packetslost; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getstats()' in that specification. candidate recommendation initial specification. ...
RTCRtpReceiver.getSynchronizationSources() - Web APIs
e incoming stream in the past ten seconds. as you'll see in the documentarion for rtcrtpsynchronizationsource, it inherits the properties of rtcrtpcontributingsource, including timestamp, source, and audiolevel. the synchronization source objects add a voiceactivityflag property, which indicates if the last rtp packet received contained voice activity. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getsynchronizationsources()' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.track - Web APIs
candidate recommendation initial definition. ...
RTCRtpReceiver.transport - Web APIs
nsport has been established. note that when bundling is in effect—that is, when the rtcpeerconnection was created with an rtcconfiguration object whose bundlepolicy is max-compat or max-bundle—multiple receivers may be sharing the same transport; in this case, all of them are using the same connection to transmit and/or receive rtp and rtcp packets. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.transport' in that specification. candidate recommendation ...
RTCRtpReceiver - Web APIs
es() returns an array including one rtcrtpsynchronizationsource instance for each unique ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds. static methods rtcrtpreceiver.getcapabilities() returns the most optimistic view of the capabilities of the system for receiving media of the given kind. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver' in that specification. candidate recommendation initial definition. ...
RTCRtpSendParameters - Web APIs
priority a string from the rtcprioritytype enumerated type which indicates the encoding's priority. the default value is low. transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpSender.dtmf - Web APIs
Web › API › RTCRtpSender › dtmf
candidate recommendation ...
RTCRtpSender.getCapabilities() static function - Web APIs
actually only indicates probable support, h.264 support might still fail even after getting a positive response from this function. function cansendh264() { let capabilities = rtcrtpsender.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getcapabilities()' in that specification. candidate recommendation ...
RTCRtpSender.getParameters() - Web APIs
candidate recommendation initial definition. ...
RTCRtpSender.getStats() - Web APIs
statistics for any dependencies those streams have. 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. sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getstats()' in that specification. candidate recommendation initial specification. ...
RTCRtpSender.replaceTrack() - Web APIs
candidate recommendation ...
RTCRtpSender.setParameters() - Web APIs
ed for scaleresolutiondownby is less than 1.0, which would result in scaling up rather than down, which is not allowed; or one or more of the specified encodings' maxframerate values is less than 0.0. in addition, if a webrtc error occurs while configuring or accessing the media, an rtcerror is thrown with its errordetail set to hardware-encoder-error. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setparameters()' in that specification. candidate recommendation initial definition. ...
RTCRtpSender.setStreams() - Web APIs
candidate recommendation ...
RTCRtpSender.track - Web APIs
erty of the rtcrtpsender interface returns the mediastreamtrack which is being handled by the rtcrtpsender. syntax var mediastreamtrack = rtcrtpsender.track value a mediastreamtrack object representing the media associated with the rtcrtpsender. if no track is associated with the sender, this value is null, in which case the sender transmits nothing. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. candidate recommendation initial definition. ...
RTCRtpSender.transport - Web APIs
ransport has been established. note that when bundling is in effect—that is, when the rtcpeerconnection was created with an rtcconfiguration object whose bundlepolicy is max-compat or max-bundle—multiple senders may be sharing the same transport; in this case, all of them are using the same connection to transmit and/or receive rtp and rtcp packets. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.transport' in that specification. candidate recommendation ...
RTCRtpSender - Web APIs
ng sent by the rtcrtpsender with another track, without performing renegotiation. this method can be used, for example, to toggle between the front- and rear-facing cameras on a device. static methods rtcrtpsender.getcapabilities() returns an rtcrtpcapabilities object describing the system's capabilities for sending a specified kind of media data. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender' in that specification. candidate recommendation ...
RTCRtpStreamStats.codecId - Web APIs
the rtcrtpstreamstats dictionary's codecid property is a string which uniquely identifies the object that was inspected to produce the data in the rtccodecstats for the rtp stream. syntax var codecid = rtcrtpstreamstats.codecid; value a domstring which uniquely identifies the object from which the contents of the stream's rtccodecstats are derived. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.codecid' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.firCount - Web APIs
his tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: fircount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: fircount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.kind - Web APIs
ose value is "audio" if the track whose statistics are given by the rtcrtpstreamstats object contains audio, or "video" if the track contains video media. this string will always be the same as the one provided by the associated mediastreamtrack object's kind property. it will also match the statistics object's rtccodecstats.codec property's media type. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.kind' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.nackCount - Web APIs
ls the sender that one or more of the rtp packets it sent were lost in transport. syntax var nackcount = rtcrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport. note: this value is only available on the receiver. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: nackcount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: nackcount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.pliCount - Web APIs
r, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream. note: this value is only available on the receiver, and only for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: plicount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: plicount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.qpSum - Web APIs
urning 0 if the object doesn't describe an rtp stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: qpsum' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: qpsum' in that specification. candidate reco...
RTCRtpStreamStats.sliCount - Web APIs
nt; value an unsigned long integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. for technical details, see rfc 4585: 6.3.2. note: this value is sent by the sender to the receiver and is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: slicount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: slicount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.ssrc - Web APIs
: the specification includes an example that generates values for ssrc using md5. while not part of the standard, exactly, it is a good mechanism that may be used by some browsers; others may use other methods, such as random number generators. do not rely upon these values meaning anything other than "these objects are associated with the same source." specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.ssrc' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.trackId - Web APIs
or which statistics are provided in this object. syntax var trackid = rtcrtpstreamstats.trackid; value a domstring which uniquely identifies the rtcmediastreamtrackstats object that provides statistics for the track for which statistics are being collected by this rtcstatsreport. note: this value is not the same as the value of mediastramtrack.id. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.transportId - Web APIs
ansportid property is a string which uniquely identifies the object from which the statistics contained in the rtctransportstats properties in the rtcstatsreport. syntax var transportid = rtcrtpstreamstats.transportid; value a domstring uniquely identifying the source of the statistics contained the rtctransportstats properties in the rtcstatsreport. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.transportid' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats - Web APIs
been lost or corrupted; this notification is sent by the receiver to the sender using a slice loss indication (sli) packet. this is a fairly technical part of how codecs work and while the higher this value is, the more errors occurred in the stream, generally most of the time this value is only interesting to very intensively hardcore media developers. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats' in that specification. candidate recommendation initial definition. ...
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
candidate recommendation initial definition. ...
RTCRtpSynchronizationSource - Web APIs
ctionary in follow-up drafts. properties also implements the properties of rtcrtpcontributingsource. voiceactivityflag optional a boolean value indicating whether or not voice activity is included in the last rtp packet played from the source. if the peer has indicated that it's not supporting voice activity detection, this field is not provided. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsynchronizationsource' in that specification. candidate recommendation initial definition. ...
RTCRtpTransceiver.currentDirection - Web APIs
so. does not offer to receive rtp data and will not do so. [1] to determine if a sender has at least one active encoding, the user agent gets its parameters using rtcrtpsender.getparameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.currentdirection' in that specification. candidate recommendation ...
RTCRtpTransceiver.direction - Web APIs
on offers and answers the value of direction is used by rtcpeerconnection.createoffer() or rtcpeerconnection.createanswer() in order to generate the sdp generated by each of those methods. the sdp contains an a-line which specifies the directionality. for example, if the direction is specified as "sendrecv", the corresponding sdp a-line is: a=sendrecv specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.direction' in that specification. candidate recommendation ...
RTCRtpTransceiver.mid - Web APIs
peers have agreed upon to uniquely identify the stream's pairing of sender and receiver. syntax var mediaid = rtcrtptransceiver.mid; value a domstring which uniquely identifies the pairing of source and destination of the transceiver's stream. its value is taken from the media id of the sdp m-line. this value is null if negotiation has not completed. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.mid' in that specification. candidate recommendation ...
RTCRtpTransceiver.receiver - Web APIs
tcrtptransceiver interface indicates the rtcrtpreceiver responsible for receiving and decoding incoming media data for the transceiver's stream. syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and decoding incoming media data whose media id is the same as the current value of mid. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.receiver' in that specification. candidate recommendation ...
RTCRtpTransceiver.sender - Web APIs
the read-only sender property of webrtc's rtcrtptransceiver interface indicates the rtcrtpsender responsible for encoding and sending outgoing media data for the transceiver's stream. syntax var rtpsender = rtcrtptransceiver.sender; value an rtcrtpsender object used to encode and send media whose media id matches the current value of mid. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.sender' in that specification. candidate recommendation ...
RTCRtpTransceiver.setCodecPreferences() - Web APIs
s() methods and get the codecs list from the results of each. the following code snippet demonstrates how to get both the list of codecs supported by the transceiver's rtcrtpsender and rtcrtpreceiver. var availsendcodecs = transceiver.sender.getcapabilities("video").codecs; var availreceivecodecs = transceiver.receiver.getcapabilities("video").codecs; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.setcodecpreferences()' in that specification. candidate recommendation ...
RTCRtpTransceiver.stop() - Web APIs
ending a negotiationneeded event to the rtcpeerconnection. the negotiation process causes currentnegotiation to be set to stopped, finally indicating that the transceiver has been fully stopped. note: stopping the transceiver causes a negotiationneeded event to be sent to the transceiver's rtcpeerconnection, so the connection can adapt to the change. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stop()' in that specification. candidate recommendation ...
RTCRtpTransceiver.stopped - Web APIs
receive data. if either or both are still at work, the result is false. usage notes this property is deprecated and will be removed in the future. instead, look at the value of currentdirection. its value is stopped if the transceiver has stopped. note: currently only firefox implements stopped, and has not yet been updated to implement this change. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stopped' in that specification. candidate recommendation ...
RTCRtpTransceiver - Web APIs
all to stop(). methods setcodecpreferences() a list of rtcrtpcodecparameters objects which override the default preferences used by the user agent for the transceiver's codecs. stop() permanently stops the rtcrtptransceiver. the associated sender stops sending data, and the associated receiver likewise stops receiving and decoding incoming data. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver' in that specification. candidate recommendation ...
RTCRtpTransceiverDirection - Web APIs
so. does not offer to receive rtp data and will not do so. [1] to determine if a sender has at least one active encoding, the user agent gets its parameters using rtcrtpsender.getparameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverdirection' in that specification. candidate recommendation ...
RTCRtpTransceiverInit - Web APIs
dings optional a list of encodings to allow when sending rtp media from the rtcrtpsender. each entry is of type rtcrtpencodingparameters. streams optional a list of mediastream objects to add to the transceiver'srtcrtpreceiver; when the remote peer's rtcpeerconnection's track event occurs, these are the streams that will be specified by that event. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverinit' in that specification. candidate recommendation ...
RTCSctpTransport.state - Web APIs
tax var mystate = sctptransport.state; value a string whose value is taken from the rtcsctptransportstate enumerated type. its value is one of the following: connecting the initial state when the connection is being estabilished. connected the connection is open for data transmission. closed the connection is closed and can no longer be used. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport.state' in that specification. candidate recommendation initial definition. ...
RTCSctpTransport - Web APIs
ansport. rtcsctptransport.transportread only an rtcdtlstransport object representing the dtls transport used for the transmission and receipt of data packets. event handlers rtcsctptransport.onstatechange fired when the rtcsctptransport.state changes. methods this interface has no methods, but inherits methods from: eventtarget example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport' in that specification. candidate recommendation initial definition. ...
RTCSessionDescription() - Web APIs
candidate recommendation initial specification. ...
RTCSessionDescription.sdp - Web APIs
candidate recommendation initial specification. ...
RTCSessionDescription.toJSON() - Web APIs
the rtcsessiondescription.type property and can be one of the following values: "offer", "answer", "pranswer" or null. "sdp", containing a domstring, or null, with the sdp message corresponding to rtcsessiondescription.sdp property. example // sd is a rtcsessiondescriptor alert(json.stringify(sd)); // this call the tojson() method behind the scene. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription: tojson()' in that specification. candidate recommendation initial specification. ...
RTCSessionDescription.type - Web APIs
e in an offer/answer exchange. "pranswer", the description is a provisional answer and may be changed when the definitive choice will be given. "rollback", the description rolls back to offer/answer state to the last stable state. example // the remote description has been set previously on pc, a rtcpeerconnection alert(pc.remotedescription.type); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.type' in that specification. candidate recommendation initial specification. ...
RTCSessionDescription - Web APIs
candidate recommendation initial definition. ...
RTCSessionDescriptionCallback - Web APIs
accepted. this object contains the type and sdp properties which are part of rtcsessiondescription. return value the callback doesn't need to return anything, so the return value is undefined. example var pc = new rtcpeerconnection(); var descriptioncallback = function(offer) { pc.setlocaldescription(offer); } pc.createoffer(descriptioncallback); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescriptioncallback' in that specification. candidate recommendation initial definition. ...
RTCStats.id - Web APIs
Web › API › RTCStats › id
cstats.id; value a domstring which uniquely identifies the object for which this rtcstats-based object provides statistics. the format of the id string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.id' in that specification. candidate recommendation initial definition. ...
RTCStats.timestamp - Web APIs
bed by the statistics in this object was recorded, in milliseconds elapsed since the beginning of january 1, 1970, utc. this should be accurate to within a few milliseconds but may not be entirely pricise, either because of hardware or operating system limitations or because of fingerprinting protection in the form of reduced clock precision or accuracy. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.timestamp' in that specification. candidate recommendation initial definition. ...
RTCStats.type - Web APIs
Web › API › RTCStats › type
e string can be used to determine which of the rtcstats-based dictionaries are the foundation of the statistics object. syntax var type = rtcstats.type; value a domstring which specifies which type of statistic is represented by the object. the string comes from the rtcstatstype enum and corrsponds to one of the rtcstats-based statistic object types. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.type' in that specification. candidate recommendation initial definition. ...
RTCStats - Web APIs
Web › API › RTCStats
stream. rtcsentrtpstreamstats offers statistics related to the sending end of an rtp stream. rtcoutboundrtpstreamstats contains statistics about the local sending endpoint of an rtp stream. rtcremoteoutboundrtpstreamstats holds statistics related to the remote sending end an rtp stream. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats' in that specification. candidate recommendation initial specification. ...
RTCStatsIceCandidatePairState - Web APIs
into the waiting state. in-progress a check has been initiated for this pair, but the check's transaction is still in progress. succeeded a check for this pair has been completed successfully. waiting this pair has not yet been checked, but the check can be performed as soon as this pair is the highest priority pair remaining in the waiting state. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatsicecandidatepairstate' in that specification. candidate recommendation initial specification. ...
RTCStatsReport - Web APIs
ithin provides statistics related to a particular mediastreamtrack's attachment to an rtcrtpsender; also included are the media level metrics that go along with the track. transport an object that contains statistics related to a transport for an rtcpeerconnection. the object is of type rtctransportstats. using rtcstatsreport ... coming soon-ish ... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification. candidate recommendation initial specification. ...
RTCStatsType - Web APIs
rtcsendervideotrackattachmentstats. the data within provides statistics related to a particular mediastreamtrack's attachment to an rtcrtpsender; also included are the media level metrics that go along with the track. transport an object that contains statistics related to a transport for an rtcpeerconnection. the object is of type rtctransportstats. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatstype' in that specification. candidate recommendation initial definition. ...
RTCTrackEvent() - Web APIs
streams optional an array of mediastream objects representing each of the streams that comprise the event's corresponding track. track the mediastreamtrack the event is associated with. transceiver the rtcrtptransceiver associated with the event. return value a new rtctrackevent describing a track which has been added to the rtcpeerconnection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent()' in that specification. candidate recommendation initial specification. ...
RTCTrackEvent.receiver - Web APIs
candidate recommendation initial specification. ...
RTCTrackEvent.streams - Web APIs
the webrtc api interface rtctrackevent's read-only streams property specifies an array of mediastream objects, one for each of the streams that comprise the track being added to the rtcpeerconnection. syntax var streams = trackevent.streams; value an array of mediastream objects, one for each stream that make up the new track. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.streams' in that specification. candidate recommendation initial specification. ...
RTCTrackEvent.track - Web APIs
the webrtc api interface rtctrackevent's read-only track property specifies the mediastreamtrack that has been added to the rtcpeerconnection. syntax var track = trackevent.track; value a mediastreamtrack indicating the track which has been added to the rtcpeerconnection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.track' in that specification. candidate recommendation initial specification. ...
RTCTrackEvent.transceiver - Web APIs
ansceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent. note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.transceiver' in that specification. candidate recommendation initial specification. ...
RTCTrackEvent - Web APIs
imple example creates an event listener for the track event which sets the srcobject of the <video> element with the id videobox to the first stream in the list passed in the event's streams array. peerconnection.addeventlistener("track", e => { let videoelement = document.getelementbyid("videobox"); videoelement.srcobject = e.streams[0]; }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent' in that specification. candidate recommendation initial specification. ...
RTCTrackEventInit.receiver - Web APIs
candidate recommendation initial specification. ...
RTCTrackEventInit.streams - Web APIs
the event's track. syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var streamlist = trackeventinit.streams; value an array of mediastream objects, one for each stream which make up the track. if streams is not specified, its default value is an empty array. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.streams' in that specification. candidate recommendation initial specification. ...
RTCTrackEventInit.track - Web APIs
ociated with the track event. syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var track = trackeventinit.track; value a mediastreamtrack representing the track with which the event is associated. this is the track that's being added to the rtcpeerconnection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.track' in that specification. candidate recommendation initial specification. ...
RTCTrackEventInit.transceiver - Web APIs
ansceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent. note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.transceiver' in that specification. candidate recommendation initial specification. ...
RTCTrackEventInit - Web APIs
lowing properties: receiver the rtcrtpreceiver which is being used to receive the track's media. streams optional an array of mediastream objects representing each of the streams that comprise the event's corresponding track. track the mediastreamtrack the event is associated with. transceiver the rtcrtptransceiver associated with the event. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit' in that specification. candidate recommendation initial specification. ...
RadioNodeList.value - Web APIs
living standard initial definition. ...
RadioNodeList - Web APIs
collection does not contain any radio buttons or none of the radio buttons in the collection is in checked state, the empty string is returned. on setting the value property, the first radio button input element whose value property is equal to the new value will be set to checked. methods the radionodelist interface inherits the methods of nodelist. specifications specification status comments html living standardthe definition of 'radionodelist' in that specification. living standard initial definition ...
Range() - Web APIs
Web › API › Range › Range
living standard initial definition. ...
Range.cloneContents() - Web APIs
ough cloning. partially selected nodes include the parent tags necessary to make the document fragment valid. syntax documentfragment = range.clonecontents(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); documentfragment = range.clonecontents(); document.body.appendchild(documentfragment); specifications specification status comment domthe definition of 'range.clonecontents()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.clonecontents()' in that specification. obsolete initial specification. ...
Range.cloneRange() - Web APIs
Web › API › Range › cloneRange
eturns a range object with boundary points identical to the cloned range. the returned clone is copied by value, not reference, so a change in either range does not affect the other. syntax clone = range.clonerange(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); clone = range.clonerange(); specifications specification status comment domthe definition of 'range.clonerange()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.clonerange()' in that specification. obsolete initial specification. ...
Range.collapse() - Web APIs
Web › API › Range › collapse
ed property. syntax range.collapse(tostart); parameters tostart optional a boolean value: true collapses the range to its start, false to its end. if omitted, it defaults to false . example var range = document.createrange(); referencenode = document.getelementsbytagname("div").item(0); range.selectnode(referencenode); range.collapse(true); specifications specification status comment domthe definition of 'range.collapse()' in that specification. living standard the parameter is now optional and default to false. document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapse()' in that specification. obsolete initial specification. ...
Range.collapsed - Web APIs
Web › API › Range › collapsed
lse if not. a collapsed range is empty (containing no content), and specifies a single point in a dom tree. to collapse a range, see the range.collapse() method. syntax iscollapsed = range.collapsed; example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); iscollapsed = range.collapsed; specifications specification status comment domthe definition of 'range.collapsed' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapsed' in that specification. obsolete initial specification. ...
Range.commonAncestorContainer - Web APIs
living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.commonancestorcontainer' in that specification. obsolete initial specification. ...
Range.compareBoundaryPoints() - Web APIs
ge to compare boundary points with the range. example var range, sourcerange, compare; range = document.createrange(); range.selectnode(document.getelementsbytagname("div")[0]); sourcerange = document.createrange(); sourcerange.selectnode(document.getelementsbytagname("div")[1]); compare = range.compareboundarypoints(range.start_to_end, sourcerange); specifications specification status comment domthe definition of 'range.compareboundarypoints()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.compareboundarypoints()' in that specification. obsolete initial specification. ...
Range.comparePoint() - Web APIs
) parameters referencenode the node to compare with the range. offset an integer greater than or equal to zero representing the offset inside the referencenode. example range = document.createrange(); range.selectnode(document.getelementsbytagname('div').item(0)); returnvalue = range.comparepoint(document.getelementsbytagname('p').item(0), 1); specification specification status comment domthe definition of 'range.comparepoint()' in that specification. living standard initial specification. ...
Range.createContextualFragment() - Web APIs
fragment. example var tagstring = "<div>i am a div node</div>"; var range = document.createrange(); // make the parent of the first div in the document becomes the context node range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.createcontextualfragment(tagstring); document.body.appendchild(documentfragment); specification specification status comment dom parsing and serializationthe definition of 'range.createcontextualfragment()' in that specification. working draft initial specification. ...
Range.deleteContents() - Web APIs
nge.deletecontents() method removes the contents of the range from the document. unlike range.extractcontents(), this method does not return a documentfragment containing the deleted content. syntax range.deletecontents() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.deletecontents(); specifications specification status comment domthe definition of 'range.deletecontents()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.deletecontents()' in that specification. obsolete initial specification. ...
Range.detach() - Web APIs
Web › API › Range › detach
the range.detach() method does nothing. it used to disable the range object and enable the browser to release associated resources. the method has been kept for compatibility. syntax range.detach(); example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.detach(); specifications specification status comment domthe definition of 'range.detach()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.detach()' in that specification. obsolete initial specification. ...
Range.endContainer - Web APIs
iner read-only property returns the node within which the range ends. to change the end position of a node, use the range.setend() method or a similar one. syntax endrangenode = range.endcontainer; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangenode = range.endcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.endcontainer' in that specification. obsolete initial specification. ...
Range.endOffset - Web APIs
Web › API › Range › endOffset
t of the endcontainer and the boundary point of the range. this property is read-only. to change the endoffset of a range, use one of the range.setend methods. syntax endrangeoffset = range.endoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangeoffset = range.endoffset; specifications specification status comment domthe definition of 'range.endoffset' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.endoffset' in that specification. obsolete initial specification. ...
Range.extractContents() - Web APIs
living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.extractcontents()' in that specification. obsolete initial specification. ...
Range.getBoundingClientRect() - Web APIs
working draft initial specification. ...
Range.getClientRects() - Web APIs
presenting the area of the screen occupied by the range. this is created by aggregating the results of calls to element.getclientrects() for all the elements in the range. syntax rectlist = range.getclientrects() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); rectlist = range.getclientrects(); specification specification status comment css object model (cssom) view modulethe definition of 'range.getclientrects()' in that specification. working draft initial specification. ...
Range.insertNode() - Web APIs
Web › API › Range › insertNode
ad. syntax range.insertnode(newnode); parameters newnode the node to insert at the start of the range. example range = document.createrange(); newnode = document.createelement("p"); newnode.appendchild(document.createtextnode("new node inserted here")); range.selectnode(document.getelementsbytagname("div").item(0)); range.insertnode(newnode); specifications specification status comment domthe definition of 'range.insertnode()' in that specification. living standard no change document object model (dom) level 2 traversal and range specificationthe definition of 'range.insertnode()' in that specification. obsolete initial definition ...
Range.intersectsNode() - Web APIs
ng whether the given node intersects the range. syntax bool = range.intersectsnode( referencenode ) parameters referencenode the node to compare with the range. example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var bool = range.intersectsnode(document.getelementsbytagname("p").item(0)); specification specification status comment domthe definition of 'range.intersectnode()' in that specification. living standard initial definition. ...
Range.isPointInRange() - Web APIs
pointinrange( referencenode, offset ) parameters referencenode the node to compare with the range. offset the offset into node of the point to compare with the range. example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); bool = range.ispointinrange(document.getelementsbytagname("p").item(0),1); specification specification status comment domthe definition of 'range.ispointinrange()' in that specification. living standard initial definition. ...
Range.selectNode() - Web APIs
Web › API › Range › selectNode
he parent node of the start and end of the range will be the same as the parent of the referencenode. syntax range.selectnode(referencenode); parameters referencenode the node to select within a range. example let range = document.createrange(); let referencenode = document.getelementsbytagname('div').item(0); range.selectnode(referencenode); specifications specification status comment domthe definition of 'range.selectnode()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnode()' in that specification. obsolete initial specification. ...
Range.selectNodeContents() - Web APIs
living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnodecontents()' in that specification. obsolete initial specification. ...
Range.setEnd() - Web APIs
Web › API › Range › setEnd
types, endoffset is the number of child nodes between the start of the endnode. example const range = document.createrange(); const endnode = document.getelementsbytagname('p').item(3); const endoffset = endnode.childnodes.length; range.setend(endnode, endoffset); setend() is commonly used in conjunction with setstart() to fully configure a range. specifications specification status comment domthe definition of 'range.setend()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setend()' in that specification. obsolete initial specification. ...
Range.setEndAfter() - Web APIs
Web › API › Range › setEndAfter
to another node. the parent node of end of the range will be the same as that for the referencenode. syntax range.setendafter(referencenode); parameters referencenode the node to end the range after. example var range = document.createrange(); var referencenode = document.getelementsbytagname('div').item(0); range.setendafter(referencenode); specifications specification status comment domthe definition of 'range.setendafter()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendafter()' in that specification. obsolete initial specification. ...
Range.setEndBefore() - Web APIs
another node. the parent node of end of the range will be the same as that for the referencenode. syntax range.setendbefore(referencenode); parameters referencenode the node to end the range before. example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setendbefore(referencenode); specifications specification status comment domthe definition of 'range.setendbefore()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendbefore()' in that specification. obsolete initial specification. ...
Range.setStart() - Web APIs
Web › API › Range › setStart
living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstart()' in that specification. obsolete initial specification. ...
Range.setStartAfter() - Web APIs
node. the parent node of the start of the range will be the same as that for the referencenode. syntax range.setstartafter(referencenode); parameters referencenode the node to start the range after. example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartafter(referencenode); specifications specification status comment domthe definition of 'range.setstartafter()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartafter()' in that specification. obsolete initial specification. ...
Range.setStartBefore() - Web APIs
nt node of the start of the range will be the same as that for the referencenode. syntax range.setstartbefore(referencenode); parameters referencenode the node before which the range should start. example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.setstartbefore()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartbefore()' in that specification. obsolete initial specification. ...
Range.startContainer - Web APIs
ainer read-only property returns the node within which the range starts. to change the start position of a node, use one of the range.setstart() methods. syntax startrangenode = range.startcontainer; example range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); startrangenode = range.startcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.startcontainer' in that specification. obsolete initial specification. ...
Range.startOffset - Web APIs
Web › API › Range › startOffset
between the start of the startcontainer and the boundary point of the range. to change the startoffset of a range, use the range.setstart method. syntax startrangeoffset = range.startoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); var startrangeoffset = range.startoffset; specifications specification status comment domthe definition of 'range.startoffset' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.startoffset' in that specification. obsolete initial specification. ...
Range.surroundContents() - Web APIs
wparent); parameters newparent a node with which to surround the contents. example html <span class="header-text">put this in a headline</span> javascript const range = document.createrange(); const newparent = document.createelement('h1'); range.selectnode(document.queryselector('.header-text')); range.surroundcontents(newparent); result specifications specification status comment domthe definition of 'range.surroundcontents()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.surroundcontents()' in that specification. obsolete initial specification. ...
Range.toString() - Web APIs
Web › API › Range › toString
<b>everything</b> between the bold <b>words</b>. look at the output below.</p> <p id="log"></p> javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); document.getelementbyid('log').textcontent = range.tostring(); result specifications specification status comment domthe definition of 'range.tostring()' in that specification. living standard no change. document object model (dom) level 2 traversal and range specificationthe definition of 'range.tostring()' in that specification. obsolete initial specification. ...
Range - Web APIs
Web › API › Range
ts(). range.getclientrects() returns a list of domrect objects that aggregates the results of element.getclientrects() for all the elements in the range. range.intersectsnode() returns a boolean indicating whether the given node intersects the range. range.ispointinrange() returns a boolean indicating whether the given point is in the range. specifications specification status comment domthe definition of 'range' in that specification. living standard do not use rangeexception anymore, use domexception instead. made the second parameter of collapse() optional. added the methods ispointinrange(), comparepoint(), and intersectsnode(). added the constructor range(). dom parsing and serializationthe definition of 'extensions to ra...
ReadableByteStreamController.byobRequest - Web APIs
living standard initial definition. ...
ReadableByteStreamController.close() - Web APIs
o read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed. syntax readablebytestreamcontroller.close(); parameters none. return value undefined. exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason. examples tbd. specifications specification status comment streamsthe definition of 'close()' in that specification. living standard initial definition. ...
ReadableByteStreamController.desiredSize - Web APIs
living standard initial definition. ...
ReadableByteStreamController.enqueue() - Web APIs
bytestreamcontroller.enqueue(chunk); parameters chunk the chunk to enqueue. return value undefined. exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached. examples tbd. specifications specification status comment streamsthe definition of 'enqueue()' in that specification. living standard initial definition. ...
ReadableByteStreamController.error() - Web APIs
future interactions with the associated stream to error. syntax readablebytestreamcontroller.error(e); parameters e the error you want future interactions to fail with. return value undefined. exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream is not readable for some other reason. examples tbd. specifications specification status comment streamsthe definition of 'error()' in that specification. living standard initial definition. ...
ReadableByteStreamController - Web APIs
he desired size required to fill the stream's internal queue. methods readablebytestreamcontroller.close() closes the associated stream. readablebytestreamcontroller.enqueue() enqueues a given chunk in the associated stream. readablebytestreamcontroller.error() causes any future interactions with the associated stream to error. examples tbd. specifications specification status comment streamsthe definition of 'readablebytestreamcontroller' in that specification. living standard initial definition ...
ReadableStream.ReadableStream() - Web APIs
living standard initial definition. ...
ReadableStream.cancel() - Web APIs
living standard initial definition. ...
ReadableStream.getReader() - Web APIs
living standard initial definition. ...
ReadableStream.locked - Web APIs
turns whether or not the readable stream is locked to a reader. syntax var locked = readablestream.locked; value a boolean indicating whether or not the readable stream is locked. examples const stream = new readablestream({ ... }); const reader = stream.getreader(); stream.locked // should return true, as the stream has been locked to a reader specifications specification status comment streamsthe definition of 'locked' in that specification. living standard initial definition. ...
ReadableStream.pipeThrough() - Web APIs
too. // fetch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(rs => logreadablestream('fetch response stream', rs)) // create a gray-scaled png stream out of the original .then(body => body.pipethrough(new pngtransformstream())) .then(rs => logreadablestream('png chunk stream', rs)) specifications specification status comment streamsthe definition of 'pipethrough()' in that specification. living standard initial definition. ...
ReadableStream.pipeTo() - Web APIs
/or readablestream objects are not a writable stream/readable stream, or one or both of the streams are locked. examples // fetch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(body => body.pipethrough(new pngtransformstream())) .then(rs => rs.pipeto(new finaldestinationstream())) specifications specification status comment streamsthe definition of 'pipeto()' in that specification. living standard initial definition. ...
ReadableStream.tee() - Web APIs
living standard initial definition. ...
ReadableStream - Web APIs
living standard initial definition ...
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
yobreader(stream); parameters stream the readablestream to be read. return value an instance of the readablestreambyobreader object. exceptions typeerror the supplied stream parameter is not a readablestream, or it is already locked for reading by another reader, or its stream controller is not a readablebytestreamcontroller. examples tbd specifications specification status comment streamsthe definition of 'readablestreambyobreader()' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader.cancel() - Web APIs
living standard initial definition. ...
ReadableStreamBYOBReader.closed - Web APIs
living standard initial definition. ...
ReadableStreamBYOBReader.read() - Web APIs
fulfilled with an object of the form { value: undefined, done: true }. if the stream becomes errored, the promise will be rejected with the relevant error. exceptions typeerror the source object is not a readablestreambyobreader, the stream has no owner, the view is not an object or has become detached, or the view's length is 0. examples tbd. specifications specification status comment streamsthe definition of 'read()' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader.releaseLock() - Web APIs
romise returned by the reader’s readablestreambyobreader.read() method has not finished. this will result in a typeerror being thrown. syntax readablestreambyobreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readablestreambyobreader, or a read request is pending. examples tbd. specifications specification status comment streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader - Web APIs
f interest in the stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. readablestreambyobreader.read() returns a promise providing access to the next chunk in the stream's internal queue. readablestreambyobreader.releaselock() releases the reader's lock on the stream. examples tbd. specifications specification status comment streamsthe definition of 'readablestreambyobreader' in that specification. living standard initial definition ...
ReadableStreamBYOBRequest.respond() - Web APIs
living standard initial definition. ...
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
living standard initial definition. ...
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. examples tbd. specifications specification status comment streamsthe definition of 'view' in that specification. living standard initial definition. ...
ReadableStreamBYOBRequest - Web APIs
write generated data. constructor none. readablestreambyobrequest instance is created automatically by readablebytestreamcontroller as needed. properties readablestreambyobrequest.view read only returns the current view. methods readablestreambyobrequest.respond() xxx readablestreambyobrequest.respondwithnewview() xxx examples tbd. specifications specification status comment streamsthe definition of 'readablestreambyobrequest' in that specification. living standard initial definition ...
ReadableStreamDefaultController.close() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultController.desiredSize - Web APIs
living standard initial definition. ...
ReadableStreamDefaultController.enqueue() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultController.error() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultController - Web APIs
living standard initial definition ...
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultReader.cancel() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultReader.closed - Web APIs
rejects if the stream errors. syntax var closed = readablestreamdefaultreader.closed; value a promise. examples in this snippet, a previously-created reader is queried to see if the stream has been closed. when it is closed, the promise fulfills and the message is logged to the console. reader.closed.then(() => { console.log('reader closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification. living standard initial definition. ...
ReadableStreamDefaultReader.read() - Web APIs
living standard initial definition. ...
ReadableStreamDefaultReader.releaseLock() - Web APIs
sult in a typeerror being thrown. syntax readablestreamdefaultreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readablestreamdefaultreader, or a read request is pending. examples function fetchstream() { const reader = stream.getreader(); ... reader.releaselock() ... } specifications specification status comment streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
ReadableStreamDefaultReader - Web APIs
living standard initial definition ...
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
e should be taken, meaning the number of times per second that sensor.onreading will be called. a whole number or decimal may be used, the latter for frequencies less than a second. the actual reading frequency depends device hardware and consequently may be less than requested. referenceframe: either 'device' or 'screen'. the default is 'device'. specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor()' in that specification. candidate recommendation initial definition. ...
RelativeOrientationSensor - Web APIs
candidate recommendation initial definition. ...
RenderingContext - Web APIs
isn't something web developers directly use. there is no renderingcontext interface, and there are no objects which implement type renderingcontext. the primary use of this type is the definition of the <canvas> element's htmlcanvaselement.getcontext() method, which returns a renderingcontext (meaning it returns any one of the rendering context types). specifications specification status comment html living standardthe definition of 'renderingcontext' in that specification. living standard initial definition. ...
Report.body - Web APIs
Web › API › Report › body
nformation on what the particular report body types contain. examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report body, i.e. a deprecationreportbody object console.log(firstreport.body); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification. editor's draft ...
Report.type - Web APIs
Web › API › Report › type
port. currently the available types are deprecation, intervention, and crash. examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report type, i.e. "deprecation" console.log(firstreport.type); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification. editor's draft ...
Report.url - Web APIs
Web › API › Report › url
that generated the report. examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the url of the document that generated the first report // e.g. "https://www.example.com/cats.html" console.log(firstreport.url); }, options); specifications specification status comment reporting apithe definition of 'report.url' in that specification. editor's draft ...
Report - Web APIs
Web › API › Report
editor's draft ...
ReportingObserver() - Web APIs
editor's draft ...
ReportingObserver.disconnect() - Web APIs
s. the associated observer will no longer be active. syntax reportingobserverinstance.disconnect() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() ... observer.disconnect() specifications specification status comment reporting apithe definition of 'reportingobserver.disconnect()' in that specification. editor's draft ...
ReportingObserver.observe() - Web APIs
ace instructs a reporting observer to start collecting reports in its report queue. syntax reportingobserverinstance.observe() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() specifications specification status comment reporting apithe definition of 'reportingobserver.observe()' in that specification. editor's draft ...
ReportingObserver.takeRecords() - Web APIs
e.takerecords() return value an array of report objects. examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() // ... let records = observer.takerecords(); console.log(records); specifications specification status comment reporting apithe definition of 'reportingobserver.takerecords()' in that specification. editor's draft ...
ReportingObserver - Web APIs
the report details. note: if you look at the complete source code, you'll notice that we actually call the deprecated getusermedia() method twice. after the first time we call reportingobserver.takerecords(), which returns the first generated report and empties the queue. because of this, when the button is pressed only the second report is listed. specifications specification status comment reporting apithe definition of 'reportingobserver' in that specification. editor's draft initial definition. ...
ReportingObserverOptions - Web APIs
editor's draft ...
Reporting API - Web APIs
the report details. ...
Request() - Web APIs
Web › API › Request › Request
living standard ...
Request.clone() - Web APIs
Web › API › Request › clone
f the request that clone() was called on. 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 clone the request. var myrequest = new request('flowers.jpg'); var newrequest = myrequest.clone(); // a copy of the request is now stored in newrequest specifications specification status comment fetchthe definition of 'clone' in that specification. living standard initial definition ...
Request.credentials - Web APIs
available values instead of two. 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. living standard initial definition ...
Request.destination - Web APIs
h as "image" or "worker" or "audioworklet". example in the following snippet, we create a new request using the request() constructor (for an image file in the same directory as the script), then save the request's destination: var myrequest = new request('flowers.jpg'); var mydestination = myrequest.destination; // returns the empty string by default specifications specification status comment fetchthe definition of 'destination' in that specification. living standard initial definition ...
Request.headers - Web APIs
Web › API › Request › headers
living standard initial definition ...
Request.integrity - Web APIs
Web › API › Request › integrity
an integrity has not been specified, the property returns ''. example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request integrity value in a variable: var myrequest = new request('flowers.jpg'); var myintegrity = myrequest.integrity; specifications specification status comment fetchthe definition of 'integrity' in that specification. living standard initial definition ...
Request.method - Web APIs
Web › API › Request › method
hod; 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. living standard initial definition ...
Request.mode - Web APIs
Web › API › Request › mode
io>, <video>, <object>, <embed>, or <iframe> elements. example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request mode in a variable: var myrequest = new request('flowers.jpg'); var mymode = myrequest.mode; // returns "cors" by default specifications specification status comment fetchthe definition of 'mode' in that specification. living standard initial definition ...
Request.redirect - Web APIs
Web › API › Request › redirect
ed 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. living standard initial definition ...
Request.referrer - Web APIs
Web › API › Request › referrer
presenting 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. living standard initial definition ...
Request.referrerPolicy - Web APIs
referrer-policy http header page. 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. living standard initial definition ...
Request.url - Web APIs
Web › API › Request › url
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. living standard initial definition ...
Request - Web APIs
Web › API › Request
type can only be a blob, buffersource, formdata, urlsearchparams, usvstring or readablestream type, so for adding a json object to the payload you need to stringify that object. you could then fetch this api request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example and get the response: fetch(request) .then(response => { if (response.status === 200) { return response.json(); } else { throw new error('something went wrong on api server!'); } }) .then(response => { console.debug(response); // ... }).catch(error => { console.error(error); }); specifications specification status comment fetchthe definition of 'request' in that specification. living standard init...
RequestDestination - Web APIs
. "report" the target is a report. "script" the target is a script. "serviceworker" the target is a service worker. "sharedworker" the target is a shared worker. "style" the target is a style "track" the target is an html <track>. "video" the target is video data. "worker" the target is a worker. "xslt" the target is an xlst transform. specifications specification status comment fetchthe definition of 'requestdestination' in that specification. living standard initial definition ...
ResizeObserver() - Web APIs
editor's draft initial definition. ...
ResizeObserver.disconnect() - Web APIs
the disconnect() method of the resizeobserver interface unobserves all observed element or svgelement targets. syntax resizeobserver.disconnect(); parameters none. return value void. exceptions none. examples btn.addeventlistener('click', () => { resizeobserver.disconnect(); }) specifications specification status comment resize observerthe definition of 'disconnect()' in that specification. editor's draft initial definition. ...
ResizeObserver.observe() - Web APIs
editor's draft initial definition. ...
ResizeObserver.unobserve() - Web APIs
editor's draft initial definition. ...
ResizeObserver - Web APIs
editor's draft initial definition. ...
ResizeObserverEntry.borderBoxSize - Web APIs
editor's draft initial definition. ...
ResizeObserverEntry.contentBoxSize - Web APIs
editor's draft initial definition. ...
ResizeObserverEntry.contentRect - Web APIs
editor's draft initial definition. ...
ResizeObserverEntry.target - Web APIs
editor's draft initial definition. ...
ResizeObserverEntry - Web APIs
editor's draft initial definition. ...
Resize Observer API - Web APIs
...
Resource Timing API - Web APIs
method removes all "resource" type performance entries from the browser's resource performance entry buffer. the setresourcetimingbuffersize() method sets the resource performance entry buffer size to the specified number of resource performance entries. the performanceresourcetiming interface's tojson() method returns a json serialization of a "resource" type performance entry. implementation status as shown in the performanceresourcetiming interface's browser compatibility table, most of these interfaces are broadly implemented by desktop browsers. however, note that some properties have little to no implementation so see each property's "browser compatibility" section for more specific interoperability data. to test your browser's support for these interfaces, run the perf-api-support ap...
Response.clone() - Web APIs
Web › API › Response › clone
living standard initial definition ...
Response.error() - Web APIs
Web › API › Response › error
an error if you so wish it. an error response has its type set to error. note: an "error" response never really gets exposed to script: such a response to a fetch() would reject the promise. syntax var errorresponse = response.error(); parameters none. return value a response object. example tbd (does not yet appear to be supported anywhere). specifications specification status comment fetchthe definition of 'error()' in that specification. living standard ...
Response.headers - Web APIs
Web › API › Response › headers
eaders value to the console. 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. living standard initial definition ...
Response.redirected - Web APIs
living standard initial definition ...
Response.url - Web APIs
Web › API › Response › url
to the console. 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. living standard initial definition ...
RsaHashedImportParams - Web APIs
-oaep, depending on the algorithm you want to use. hash a domstring representing the name of the digest function to use. this can be one of sha-256, sha-384, or sha-512. warning: although you can technically pass sha-1 here, this is strongly discouraged as it is considered vulnerable. examples see the examples for subtlecrypto.importkey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedimportparams' in that specification. recommendation ...
RsaHashedKeyGenParams - Web APIs
here ([0x01, 0x00, 0x01]). hash a domstring representing the name of the digest function to use. you can pass any of sha-256, sha-384, or sha-512 here. warning: although you can technically pass sha-1 as a value here, this is strongly discouraged as sha-1 is considered vulnerable. examples see the examples for subtlecrypto.generatekey(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedkeygenparams' in that specification. recommendation ...
RsaOaepParams - Web APIs
e encrypted but which should be bound to the ciphertext. a digest of the label is part of the input to the encryption operation. unless your application calls for a label, you can just omit this argument and it will not affect the security of the encryption operation. examples see the examples for subtlecrypto.encrypt() and subtlecrypto.decrypt(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsaoaepparams' in that specification. recommendation ...
RsaPssParams - Web APIs
le, if you use sha-256 as the digest algorithm, this could be 32. the maximum size of saltlength is given by: math.ceil((keysizeinbits - 1)/8) - digestsizeinbytes - 2 so for a key length of 2048 bits and a digest output size of 32 bytes, the maximum size would be 222. examples see the examples for subtlecrypto.sign() and subtlecrypto.verify(). specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsapssparams' in that specification. recommendation ...
SVGAElement.target - Web APIs
rame html or xhtml document. syntax mylink.target = 'value'; value an svganimatedstring indicating the ending resource target that opens the document when the link is activated. sample values can be found here example the code is taken from the "svgaelement example code" ... var linkref = document.queryselector('a'); linkref.target ='_blank'; ... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
SVGAElement - Web APIs
ent is set to _blank and when the link is clicked, it logs to notify whether the condition is met or not. ...
SVGAltGlyphDefElement - Web APIs
dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphdefelement' in that specification. recommendation initial definition ...
format - Web APIs
recommendation ...
SVGAltGlyphElement.glyphRef - Web APIs
nting a glyph identifier. it has the same meaning as the ‘glyphref’ property on the svgglyphrefelement interface of the <glyphref> element. syntax string = myglyph.glyphref; myglyph.glyphref = string; value the return value is a glyph identifier, the value of which depends on the format of the given font. example myglyph.glypref = "#glyphid"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref' in that specification. recommendation ...
SVGAltGlyphElement - Web APIs
efines the glyph identifier, whose format is dependent on the ‘format’ of the given font. svgaltglyphelement.format it corresponds to the attribute format on the given element. it's data type is 'string'. this property specifies the format of the given font. methods this interface has no methods but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphelement' in that specification. recommendation initial definition ...
SVGAltGlyphItemElement - Web APIs
dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphitemelement' in that specification. recommendation initial definition ...
SVGAngle - Web APIs
Web › API › SVGAngle
wed_err is raised when the length corresponds to a read only attribute or when the object itself is read only. converttospecifiedunits preserve the same underlying stored value, but reset the stored unit identifier to the given unittype. object attributes unittype, valueinspecifiedunits, and valueasstring might be modified as a result of this method. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification. candidate recommendation adds the dataset property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that specification. recommendation initial definition ...
SVGAnimateColorElement - Web APIs
recommendation initial definition ...
SVGAnimateElement - Web APIs
ext-anchor="middle" alignment-baseline="middle">svganimateelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement. methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification status comment svg animations level 2the definition of 'svganimateelement' in that specification. editor's draft removed the inheritance from svgstylable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimateelement' in that specification. recommendation initial definition ...
SVGAnimateMotionElement - Web APIs
chor="middle" alignment-baseline="middle">svganimatemotionelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement. methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification status comment svg animations level 2the definition of 'svganimatemotionelement' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatemotionelement' in that specification. recommendation initial definition ...
SVGAnimateTransformElement - Web APIs
r="middle" alignment-baseline="middle">svganimatetransformelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement. methods this interface has no methods but inherits methods from its parent, svganimationelement. specifications specification status comment svg animations level 2the definition of 'svganimatetransformelement' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatetransformelement' in that specification. recommendation initial definition ...
SVGAnimatedString.animVal - Web APIs
perty is not currently being animated, then it contains the same value as baseval the animval property is a read only property. internet explorer 9 supports script-based svg animation but it does not support declarative-based svg animation. as a result, the animval property contains the same value as the baseval property. syntax var = object.animval specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if 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
baseval gets or sets the base value of the given attribute before any animations are applied.the base value of the given attribute before applying any animations. setter throws domexception. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbasevalc...
SVGAnimatedString - Web APIs
e given attribute or property is not currently being animated, it contains the same value as baseval. svganimatedstring.baseval this is a domstring representing the base value. the base value of the given attribute before applying any animations. setter throws domexception. methods the svganimatedstring interface do not provide any specific methods. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
SVGAnimationElement: beginEvent event - Web APIs
candidate recommendation initial definition ...
SVGAnimationElement: endEvent event - Web APIs
candidate recommendation initial definition ...
SVGAnimationElement.onbegin - Web APIs
the svganimationelement.onbegin property refers to the event handler for the beginevent. syntax var begineventhandler = someelement.onbegin; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onbegin' in that specification. editor's draft initial definition ...
SVGAnimationElement.onend - Web APIs
the svganimationelement.onend property refers to the event handler for the endevent. syntax var endeventhandler = someelement.onend; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onend' in that specification. editor's draft initial definition ...
SVGAnimationElement.onrepeat - Web APIs
the svganimationelement.onrepeat property refers to the event handler for the repeatevent. syntax var repeateventhandler = someelement.onrepeat; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onrepeat' in that specification. editor's draft initial definition ...
SVGAnimationElement: repeatEvent event - Web APIs
candidate recommendation initial definition ...
targetElement - Web APIs
the svganimationelement.targetelement property refers to the element which is being animated. if no target element is being animated (for example, because the href attribute specifies an unknown element), the value returned is null. syntax var targetelement = someelement.targetelement; specifications specification status comment svg animations level 2the definition of 'svganimationelement.targetelement' in that specification. editor's draft added null as return value in case that no target element is being animated. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimationelement.targetelement' in that specification. recommendation initial definition ...
SVGAnimationElement - Web APIs
imeline begins to play. also available via the onbegin property. endevent fired when at the active end of the animation is reached. also available via the onend property. repeatevent fired when the element's local timeline repeats. it will be fired each time the element repeats, after the first iteration. also available via the onrepeat property. specifications specification status comment svg animations level 2the definition of 'svganimationelement' in that specification. editor's draft scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimationelement' in that specification. recommendation initial definition ...
cx - Web APIs
element.cx; value an svganimatedlength representing the x-coordinate of the circleʼs center. example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cx="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cx); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cx' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cx' in that specification. recommendation initial definition ...
cy - Web APIs
element.cy; value an svganimatedlength representing the y-coordinate of the circleʼs center. example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cy="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cy); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cy' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cy' in that specification. recommendation initial definition ...
r - Web APIs
syntax var radius = element.r; value an svganimatedlength representing the radius of the circle. example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle r="50" r="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.r); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.r' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.r' in that specification. recommendation initial definition ...
SVGCircleElement - Web APIs
cle radius will increase or decrease var change = math.random() > 0.5 ? 10 : -10; // clamp the circle radius to a minimum of 10 and a maximum of 250, // so it won't disappear or get bigger than the viewport var newvalue = math.min(math.max(circle.r.baseval.value + change, 10), 250); circle.setattribute("r", newvalue); } click on the circle. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement' in that specification. candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement' in that...
SVGClipPathElement - Web APIs
perties from its parent, svgelement. svgclippathelement.clippathunits read only an svganimatedenumeration corresponding to the clippathunits attribute of the given <clippath> element. takes one of the constants defined in svgunittypes. methods this interface doesn't implement any specific methods, but inherits methods from its parent, svgelement. specifications specification status comment css masking module level 1the definition of 'svgclippathelement' in that specification. candidate recommendation removed the inheritance from svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, svgtransformable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgclippathelement' in that specification. reco...
SVGColorProfileElement - Web APIs
the given element. it takes one of the rendering_intent_* constants defined on the svgrenderingintent interface that corresponds to the value of the rendering-intent attribute. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgurireference and svgrenderingintent. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcolorprofileelement' in that specification. recommendation initial definition ...
SVGComponentTransferFunctionElement - Web APIs
nt.exponent read only an svganimatednumber corresponding to the exponent attribute of the given element. svgcomponenttransferfunctionelement.offset read only an svganimatednumber corresponding to the offset attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgcomponenttransferfunctionelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcomponenttransferfunctionelement' in that specification. recommendation initial definition ...
SVGCursorElement - Web APIs
nce. svgcursorelement.x read only an svganimatedlength corresponding to the x attribute of the given <cursor> element. svgcursorelement.y read only an svganimatedlength corresponding to the y attribute of the given <cursor> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcursorelement' in that specification. recommendation initial definition ...
SVGDefsElement - Web APIs
svgdefselement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent, svggraphicselement. methods this interface doesn't implement any specific methods, but inherits properties from its parent, svggraphicselement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdefselement' in that specification. candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdefselement' in that speci...
SVGDescElement - Web APIs
pace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgdescelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggeometryelement. methods this interface has no methods but inherits methods from its parent, svggeometryelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdescelement' in that specification. candidate recommendation removed the inheritance from svglangspace and svgstylable scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdescelement' in that specification. recommendation initial definition ...
SVGElement: error event - Web APIs
es not load properly or when an error occurs during script execution. this basically implements the standard error dom event. bubbles yes cancelable no interface svgevent event handler property onerror examples svgelem.addeventlistener('error', () => { console.log('svg not loaded properly.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'error' in that specification. candidate recommendation initial definition ...
SVGElement: load event - Web APIs
t when it is loaded in the browser, e.g. in the dom in the case of an embedded <svg>. it is basically the same as the standard load dom event. bubbles no cancelable no interface svgevent event handler property onload examples svgelem.addeventlistener('load', () => { console.log('svg loaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'load' in that specification. candidate recommendation initial definition ...
SVGElement: resize event - Web APIs
most svg elements and is dispatched after the resize operation has taken place. this basically implements the standard resize dom event. bubbles no cancelable no interface svgevent event handler property onresize examples svgelem.addeventlistener('resize', () => { console.log('svg resized.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification. candidate recommendation initial definition ...
SVGElement: scroll event - Web APIs
is fired when an svg document view is being shifted along the x and/or y axes. this basically implements the standard scroll dom event. bubbles no cancelable no interface svgevent event handler property onscroll examples svgelem.addeventlistener('scroll', () => { console.log('svg scrolled.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification. candidate recommendation initial definition ...
SVGElement: unload event - Web APIs
the unload event is fired when the dom implementation removes an svg document from a window or frame. bubbles no cancelable no interface svgevent event handler property onunload examples svgelem.addeventlistener('unload', () => { console.log('svg unloaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'unload' in that specification. candidate recommendation initial definition ...
SVGElement - Web APIs
size fired when an svg document is being resized. also available via the onresize property. scroll fired when an svg document view is being shifted along the x and/or y axes. also available via the onscroll property. unload fired when the dom implementation removes an svg document from a window or frame. also available via the onunload property. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification. candidate recommendation adds the dataset property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that specification. recommendation initial definition ...
SVGEllipseElement - Web APIs
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgellipseelement' in that specification. recommendation initial definition ...
SVGExternalResourcesRequired - Web APIs
te externalresourcesrequired as being of type svganimatedboolean, whereas the svg language definition says that the attribute is not animated. because the svg language definition states that externalresourcesrequired cannot be animated, the animval will always be the same as the baseval. methods this interface doesn't implement any specific methods. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgexternalresourcesrequired' in that specification. recommendation initial definition ...
SVGFEBlendElement - Web APIs
nt.mode read only an svganimatedenumeration corresponding to the mode attribute of the given element. it takes one of the svg_feblend_mode_* constants defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfeblendelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeblendelement' in that specification. recommendation initial definition ...
SVGFEColorMatrixElement - Web APIs
_type_* constants defined on this interface. svgfecolormatrixelement.values read only an svganimatednumberlist corresponding to the values attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement , and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfecolormatrixelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecolormatrixelement' in that specification. recommendation initial definition ...
SVGFEComponentTransferElement - Web APIs
s properties of svgfilterprimitivestandardattributes. svgfecomponenttransferelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfecomponenttransferelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecomponenttransferelement' in that specification. recommendation initial definition ...
SVGFECompositeElement - Web APIs
operator_* constants defined on this interface. svgfecompositeelement.values read only an svganimatednumberlist corresponding to the values attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfecompositeelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecompositeelement' in that specification. recommendation initial definition ...
SVGFEConvolveMatrixElement - Web APIs
attribute of the given element. svgfeconvolvematrixelement.preservealpha read only an svganimatedboolean corresponding to the preservealpha attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfeconvolvematrixelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeconvolvematrixelement' in that specification. recommendation initial definition ...
SVGFEDiffuseLightingElement - Web APIs
ment. svgfediffuselightingelement.kernelunitlengthy read only an svganimatednumber corresponding to the y component of the kernelunitlength attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfediffuselightingelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfediffuselightingelement' in that specification. recommendation initial definition ...
SVGFEDisplacementMapElement - Web APIs
ad only an svganimatedenumeration corresponding to the ychannelselect attribute of the given element. it takes one of the svg_channel_* constants defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfedisplacementmapelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedisplacementmapelement' in that specification. recommendation initial definition ...
SVGFEDistantLightElement - Web APIs
htelement.azimuth read only an svganimatednumber corresponding to the azimuth attribute of the given element. svgfedistantlightelement.elevation read only an svganimatednumber corresponding to the elevation attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgfedistantlightelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedistantlightelement' in that specification. recommendation initial definition ...
SVGFEDropShadowElement - Web APIs
orresponding to the (possibly automatically computed) y component of the stddeviationy attribute of the given element. methods this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. svgfedropshadowelement.setstddeviation() sets the values for the stddeviation attribute. specifications specification status comment filter effects module level 1the definition of 'svgfedropshadowelement' in that specification. working draft initial definition ...
SVGFEFloodElement - Web APIs
mplement any specific properties, but inherits properties from its parent interface, svgelement, and implements properties from svgfilterprimitivestandardattributes. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement, and implements methods from svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefloodelement' in that specification. recommendation initial definition ...
SVGFEFuncAElement - Web APIs
/div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement. methods this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement. specifications specification status comment filter effects module level 1the definition of 'svgfefuncaelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncaelement' in that specification. recommendation initial definition ...
SVGFEFuncBElement - Web APIs
/div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement. methods this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement. specifications specification status comment filter effects module level 1the definition of 'svgfefuncbelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncbelement' in that specification. recommendation initial definition ...
SVGFEFuncGElement - Web APIs
/div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement. methods this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement. specifications specification status comment filter effects module level 1the definition of 'svgfefuncgelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncgelement' in that specification. recommendation initial definition ...
SVGFEFuncRElement - Web APIs
/div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface not provide any specific properties, but inherits properties from its parent interface, svgcomponenttransferfunctionelement. methods this interface does not provide any specific methods, but implements those of its parent, svgcomponenttransferfunctionelement. specifications specification status comment filter effects module level 1the definition of 'svgfefuncrelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncrelement' in that specification. recommendation initial definition ...
SVGFEGaussianBlurElement - Web APIs
to the edgemode attribute of the given element. takes one of the svg_edgemode_* constants defined on this interface. methods this interface also inherits methods of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. svgfegaussianblurelement.setstddeviation() sets the values for the stddeviation attribute. specifications specification status comment filter effects module level 1the definition of 'svgfegaussianblurelement' in that specification. working draft added edgemode property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfegaussianblurelement' in that specification. recommendation initial definition ...
SVGFEImageElement - Web APIs
element. svgfeimageelement.crossorigin read only an svganimatedstring reflects the crossorigin attribute of the given element, limited to only known values. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and implements methods of svgfilterprimitivestandardattributesand svgurireference. specifications specification status comment filter effects module level 1the definition of 'svgfeimageelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeimageelement' in that specification. recommendation initial definition ...
SVGFEMergeElement - Web APIs
ace not provide any specific properties, but inherits properties from its parent interface, svgelement, and also implements properties of svgfilterprimitivestandardattributes. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergeelement' in that specification. recommendation initial definition ...
SVGFEMergeNodeElement - Web APIs
095dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement. svgfemergenodeelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgfemergenodeelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergenodeelement' in that specification. recommendation initial definition ...
SVGFEMorphologyElement - Web APIs
ttribute of the given element. svgfemorphologyelement.radiusy read only an svganimatednumber corresponding to the y component of the radius attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfemorphologyelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemorphologyelement' in that specification. recommendation initial definition ...
SVGFEOffsetElement - Web APIs
number corresponding to the dx attribute of the given element. svgfeoffsetelement.dy read only an svganimatednumber corresponding to the dy attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfeoffsetelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeoffsetelement' in that specification. recommendation initial definition ...
SVGFEPointLightElement - Web APIs
given element. svgfepointlightelement.y read only an svganimatednumber corresponding to the y attribute of the given element. svgfepointlightelement.z read only an svganimatednumber corresponding to the z attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgfepointlightelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfepointlightelement' in that specification. recommendation initial definition ...
SVGFESpecularLightingElement - Web APIs
ent. svgfespecularlightingelement.kernelunitlengthy read only an svganimatednumber corresponding to the y component of the kernelunitlength attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfespecularlightingelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespecularlightingelement' in that specification. recommendation initial definition ...
SVGFESpotLightElement - Web APIs
only an svganimatednumber corresponding to the specularexponent attribute of the given element. svgfespotlightelement.limitingconeangle read only an svganimatednumber corresponding to the limitingconeangle attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment filter effects module level 1the definition of 'svgfespotlightelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespotlightelement' in that specification. recommendation initial definition ...
SVGFETileElement - Web APIs
mplements properties of svgfilterprimitivestandardattributes. svgfetileelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfetileelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfetileelement' in that specification. recommendation initial definition ...
SVGFETurbulenceElement - Web APIs
read only an svganimatedenumeration corresponding to the type attribute of the given element. it takes one of the svg_turbulence_type_* constants defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgelement, and also implements methods of svgfilterprimitivestandardattributes. specifications specification status comment filter effects module level 1the definition of 'svgfeturbulenceelement' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeturbulenceelement' in that specification. recommendation initial definition ...
SVGFilterElement - Web APIs
an svganimatedinteger that contains the x component of the filterres attribute of the given <filter> element. svgfilterelement.filterresy read only an svganimatedinteger that contains the y component of the filterres attribute of the given <filter> element. methods svgfilterelement.setfilterres() sets the values of the filterres attribute. specifications specification status comment filter effects module level 1the definition of 'svgfilterelement' in that specification. working draft removed the inheritance from svglangspace, svgexternalresourcesrequired, svgstylable, and svgunittypes and removed the setfilterres() function scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterelement' in that specification. reco...
SVGFilterPrimitiveStandardAttributes - Web APIs
given element. svgfilterprimitivestandardattributes.height read only an svganimatedlength corresponding to the height attribute of the given element. svgfilterprimitivestandardattributes.result read only an svganimatedstring corresponding to the result attribute of the given element. methods this interface does not provide any specific methods. specifications specification status comment filter effects module level 1the definition of 'svgfilterprimitivestandardattributes' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterprimitivestandardattributes' in that specification. recommendation initial definition ...
SVGFontElement - Web APIs
recommendation initial definition ...
SVGFontFaceElement - Web APIs
recommendation initial definition ...
SVGFontFaceFormatElement - Web APIs
recommendation initial definition ...
SVGFontFaceNameElement - Web APIs
recommendation initial definition ...
SVGFontFaceSrcElement - Web APIs
recommendation initial definition ...
SVGFontFaceUriElement - Web APIs
recommendation initial definition ...
SVGForeignObjectElement - Web APIs
rresponding to the width attribute of the given <foreignobject> element. svgforeignobjectelement.height read only an svganimatedlength corresponding to the height attribute of the given <foreignobject> element. methods this interface has no methods but inherits methods from its parent, svggraphicselement and implements methods from svgurireference. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgforeignobjectelement' in that specification. candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement and svgurireference scalable vector graphics (svg) 1.1 (second edition)the definition of...
SVGGElement - Web APIs
ext></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svggraphicselement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the definit...
SVGGeometryElement.getPointAtLength() - Web APIs
as originally part of the svgpathelement interface. svg 2 introduced the svggeometryelement interface and moved the property to it. syntax dompoint someelement.getpointatlength(float distance); parameters distance a float referring to the distance along the path. return value a dompoint indicating the point at a given distance along the path. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification. candidate recommendation initial definition ...
SVGGeometryElement.getTotalLength() - Web APIs
he user agent's computed value for the total length of the path in user units. note: this method was originally part of the svgpathelement interface. svg 2 introduced the svggeometryelement interface and moved the property to it. syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification. candidate recommendation initial definition ...
SVGGeometryElement.isPointInFill() - Web APIs
candidate recommendation initial definition ...
SVGGeometryElement.isPointInStroke() - Web APIs
candidate recommendation initial definition ...
SVGGeometryElement.pathLength - Web APIs
the svggeometryelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units. note: this property was originally part of the svgpathelement interface. svg 2 introduced the svggeometryelement interface and moved the property to it. syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.pathlength' in that specification. candidate recommendation initial definition ...
SVGGeometryElement - Web APIs
rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the stroke. svggeometryelement.gettotallength() returns the user agent's computed value for the total length of the path in user units. svggeometryelement.getpointatlength() returns the point at a given distance along the path. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement' in that specification. candidate recommendation initial definition ...
SVGGlyphElement - Web APIs
dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification. properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphelement' in that specification. recommendation initial definition ...
SVGGlyphRefElement - Web APIs
tribute of the given element. svgglyphrefelement.dx a float corresponding to the dx attribute of the given element. svgglyphrefelement.dy a float corresponding to the dy attribute of the given element. methods this interface has no methods but inherits methods from its parent, svgelement and implements methods from svgurireference and svgstylable. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphrefelement' in that specification. recommendation initial definition ...
SVGGradientElement - Web APIs
bute gradienttransform on the given element. svggradientelement.spreadmethod read only returns an svganimatedenumeration corresponding to attribute spreadmethod on the given element. one of the spread method types defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggradientelement' in that specification. candidate recommendation removed inheritance of svgexternalresourcesrequired, svgstylable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggradientelement' in that specification. recommendation initial definition ...
SVGGraphicsElement: copy event - Web APIs
clipboard api and events working draft initial definition ...
SVGGraphicsElement: cut event - Web APIs
ing updated. so an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually remove the selection from the document. the handler cannot read the clipboard data. it's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents. specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements. clipboard api and events working draft initial definition ...
getBBox() - Web APIs
recommendation initial definition (applies to svg elements only). ...
SVGGraphicsElement: paste event - Web APIs
clipboard api and events working draft initial definition ...
SVGGraphicsElement - Web APIs
) returns a dommatrix representing the matrix that transforms the current element's coordinate system to its svg viewport's coordinate system. svggraphicselement.getscreenctm() returns a dommatrix representing the matrix that transforms the current element's coordinate system to the coordinate system of the svg viewport for the svg document fragment. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggraphicselement' in that specification. candidate recommendation initial definition ...
SVGHKernElement - Web APIs
recommendation initial definition ...
SVGImageElement.decode - Web APIs
es asynchronous decoding of an image, returning a promise that resolves once the image data is ready for use. syntax var promise = svgimageelement.decode(); parameters none. return value a promise which resolves once the image data is ready to be used, such as by appending it to the dom, replacing an existing image, and so forth. exceptions none. specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation initial definition. html living standardthe definition of 'decode()' in that specification. living standard ...
SVGImageElement.decoding - Web APIs
e synchronously for atomic presentation with other content. async: decode the image asynchronously to reduce delay in presenting other content. auto: default mode, which indicates no preference for the decoding mode. the browser decides what is best for the user. examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.svg'; specifications specification status comment html living standardthe definition of 'decoding' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
SVGImageElement.height - Web APIs
the height read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the height attribute of the given <image> element. syntax var height = svgimageelement.height value an svganimatedlength. specifications specification status comment scalable vector graphics (svg) 2the definition of 'height' in that specification. candidate recommendation initial definition. ...
SVGImageElement.preserveAspectRatio - Web APIs
the preserveaspectratio read-only property of the svgimageelement interface returns an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element. syntax var svganimatedpreerveaspectratio = svgimageelement.preserveaspectratio; value an svganimatedpreserveaspectratio. specifications specification status comment scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification. recommendation initial definition ...
SVGImageElement.width - Web APIs
the width read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the width attribute of the given <image> element. syntax var width = svgimageelement.width; value an svganimatedlength. specifications specification status comment scalable vector graphics (svg) 2the definition of 'width' in that specification. candidate recommendation initial definition. ...
SVGImageElement.x - Web APIs
Web › API › SVGImageElement › x
the x read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the x attribute of the given <image> element. syntax var x = svgimageelement.x; value an svganimatedlength. specifications specification status comment scalable vector graphics (svg) 2the definition of 'x' in that specification. candidate recommendation initial definition. ...
SVGImageElement.y - Web APIs
Web › API › SVGImageElement › y
the y read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the y attribute of the given <image> element. syntax var y = svgimageelement.y; value an svganimatedlength. specifications specification status comment scalable vector graphics (svg) 2the definition of 'y' in that specification. candidate recommendation initial definition. ...
SVGImageElement - Web APIs
eelement.y read only an svganimatedlength corresponding to the y attribute of the given <image> element. methods this interface also inherits methods from its parent interface, svggraphicselement. svgimageelement.decode() initiates asynchronous decoding of the image data. returns a promise which resolves once the image data is ready to be used. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgimageelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggraphicselement, removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable and added the crossorigin property. scalable vector graphics (...
SVGLineElement - Web APIs
ad only returns an svganimatedlength that corresponds to attribute x2 on the given <line> element. svglineelement.y2 read only returns an svganimatedlength that corresponds to attribute y2 on the given <line> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggeometryelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggeometryelement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the defi...
SVGLinearGradientElement - Web APIs
animatedlength corresponding to the x2 attribute of the given <lineargradient> element. svglineargradientelement.y2 read only an svganimatedlength corresponding to the y2 attribute of the given <lineargradient> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggradientelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineargradientelement' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineargradientelement' in that specification. recommendation initial definition ...
SVGMPathElement - Web APIs
gmpathelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment svg animations level 2the definition of 'svgmpathelement' in that specification. editor's draft removed the implemented interface svgexternalresourcesrequired. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmpathelement' in that specification. recommendation initial definition ...
SVGMaskElement - Web APIs
nt.width read only an svganimatedlength corresponding to the width attribute of the given <mask> element. svgmaskelement.height read only an svganimatedlength corresponding to the height attribute of the given <mask> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment css masking module level 1the definition of 'svgmaskelement' in that specification. candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmaskelement' in that specification. recommendation i...
SVGMatrix - Web APIs
Web › API › SVGMatrix
urrent matrix and returns the resulting matrix as svgmatrix. svgmatrix.skewy() post-multiplies a skewy transformation on the current matrix and returns the resulting matrix as svgmatrix. exceptions a domexception with the code no_modification_allowed_err is raised when attempting updating a read-only attribute or when the object itself is read-only. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmatrix' in that specification. recommendation initial definition ...
SVGMetadataElement - Web APIs
tadataelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgmetadataelement' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification. recommendation initial definition ...
SVGMissingGlyphElement - Web APIs
recommendation initial definition ...
SVGNumber - Web APIs
Web › API › SVGNumber
ch means that attempts to modify the object will result in an exception being thrown. properties svgnumber.value a float representing the number. note: if the svgnumber is read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value. methods this interface doesn't provide any specific methods. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgnumber' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgnumber' in that specification. recommendation initial definition ...
SVGPathElement.getPointAtLength() - Web APIs
the path. note: in svg 2 this property was moved to the svggeometryelement interface, from which the svgpathelement inherits it. syntax svgpoint someelement.getpointatlength(float distance); parameters distance a float referring to the distance along the path. return value an svgpoint indicating the point at a given distance along the path. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification. recommendation initial definition ...
SVGPathElement.getTotalLength() - Web APIs
.gettotallength() method returns the user agent's computed value for the total length of the path in user units. note: in svg 2 this method was moved to the svggeometryelement interface, from which the svgpathelement inherits it. syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification. recommendation initial definition ...
SVGPathElement.pathLength - Web APIs
the svgpathelement.pathlength property reflects the pathlength attribute and returns the total length of the path, in user units. note: in svg 2 this property was moved to the svggeometryelement interface, from which the svgpathelement inherits it. syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.pathlength' in that specification. recommendation initial definition ...
SVGPathElement - Web APIs
returns a stand-alone, parentless svgpathsegcurvetocubicsmoothrel object. svgpathelement.createsvgpathsegcurvetoquadraticsmoothabs() returns a stand-alone, parentless svgpathsegcurvetoquadraticsmoothabs object. svgpathelement.createsvgpathsegcurvetoquadraticsmoothrel() returns a stand-alone, parentless svgpathsegcurvetoquadraticsmoothrel object. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpathelement' in that specification. candidate recommendation removed the getpathsegatlength() and createsvgpathseg* methods and moved the pathlength property and the gettotallength() and getpointatlength() methods to svggeometryelement. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svg...
SVGPatternElement - Web APIs
of the given <pattern> element. svgpatternelement.height read only an svganimatedenumeration corresponding to the height attribute of the given <pattern> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement and implements the ones from svgfittoviewbox and svgurireference. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpatternelement' in that specification. candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpatternelement' in that specification. recomme...
SVGPolygonElement - Web APIs
ext { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent, svggeometryelement and also implements properties from svganimatedpoints. methods this interface doesn't implement any specific methods, but inherits methods from its parent, svggeometryelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolygonelement' in that specification. candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolygonelement' in that...
SVGPolylineElement - Web APIs
ext { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent, svggeometryelement and also implements properties from svganimatedpoints. methods this interface doesn't implement any specific methods, but inherits methods from its parent, svggeometryelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolylineelement' in that specification. candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolylineelement' in th...
SVGRadialGradientElement - Web APIs
animatedlength corresponding to the fx attribute of the given <radialgradient> element. svgradialgradientelement.fy read only an svganimatedlength corresponding to the fy attribute of the given <radialgradient> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggradientelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgradialgradientelement' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgradialgradientelement' in that specification. recommendation initial definition ...
SVGRect - Web APIs
Web › API › SVGRect
h of the rectangle.a value that is negative results to an error. a value of zero disables rendering of the element svgrect.height this represents the height of the rectangle.a value that is negative results to an error.a value of zero disables rendering of the element. methods this interface also inherits properties from its parent, domrectreadonly. specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification. candidate recommendation changed svgrect as a legacy alias of domrect. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrect' in that specification. recommendation initial definition ...
SVGRectElement - Web APIs
nclick="dorectclick();">click me</text> </svg> javascript content function dorectclick(){ var myrect = document.getelementbyid('myrect'); var r = math.floor(math.random() * 255); var g = math.floor(math.random() * 255); var b = math.floor(math.random() * 255); myrect.style.fill = 'rgb(' + r + ', ' + g + ' , ' + b + ')'; } click the rect. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgrectelement' in that specification. candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrectelement' in that speci...
SVGRenderingIntent - Web APIs
value relative-colorimetric. rendering_intent_saturation 4 corresponds to the value saturation. rendering_intent_absolute_colorimetric 5 corresponds to the value absolute-colorimetric. properties this interface doesn't implement any specific properties. methods this interface doesn't implement any specific methods. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrenderingintent' in that specification. recommendation initial definition ...
SVGSVGElement - Web APIs
vgtransform::matrix. svgsvgelement.getelementbyid() searches this svg document fragment (i.e., the search is restricted to a subset of the document tree) for an element whose id is given by elementid. if an element is found, that element is returned. if no such element exists, returns null. behavior is not defined if more than one element has this id. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgsvgelement' in that specification. candidate recommendation replaced the inheritance from svgelement by svggraphicselement, removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, svglocatable, documentevent, viewcss, and documentcss and added implemented interface win...
SVGScriptElement - Web APIs
d with the code no_modification_allowed_err on an attempt to change the value of a read only attribut. svgscriptelement.crossorigin read only a domstring corresponding to the crossorigin attribute of the given <script> element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgscriptelement' in that specification. candidate recommendation removed the implemented interface svgexternalresourcesrequired and added the crossorigin property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgscriptelement' in that specification. recommendation initial definiti...
SVGSetElement - Web APIs
t></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svganimationelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svganimationelement. specifications specification status comment svg animations level 2the definition of 'svgsetelement' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsetelement' in that specification. recommendation initial definition ...
SVGStopElement - Web APIs
dd; pointer-events: all;} properties this interface also inherits properties from its parent interface, svgelement. svgstopelement.offset read only an svganimatednumber corresponding to the offset of the given element. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstopelement' in that specification. candidate recommendation removed inheritance from svgstylable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgstopelement' in that specification. recommendation initial definition ...
SVGStyleElement - Web APIs
ement. svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute. this restriction was removed in svg 2. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement and implements methods from linkstyle. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstyleelement' in that specification. candidate recommendation added inheritance of linkstyle. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgstyleelement' in that specification. recommendation initial definition ...
SVGSwitchElement - Web APIs
ext></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svggraphicselement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgswitchelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the de...
SVGSymbolElement - Web APIs
this interface doesn't implement any specific properties, but inherits properties from its parent interface, svggraphicselement, and implements properties from svgfittoviewbox. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement, and implements methods from svgfittoviewbox. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgsymbolelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svglangspace, svgexternalresourcesrequired, and svgstylable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsymbolelemen...
SVGTRefElement - Web APIs
recommendation initial definition ...
SVGTSpanElement - Web APIs
53" text-anchor="middle" alignment-baseline="middle">svgtspanelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't provide any specific properties, but inherits the properties from its parent, svgtextpositioningelement. methods this interface doesn't provide any specific methods. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtspanelement' in that specification. candidate recommendation no changes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtspanelement' in that specification. recommendation initial definition ...
SVGTests - Web APIs
Web › API › SVGTests
ons read only an svgstringlist corresponding to the requiredextensions attribute of the given element. svgtests.systemlanguage read only an svgstringlist corresponding to the systemlanguage attribute of the given element. methods svgtests.hasextension() read only returns true if the browser supports the given extension, specified by a uri. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtests' in that specification. candidate recommendation removed requiredfeatures property and hasextension() method. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtests' in that specification. recommendation initial definition ...
SVGTextContentElement - Web APIs
returns a long representing the character which caused a text glyph to be rendered at a given position in the coordinate system. because the relationship between characters and glyphs is not one-to-one, only the first character of the relevant typographic character is returned svgtextcontentelement.selectsubstring() selects text within the element. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextcontentelement' in that specification. candidate recommendation changed inheritance from svgelement to svggraphicselement and getstartpositionofchar() and removed implementations of svgtests, svglangspace, svgexternalresourcesrequired, svgstylable interfaces and getendpositionofchar() to return a dompoint instead ...
SVGTextElement - Web APIs
</div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgtextpositioningelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgtextpositioningelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextelement' in that specification. candidate recommendation removed the implemented interface svgtransformable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextelement' in that specification. recommendation initial definition ...
SVGTextPathElement - Web APIs
acing read only an svganimatedenumeration corresponding to the spacing attribute of the given element. it takes one of the textpath_spacingtype_* constants defined on this interface. methods this interface does not provide any specific methods, but implements those of its parent, svgtextcontentelement, and also implements methods of svgurireference. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpathelement' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpathelement' in that specification. recommendation initial definition ...
SVGTextPositioningElement - Web APIs
.dy read only returns an svganimatedlengthlist reflecting the dy attribute of the given element. svgtextpositioningelement.rotate read only returns an svganimatednumberlist reflecting the rotate attribute of the given element. methods this interface doesn't provide any specific methods, but inherits methods from its parent, svgtextcontentelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpositioningelement' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpositioningelement' in that specification. recommendation initial definition ...
SVGTitleElement - Web APIs
gtitleelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtitleelement' in that specification. candidate recommendation removed inheritance from svglangspace and svgstylable. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtitleelement' in that specification. recommendation initial definition ...
SVGTransformList - Web APIs
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtransformlist' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structure...
SVGURIReference - Web APIs
are defined to support it, the deprecated xlink:href attribute. on getting href, an svganimatedstring object is returned that reflects the href attribute, and if the element is defined to support the deprecated xlink:href attribute, additionally reflects that deprecated attribute. methods this interface does not provide any specific methods. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgurireference' in that specification. candidate recommendation replaced the deprecated xlink:href attribute reference by the href attribute and made the prior only be reflected where it's defined to be supported. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgurireference' in that spe...
SVGUnitTypes - Web APIs
ch an existing value to this type. svg_unit_type_userspaceonuse 1 corresponds to the value userspaceonuse. svg_unit_type_objectboundingbox 2 corresponds to the value objectboundingbox. properties this interface doesn't implement any specific properties. methods this interface doesn't implement any specific methods. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgunittypes' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgunittypes' in that specification. recommendation initial definition ...
SVGUseElement - Web APIs
element does not have a shadow tree (for example, because its uri is invalid or because it has been disabled by conditional processing), then getting this attribute returns null. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement and implements methods from svgurireference. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svguseelement' in that specification. candidate recommendation redefined the properties instanceroot and animatedinstanceroot. scalable vector graphics (svg) 1.1 (second edition)the definition of 'svguseelement' in that specification. recommendation initial definition ...
SVGVKernElement - Web APIs
recommendation initial definition ...
SVGViewElement - Web APIs
the given <view> element. a list of domstring values which contain the names listed in the viewtarget attribute. each of the domstring values can be associated with the corresponding element using the getelementbyid() method call. methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgviewelement' in that specification. candidate recommendation removed a mixin svgexternalresourcesrequired scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgviewelement' in that specification. recommendation initial definition ...
Screen.availHeight - Web APIs
he result is something similar to the below. note the panels window filling all available vertical space at the left of the screen. on a windows system, this would function similarly, by opening the window and sizing it vertically so it uses all available vertical space, leaving room for the taskbar and any other interface elements that reserve space. specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availheight' in that specification. working draft initial definition. ...
Screen.availWidth - Web APIs
Web › API › Screen › availWidth
the screen.availwidth property returns the amount of horizontal space (in pixels) available to the window. syntax var width = window.screen.availwidth example var screenavailwidth = window.screen.availwidth; console.log(screenavailwidth); specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availwidth' in that specification. working draft initial definition ...
Screen.colorDepth - Web APIs
Web › API › Screen › colorDepth
f the screen. per the cssom, some implementations return 24 for compatibility reasons. see the browser compatibility section for those that don't. syntax bitdepth = window.screen.colordepth; example // check the color depth of the screen if ( window.screen.colordepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen.colordepth' in that specification. working draft ...
Screen.height - Web APIs
Web › API › Screen › height
working draft ...
Screen.lockOrientation() - Web APIs
working draft initial definition (not present in the draft anymore) ...
Screen.onorientationchange - Web APIs
warning: this is a non-standard deprecated feature which was implemented only in firefox under a different name. use screenorientation.onchange instead. an event handler for the orientationchange events sent to the screen object. syntax screen.onorientationchange = funcref; where funcref is a reference to a function. specifications specification status comment screen orientation apithe definition of 'onorientationchange' in that specification. working draft initial definition (not present in the draft anymore) ...
Screen.orientation - Web APIs
=== "landscape-secondary") { console.log("mmmh... the screen is upside down!"); } else if (orientation === "portrait-secondary" || orientation === "portrait-primary") { console.log("mmmh... you should rotate your device to landscape"); } else if (orientation === undefined) { console.log("the orientation api isn't supported in this browser :("); } specifications specification status comment screen orientation apithe definition of 'orientation' in that specification. working draft initial definition ...
Screen.pixelDepth - Web APIs
Web › API › Screen › pixelDepth
e implementations return 24 for compatibility reasons. see the browser compatibility section for those that don't. syntax let depth = window.screen.pixeldepth example // if there is not adequate bit depth // choose a simpler color if ( window.screen.pixeldepth > 8 ) { document.style.color = "#faebd7"; } else { document.style.color = "#ffffff"; } specifications specification status comment css object model (cssom) view modulethe definition of 'screen.pixeldepth' in that specification. working draft initial definition. ...
Screen.unlockOrientation() - Web APIs
ation was successfully unlocked or false if the orientation couldn't be unlocked. example var unlockorientation = screen.unlockorientation || screen.mozunlockorientation || screen.msunlockorientation || (screen.orientation && screen.orientation.unlock); if (unlockorientation()) { // orientation was unlocked } else { // orientation unlock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification. working draft initial definition (not present in the draft anymore) ...
Screen.width - Web APIs
Web › API › Screen › width
window itself. when other widgets occupy space that cannot be used by the window object, there is a difference in window.screen.width and window.screen.availwidth. see also screen.height. internet explorer will take into account the zoom setting when reporting the screen width. it will only return the real width of the screen if the zoom is set to 100%. specification specification status comment css object model (cssom) view modulethe definition of 'screen.width' in that specification. working draft initial definition. ...
Screen - Web APIs
Web › API › Screen
des a couple of extensions for use by js-implemented event targets to implement onevent properties. see also webidl bindings. void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen' in that specification. working draft initial definition. ...
ScreenOrientation.angle - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
ScreenOrientation.lock() - Web APIs
locks the orientation of the containing document to its default orientation. syntax screenorientation.lock(orientation) parameters orientation an orientation lock type. one of the following: "any" "natural" "landscape" "portrait" "portrait-primary" "portrait-secondary" "landscape-primary" "landscape-secondary" return value a promise. specifications specification status comment screen orientation apithe definition of 'lock()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinte...
ScreenOrientation.onchange - Web APIs
working draft initial definition. ...
ScreenOrientation.type - Web APIs
working draft initial definition. ...
ScreenOrientation.unlock() - Web APIs
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
ScreenOrientation - Web APIs
t handlers screenorientation.onchange the eventhandler called whenever the screen changes orientation. methods screenorientation.lock() locks the orientation of the containing document to its default orientation and returns a promise. screenorientation.unlock() unlocks the orientation of the containing document from its default orientation. specifications specification status comment screen orientation apithe definition of 'screenorientation' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
Screen Capture API - Web APIs
an specify a desire to use the screen capture api using the policy control directive display-capture: <iframe allow="display-capture" src="/some-other-document.html"> the default allow list is self, which lets the any content within the document use screen capture. see using feature policy for a more in-depth explanation of how feature policy is used. specifications specification status comment screen capture working draft initial definition ...
Screen Orientation API - Web APIs
browser compatibility screenorientation the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
ScriptProcessorNode: audioprocess event - Web APIs
working draft ...
ScriptProcessorNode.bufferSize - Web APIs
working draft ...
ScriptProcessorNode.onaudioprocess - Web APIs
working draft ...
ScriptProcessorNode - Web APIs
working draft ...
ScrollToOptions.behavior - Web APIs
working draft ...
ScrollToOptions.left - Web APIs
working draft ...
ScrollToOptions.top - Web APIs
working draft ...
ScrollToOptions - Web APIs
working draft ...
SecurityPolicyViolationEvent.blockedURI - Web APIs
yviolationevent interface is a usvstring representing the uri of the resource that was blocked because it violates a policy. syntax let blockeduri = violationeventinstance.blockeduri; value a usvstring representing the uri of the blocked resource. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); }); specifications specification status comment content security policy level 3the definition of 'blockeduri' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.columnNumber - Web APIs
typolicyviolationevent interface is the column number in the document or worker at which the violation occurred. syntax let colnum = violationeventinstance.columnnumber; value a number representing the column number where the violation occurred. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.columnnumber); }); specifications specification status comment content security policy level 3the definition of 'columnnumber' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.disposition - Web APIs
ated by the user agent. syntax let disposition = violationeventinstance.disposition; value a value defined in the securitypolicyviolationeventdisposition enum representing the uri of the blocked resource. possible values are "enforce" or "report" example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.disposition); }); specifications specification status comment content security policy level 3the definition of 'disposition' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.documentURI - Web APIs
tring representing the uri of the document or worker in which the violation was found. syntax let documenturi = violationeventinstance.documenturi; value a usvstring representing the uri of the document or worker in which the violation was found. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.documenturi); }); specifications specification status comment content security policy level 3the definition of 'documenturi' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
ace is a domstring representing the directive whose enforcement uncovered the violation. syntax let effdir = violationeventinstance.effectivedirective; value a domstring representing the directive whose enforcement uncovered the violation. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.effectivedirective); }); specifications specification status comment content security policy level 3the definition of 'effectivedirective' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.lineNumber - Web APIs
itypolicyviolationevent interface is the line number in the document or worker at which the violation occurred. syntax let linenumber = violationeventinstance.linenumber; value a number representing the line number at which the violation occurred. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.linenumber); }); specifications specification status comment content security policy level 3the definition of 'linenumber' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.originalPolicy - Web APIs
event interface is a domstring containing the policy whose enforcement uncovered the violation. syntax let origpolicy = violationeventinstance.originalpolicy; value a domstring representing the policy whose enforcement uncovered the violation. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.originalpolicy); }); specifications specification status comment content security policy level 3the definition of 'originalpolicy' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.referrer - Web APIs
s a usvstring representing the referrer of the resources whose policy was violated. this will be a url or null. syntax let referrer = violationeventinstance.referrer; value a usvstring representing the url of the referrer of the violating resources. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.referrer); }); specifications specification status comment content security policy level 3the definition of 'referrer' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.sample - Web APIs
containing a sample of the resource that caused the violation, usually the first 40 characters. this will only be populated if the resource is an inline script, event handler, or style — external resources causing a violation will not generate a sample. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sample); }); specifications specification status comment content security policy level 3the definition of 'sample' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.sourceFile - Web APIs
a usvstring representing the uri of the document or worker in which the violation was found. syntax let source = violationeventinstance.sourcefile; value a usvstring representing the uri of the document or worker in which the violation was found. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sourcefile); }); specifications specification status comment content security policy level 3the definition of 'sourcefile' in that specification. working draft initial definition ...
SecurityPolicyViolationEvent.violatedDirective - Web APIs
is a domstring representing the directive whose enforcement uncovered the violation. syntax let violateddir = violationeventinstance.violateddirective; value a domstring representing the directive whose enforcement uncovered the violation. example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.violateddirective); }); specifications specification status comment content security policy level 3the definition of 'violateddirective' in that specification. working draft initial definition ...
Selection.addRange() - Web APIs
working draft current ...
Selection.anchorNode - Web APIs
o right (in document order) or right to left (reverse of document order). the anchor is where the user began the selection. this can be visualized by holding the shift key and pressing the arrow keys on your keyboard. the selection's anchor does not move, but the selection's focus, the other end of the selection, does move. syntax node = sel.anchornode specifications specification status comment selection apithe definition of 'selection.anchornode' in that specification. working draft current ...
Selection.anchorOffset - Web APIs
working draft current ...
Selection.collapse() - Web APIs
), i.e. all ranges will be removed from the selection. offset optional the offset in node to which the selection will be collapsed. if not specified, the default value 0 is used. examples /* place the caret at the beginning of an html document's body. */ var body = document.getelementsbytagname("body")[0]; window.getselection().collapse(body,0); specifications specification status comment selection apithe definition of 'selection.collapse()' in that specification. working draft ...
Selection.collapseToEnd() - Web APIs
the selection.collapsetoend() method collapses the selection to the end of the last range in the selection. if the content of the selection is focused and editable, the caret will blink there. syntax sel.collapsetoend() parameters none. specifications specification status comment selection apithe definition of 'selection.collapsetoend()' in that specification. working draft current ...
Selection.collapseToStart() - Web APIs
the selection.collapsetostart() method collapses the selection to the start of the first range in the selection. if the content of the selection is focused and editable, the caret will blink there. syntax sel.collapsetostart() parameters none. specifications specification status comment selection apithe definition of 'selection.collapsetostart()' in that specification. working draft current ...
Selection.containsNode() - Web APIs
working draft current ...
Selection.deleteFromDocument() - Web APIs
agraph. once you do, you can remove the selected content by clicking the button below.</p> <button>delete selected text</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', deleteselection); function deleteselection() { let selection = window.getselection(); selection.deletefromdocument(); } result specifications specification status comment selection apithe definition of 'selection.deletefromdocument()' in that specification. working draft current ...
Selection.extend() - Web APIs
Web › API › Selection › extend
e anchor of the selection does not move. the selection will be from the anchor to the new focus, regardless of direction. syntax sel.extend(node, offset) parameters node the node within which the focus will be moved. offset optional the offset position within node where the focus will be moved to. if not specified, the default value 0 is used. specifications specification status comment selection apithe definition of 'selection.extend()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explo...
Selection.focusNode - Web APIs
or right to left (reverse of document order). the focus is where the user ended the selection. this can be visualized by holding the shift key and pressing the arrow keys on your keyboard to modify the current selection. the selection's focus moves, but the selection's anchor, the other end of the selection, does not move. syntax node = sel.focusnode specifications specification status comment selection apithe definition of 'selection.focusnode' in that specification. working draft current ...
Selection.focusOffset - Web APIs
working draft current ...
Selection.getRangeAt() - Web APIs
or equal to selection.rangecount will result in an error. return value the specified range object. example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.rangecount; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification. working draft current ...
Selection.isCollapsed - Web APIs
hen the selection's start and end points are at the same position in the content. keep in mind that a collapsed selection may still have one (or more, in gecko) ranges, so selection.rangecount may not be zero. in that scenario, calling a selection object's getrangeat() method may return a range object which is collapsed. syntax bool = sel.iscollapsed specifications specification status comment selection apithe definition of 'selection.iscollapsed' in that specification. working draft current ...
Selection.rangeCount - Web APIs
working draft current ...
Selection.removeAllRanges() - Web APIs
working draft current browser compatibility the compatibility table on this page is generated from structured data. ...
Selection.removeRange() - Web APIs
e) parameters range a range object that will be removed to the selection. return value undefined examples /* programmaticaly, more than one range can be selected. * this will remove all ranges except the first. */ s = window.getselection(); if(s.rangecount > 1) { for(var i = 1; i < s.rangecount; i++) { s.removerange(s.getrangeat(i)); } } specifications specification status comment selection apithe definition of 'selection.removerange()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ...
Selection.selectAllChildren() - Web APIs
working draft current definition ...
Selection.setBaseAndExtent() - Web APIs
working draft ...
Selection.toString() - Web APIs
a string representing the selection. description this method returns the currently selected text. in javascript, this method is called automatically when a function the selection object is passed to requires a string: alert(window.getselection()) // what is called alert(window.getselection().tostring()) // what is actually being effectively called. specifications specification status comment selection apithe definition of 'selection: tostring()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ex...
Selection.type - Web APIs
Web › API › Selection › type
time a new selection is made. console.log(selection.type) will return caret or range depending on whether the caret is placed at a single point in the text, or a range has been selected. var selection; document.onselectionchange = function() { console.log('new selection made'); selection = document.getselection(); console.log(selection.type); }; specifications specification status comment selection apithe definition of 'selection.type' in that specification. working draft current ...
Selection - Web APIs
Web › API › Selection
of nodes (such as a portion of a text node). a user will normally only select a single range at a time, but it's possible for a user to select multiple ranges (e.g., by using the control key). a range can be retrieved from a selection as a range object. range objects can also be created via the dom and programmatically added or removed from a selection. specifications specification status comment selection apithe definition of 'selection' in that specification. working draft the selection api specification is based on the html editing apis specification and focuses on the selection-related functionality. ...
Selection API - Web APIs
sents the event handler that is called when a selectstart event is fired on the current object (i.e. when a new range of text is about to be selected by the user). globaleventhandlers.onselectionchange represents the event handler that is called when a selectionchange event is fired on the current object (i.e. when the selected text range changes). specifications specification status comment selection apithe definition of 'selection' in that specification. working draft the selection api specification is based on the html editing apis specification and focuses on the selection-related functionality. html editing apisthe definition of 'selection' in that specification. editor's draft initial (older) definition, which is now outdated. bro...
Sensor.activated - Web APIs
Web › API › Sensor › activated
the activated read-only property of the sensor interface returns a boolean indicating whether the sensor is active. syntax var boolean = sensorinstance.activated because sensor is a base class, activated may only be read from one of its derived classes. value a boolean. specifications specification status comment generic sensor apithe definition of 'activated' in that specification. candidate recommendation initial definition. ...
Sensor.hasReading - Web APIs
Web › API › Sensor › hasReading
the hasreading read-only property of the sensor interface returns a boolean indicating whether the sensor has a reading. syntax var boolean = sensorinstance.hasreading because sensor is a base class, hasreading may only be read from one of its derived classes. value a boolean. specifications specification status comment generic sensor apithe definition of 'hasreading' in that specification. candidate recommendation initial definition. ...
Sensor.onactivate - Web APIs
Web › API › Sensor › onactivate
the onactivate eventhandler is called when one of the sensor interface's child interfaces becomes active. syntax sensorinstance.onactivate = function sensorinstance.addeventlistener('activate', function() { ... }) because sensor is a base class, onactivate may only be used on one of its derived classes. specifications specification status comment generic sensor apithe definition of 'onactivate' in that specification. candidate recommendation initial definition. ...
Sensor.onerror - Web APIs
Web › API › Sensor › onerror
the onerror eventhandler is called when an error occurs on one of the child interfaces of the sensor interface. syntax sensorinstance.onerror = function sensorinstance.addeventlistener('error', function() { ... }) because sensor is a base class, onerror may only be used on one of its derived classes. specifications specification status comment generic sensor apithe definition of 'onerror' in that specification. candidate recommendation initial definition. ...
Sensor.onreading - Web APIs
Web › API › Sensor › onreading
the onreading eventhandler is called when a reading is taken on one of the child interfaces of the sensor interface. syntax sensorinstance.onreading = function sensorinstance.addeventlistener('reading', function() { ... }) because sensor is a base class, onreading may only be used on one of its derived classes. specifications specification status comment generic sensor apithe definition of 'onreading' in that specification. candidate recommendation initial definition. ...
Sensor.start() - Web APIs
Web › API › Sensor › start
the start method activates one of the sensors based on sensor. syntax sensor.start() parameters none. return value undefined specifications specification status comment generic sensor apithe definition of 'start' in that specification. candidate recommendation initial definition. ...
Sensor.stop() - Web APIs
Web › API › Sensor › stop
the stop method of the sensor interface deactivates the current sensor. syntax sensor.stop() parameters none. return value undefined example // tbd specifications specification status comment generic sensor apithe definition of 'stop' in that specification. candidate recommendation initial definition. ...
Sensor.timestamp - Web APIs
Web › API › Sensor › timestamp
the timestamp read-only property of the sensor interface returns the time stamp of the latest sensor reading. syntax var timestamp = sensorinstance.timestamp because sensor is a base class, timestamp may only be read from one of its derived classes. value a domhighrestimestamp. specifications specification status comment generic sensor apithe definition of 'timestamp' in that specification. candidate recommendation initial definition. ...
Sensor - Web APIs
Web › API › Sensor
erfaces of the sensor interface. sensor.onreading called when a reading is taken on one of the child interfaces of the sensor interface. sensor.onactivate called when one of the sensor interface's becomes active. methods sensor.start() activates one of the sensors based on sensor. sensor.stop() deactivates one of the sensors based on sensor. specifications specification status comment generic sensor apithe definition of 'sensor' in that specification. candidate recommendation initial definition. ...
SensorErrorEvent.SensorErrorEvent() - Web APIs
new sensorerrorevent object which provides information about errors thrown by any of the interfaces based on sensor. syntax sensorerrorevent = new sensorerrorevent(type, {error: domexception}); parameters type will always be 'sensorerrorevent'. options optional currently only one option is supported: error: an instance of domexception. specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification. candidate recommendation initial definition. ...
SensorErrorEvent.error - Web APIs
the error read-only property of the sensorerrorevent interface returns the domexception object passed in the event's contructor. syntax var domexception = sensorerrorevent.error; value a domexception. specifications specification status comment generic sensor apithe definition of 'error' in that specification. candidate recommendation initial definition. ...
SensorErrorEvent - Web APIs
the sensorerrorevent interface of the sensor apis provides information about errors thrown by a sensor or related interface. constructor sensorerrorevent.sensorerrorevent() creates a new sensorerrorevent object. properties sensorerrorevent.error read only returns the domexception object passed in the event's contructor. specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification. candidate recommendation initial definition. ...
Sensor APIs - Web APIs
rence coordinate system. sensorsecure context the base class for all the other sensor interfaces. this interface cannot be used directly. instead it provides properties, event handlers, and methods accessed by interfaces that inherit from it. sensorerroreventsecure context provides information about errors thrown by a sensor or related interface. specifications specification status comment generic sensor api candidate recommendation initial definition. accelerometer candidate recommendation defines accelerometer and linearaccerationsensor. ambient light sensor candidate recommendation gyroscope candidate recommendation initial definition. magnetometer candidate recommendation orientatio...
Server-sent events - Web APIs
ming messages can be treated as events + data inside the web page. concepts and usage to learn how to use server-sent events, see our article using server-sent events. interfaces eventsource defines all the features that handle connecting to a server, receiving events/data, errors, closing a connection, etc. examples simple sse demo using php specification specification status comment html living standardthe definition of 'server-sent events' in that specification. living standard see also tools eventsource polyfill for node.js remy sharp’s eventsource polyfill yaffle’s eventsource polyfill rick waldron’s jquery plugin intercooler.js declarative sse support related topics ajax javascript websockets other resources ...
ServiceWorker.onstatechange - Web APIs
working draft initial definition ...
ServiceWorker.scriptURL - Web APIs
returns the serviceworker serialized script url defined as part of serviceworkerregistration. must be on the same origin as the document that registers the serviceworker. syntax someurl = serviceworker.scripturl value a usvstring (see the webidl definition of usvstring.) examples tbd specifications specification status comment service workersthe definition of 'scripturl' in that specification. working draft initial definition ...
ServiceWorker.state - Web APIs
working draft initial definition ...
ServiceWorker - Web APIs
working draft initial definition. ...
ServiceWorkerContainer.controller - Web APIs
o a one-off check to see if a service worker's in control. if (navigator.serviceworker.controller) { console.log(`this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification. working draft initial definition ...
ServiceWorkerContainer.getRegistration() - Web APIs
scope optional a unique identifier for a service worker registration — the scope url of the registration object you want to return. this is usually a relative url. return value a promise that resolves to a serviceworkerregistration object or undefined. example navigator.serviceworker.getregistration('/app').then(function(registration) { if(registration){ document.queryselector('#status').textcontent = 'serviceworkerregistration found.'; } }); specifications specification status comment service workersthe definition of 'serviceworkercontainer: getregistration' in that specification. working draft initial definition. ...
ServiceWorkerContainer.getRegistrations() - Web APIs
hod returns a promise that resolves to an array of serviceworkerregistration. syntax serviceworkercontainer.getregistrations().then(function(serviceworkerregistrations) { ... }); parameters none. return value a promise that resolves to an array of serviceworkerregistration objects. example navigator.serviceworker.getregistrations().then(function(registrations) { document.queryselector('#status').textcontent = 'serviceworkerregistrations found.'; }); specifications specification status comment service workersthe definition of 'getregistrations()' in that specification. working draft initial definition. ...
ServiceWorkerContainer: message event - Web APIs
working draft ...
ServiceWorkerContainer.oncontrollerchange - Web APIs
working draft initial definition. ...
ServiceWorkerContainer.onmessage - Web APIs
, for consistency with other web messaging features. (they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkercontainer.onmessage = function(messageevent) { ... } example navigator.serviceworker.onmessage = function(messageevent) { console.log(`received data: ${messageevent.data}`); } specifications specification status comment service workersthe definition of 'serviceworkercontainer: onmessage' in that specification. working draft initial definition. ...
ServiceWorkerContainer.ready - Web APIs
working draft initial definition. ...
ServiceWorkerContainer.register() - Web APIs
working draft initial definition. ...
ServiceWorkerContainer.startMessages() - Web APIs
s(); parameters none. return value undefined. examples if('serviceworker' in navigator) { navigator.serviceworker .register('/sw.js') .then(function() { console.log('service worker registered'); }); } // ... navigator.serviceworker.addeventlistener('message', (e) => { // ... }); navigator.serviceworker.startmessages(); specifications specification status comment service workersthe definition of 'serviceworkercontainer: startmessages()' in that specification. working draft initial definition. ...
ServiceWorkerContainer - Web APIs
navigator.serviceworker.controller); } // then, register a handler to detect when a new or // updated service worker takes control. navigator.serviceworker.oncontrollerchange = function() { console.log('this page is now controlled by:', navigator.serviceworker.controller); }; } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkercontainer' in that specification. working draft initial definition. ...
ServiceWorkerGlobalScope: activate event - Web APIs
working draft ...
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker. syntax var mycachestorage = self.caches; value a cachestorage object. specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification. working draft initial definition. ...
ServiceWorkerGlobalScope.clients - Web APIs
the clients read-only property of the serviceworkerglobalscope interface returns the clients object associated with the service worker. syntax swclients = self.clients value the clients object associated with the specific worker. specifications specification status comment service workersthe definition of 'serviceworkerregistration.clients' in that specification. working draft initial definition. ...
ServiceWorkerGlobalScope: contentdelete event - Web APIs
unknown initial definition. ...
ServiceWorkerGlobalScope: install event - Web APIs
working draft ...
ServiceWorkerGlobalScope: message event - Web APIs
working draft ...
ServiceWorkerGlobalScope: notificationclick event - Web APIs
living standard ...
ServiceWorkerGlobalScope.onactivate - Web APIs
ollowing snippet shows how you could use an activate event handler to upgrade a cache. then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification. working draft initial definition ...
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
mple uses a contentdelete event handler to remove cached content related to the deleted index item. self.addeventlistener('contentdelete', event => { event.waituntil( caches.open('cache-name').then(cache => { return promise.all([ cache.delete(`/icon/${event.id}`), cache.delete(`/content/${event.id}`) ]) }) ); }); specifications specification status comment unknownthe definition of 'contentdelete' in that specification. unknown initial definition. ...
ServiceWorkerGlobalScope.onfetch - Web APIs
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. working draft initial definition ...
ServiceWorkerGlobalScope.oninstall - Web APIs
working draft initial definition. ...
ServiceWorkerGlobalScope.onmessage - Web APIs
ency with other web messaging features. (they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkerglobalscope.onmessage = function(extendablemessageevent) { ... }; example self.addeventlistener('message', function(messageevent) { console.log('handling message event:', messageevent); }) specifications specification status comment service workersthe definition of 'event handlers' in that specification. working draft initial definition ...
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
living standard initial definition. this property is specified on the notifications_api even though it's part of serviceworkerglobalscope. ...
onnotificationclose - Web APIs
an error. syntax serviceworkerglobalscope.onnotificationclose = function(notificationevent) { ... }; serviceworkerglobalscope.addeventlistener('notificationclose', function(notificationevent) { ... }); example //inside a service worker. self.onnotificationclose = function(event) { console.log('on notification close: ', event.notification.tag); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification. living standard initial definition. this property is specified on the notifications_api even though it's part of serviceworkerglobalscope. ...
ServiceWorkerGlobalScope.onpush - Web APIs
working draft initial definition. this event is specified in the push api, but accessed through serviceworkerglobalscope. ...
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
. syntax serviceworkerglobalscope.onpushsubscriptionchange = function() { ... } self.addeventlistener('pushsubscriptionchange', function() { ... }) example self.addeventlistener('pushsubscriptionchange', function() { // do something, usually resubscribe to push and // send the new subscription details back to the // server via xhr or fetch }); specifications specification status comment push apithe definition of 'onpushsubscriptionchange' in that specification. working draft initial definition (note: this event is specified in the push api, but accessed through serviceworkerglobalscope.) ...
ServiceWorkerGlobalScope: push event - Web APIs
or push events that takes json data, parses it, and dispatches the message for handling based on information contained within the message. self.addeventlistener("push", event => { let message = event.data.json(); switch(message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification. working draft initial specification. ...
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
json formatted rendition of the subscription's endpoint to the app server. you can also use the onpushsubscriptionchange event handler property to set up the event handler: self.onpushsubscriptionchange = event => { event.waituntil(swregistration.pushmanager.subscribe(event.oldsubscription.options) .then(subscription => { /* ... */ ) }; specifications specification status comment push apithe definition of 'pushsubscriptionchange' in that specification. working draft initial specification. ...
ServiceWorkerGlobalScope.registration - Web APIs
working draft initial definition. ...
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
activating state, regardless of whether there is already an active service worker. self.addeventlistener('install', function(event) { // the promise that skipwaiting() returns can be safely ignored. self.skipwaiting(); // perform any other actions required for your // service worker to install, potentially inside // of event.waituntil(); }); specifications specification status comment service workersthe definition of 'skipwaiting()' in that specification. working draft initial definition. ...
ServiceWorkerGlobalScope - Web APIs
} 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; }, function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'serviceworkerglobalscope' in that specification. working draft initial definition ...
ServiceWorkerRegistration.active - Web APIs
working draft initial definition. ...
ServiceWorkerRegistration.getNotifications() - Web APIs
return value a promise that resolves to a list of notification objects. example navigator.serviceworker.register('sw.js'); var options = { tag : 'user_alerts' }; navigator.serviceworker.ready.then(function(registration) { registration.getnotifications(options).then(function(notifications) { // do something with your notifications }) }); specifications specification status comment notifications apithe definition of 'serviceworkerregistration.getnotifications()' in that specification. living standard initial definition ...
ServiceWorkerRegistration.index - Web APIs
unknown initial definition. ...
ServiceWorkerRegistration.installing - Web APIs
ling property of the serviceworkerregistration interface returns a service worker whose serviceworker.state is installing. this property is initially set to null. note: this feature is available in web workers. syntax var serviceworker = serviceworkerregistration.installing; value a serviceworker object, if it is currently in an installing state. specifications specification status comment service workersthe definition of 'serviceworkerregistration.installing' in that specification. working draft initial definition. ...
ServiceWorkerRegistration.navigationPreload - Web APIs
the navigationpreload read-only property of the serviceworkerregistration interface returns the navigationpreloadmanager associated with the current service worker registration. syntax var navigationpreloadmanager = serviceworkerregistration.navigationpreload; value an instance of navigationpreloadmanager. specifications specification status comment service workersthe definition of 'navigationpreload' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
ServiceWorkerRegistration.onupdatefound - Web APIs
working draft initial definition. ...
ServiceWorkerRegistration.scope - Web APIs
the scope read-only property of the serviceworkerregistration interface returns a unique identifier for a service worker registration. the service worker must be on the same origin as the document that registers the serviceworker. note: this feature is available in web workers. syntax var swscope = serviceworkerregistration.scope; specifications specification status comment service workersthe definition of 'serviceworkerregistration.scope' in that specification. working draft initial definition. ...
ServiceWorkerRegistration.showNotification() - Web APIs
living standard initial definition. ...
ServiceWorkerRegistration.sync - Web APIs
...
ServiceWorkerRegistration.unregister() - Web APIs
working draft initial definition. ...
ServiceWorkerRegistration.update() - Web APIs
working draft initial definition. ...
ServiceWorkerRegistration.waiting - Web APIs
waiting property of the serviceworkerregistration interface returns a service worker whose serviceworker.state is installed. this property is initially set to null. note: this feature is available in web workers. syntax var serviceworker = serviceworkerregistration.waiting; value a serviceworker object, if it is currently in an installed state. specifications specification status comment service workersthe definition of 'serviceworkerregistration.waiting' in that specification. working draft initial definition. ...
ServiceWorkerState - Web APIs
resolves successfully. no functional events are dispatched until the state becomes activated. activated the service worker in this state is considered an active worker ready to handle functional events. redundant a new service worker is replacing the current service worker, or the current service worker is being discarded due to an install failure. specifications specification status comment service workersthe definition of 'serviceworkerstate' in that specification. working draft initial definition. ...
Service Worker API - Web APIs
erglobalscope of a serviceworker. syncmanager provides an interface for registering and listing sync registrations. windowclient represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. this is a special type of client object, with some additional methods and properties available. specifications specification status comment service workers working draft initial definition. ...
ShadowRoot.host - Web APIs
Web › API › ShadowRoot › host
f the shadowroot returns a reference to the dom element the shadowroot is attached to. syntax const someelement = shadowroot.host value a dom element. examples let customelem = document.queryselector('my-shadow-dom-element'); let shadow = customelem.shadowroot; ... // return the original host element some time later let hostelem = shadow.host; specifications specification status comment domthe definition of 'shadowroot.host' in that specification. living standard ...
ShadowRoot.mode - Web APIs
Web › API › ShadowRoot › mode
the shadowrootmode enum — either open or closed. examples let customelem = document.queryselector('my-shadow-dom-element'); let shadow = customelem.shadowroot; // another way to check whether the shadow root is open; it will return null if not if(shadow) { // if it is open, close it to stop people stealing our secrets! shadow.mode = 'closed'; } specifications specification status comment domthe definition of 'shadowroot.mode' in that specification. living standard ...
ShadowRoot - Web APIs
living standard ...
SharedWorker() - Web APIs
living standard ...
SharedWorker.port - Web APIs
Web › API › SharedWorker › port
t using the sharedworker() constructor. multiple scripts can then access the worker through a messageport object accessed using the sharedworker.port property — the port is started using its start() method: var myworker = new sharedworker('worker.js'); myworker.port.start(); for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification. living standard ...
SharedWorker - Web APIs
with messages sent from the main threads. onconnect = function(e) { var port = e.ports[0]; port.addeventlistener('message', function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); }); port.start(); // required when using addeventlistener. otherwise called implicitly by onmessage setter. } specifications specification status comment html living standardthe definition of 'sharedworker' in that specification. living standard no change from unknown. ...
SharedWorkerGlobalScope.close() - Web APIs
living standard ...
SharedWorkerGlobalScope: connect event - Web APIs
living standard ...
SharedWorkerGlobalScope.name - Web APIs
balscope. syntax var nameobj = self.name; value a domstring. example if a shared worker is created using a constructor with a name option: var myworker = new sharedworker("worker.js", { name : "mysharedworker" }); the sharedworkerglobalscope will now have a name of "mysharedworker", returnable by running self.name from inside the shared worker. specifications specification status comment html living standardthe definition of 'name' in that specification. living standard ...
SharedWorkerGlobalScope.onconnect - Web APIs
= 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) note: the data property of the event object used to be null in firefox. as of version 65 it is now initialized to an empty string, as per spec (bug 1508824). specifications specification status comment html living standardthe definition of 'onconnect' in that specification. living standard browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorerope...
SharedWorkerGlobalScope - Web APIs
ecution of a function every x milliseconds. windowtimers.settimeout() sets a delay for executing a function. events listen to this event using addeventlistener() or by assigning an event listener to the oneventname property of this interface. connect fired on shared workers when a new client connects. also available via the onconnect property. specifications specification status comment html living standardthe definition of 'sharedworkerglobalscope' in that specification. living standard ...
Slottable: assignedSlot - Web APIs
an slot="my-text">let's have some different text!</span> </my-paragraph> in our javascript file we get a reference to the <span> shown above, then log a reference to the original <slot> element the <span> was inserted in. let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.assignedslot); // logs '<slot name="my-text">' specifications specification status comment domthe definition of 'assignedslot' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explore...
Slottable - Web APIs
Web › API › Slottable
living standard initial definition. ...
SourceBuffer.abort() - Web APIs
seeking event fires. in lines 92-101, the seek() function is defined — note that abort() is called if mediasource.readystate is set to open, which means that it is ready to receive new source buffers — at this point it is worth aborting the current segment and just getting the one for the new seek position (see checkbuffer() and getcurrentsegment().) specifications specification status comment media source extensionsthe definition of 'abort()' in that specification. recommendation initial definition. ...
SourceBuffer.appendBuffer() - Web APIs
media segment data from an arraybuffer or arraybufferview object to the sourcebuffer. syntax sourcebuffer.appendbuffer(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer. return value undefined. exceptions none. example tbd. specifications specification status comment media source extensionsthe definition of 'appendbuffer()' in that specification. recommendation initial definition. ...
SourceBuffer.appendBufferAsync() - Web APIs
source media from the buffer. async function fillsourcebuffer(buffer, msbuffer) { try { while(true) { await msbuffer.appendbufferasync(buffer); } } catch(e) { handleexception(e); } } specifications not currently part of any specification. this is being experimented with under the auspices of the web platform incubator community group (wicg). specification status comment media source extensions recommendation initial definition; does not include this method. ...
SourceBuffer.appendWindowEnd - Web APIs
nation invalidaccesserror an attempt was made to set the value to less than or equal to sourcebuffer.appendwindowstart, or nan. invalidstateerror this sourcebuffer object is being updated (i.e. its sourcebuffer.updating property is currently true), or this sourcebuffer has been removed from the mediasource. example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowend' in that specification. recommendation initial definition. ...
SourceBuffer.appendWindowStart - Web APIs
invalidaccesserror an attempt was made to set the value to less than 0, or a value greater than or equal to sourcebuffer.appendwindowend. invalidstateerror this sourcebuffer object is being updated (i.e. its sourcebuffer.updating property is currently true), or this sourcebuffer has been removed from the mediasource. example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowstart' in that specification. recommendation initial definition. ...
SourceBuffer.audioTracks - Web APIs
recommendation initial definition. ...
SourceBuffer.buffered - Web APIs
recommendation initial definition. ...
SourceBuffer.mode - Web APIs
Web › API › SourceBuffer › mode
mplete, or this sourcebuffer has been removed from the mediasource. example this snippet sets the sourcebuffer mode to 'sequence' if it is currently set to 'segments', thus setting the play order to the sequence in which media segments are appended. var curmode = sourcebuffer.mode; if (curmode == 'segments') { sourcebuffer.mode = 'sequence'; } specifications specification status comment media source extensionsthe definition of 'mode' in that specification. recommendation initial definition. ...
SourceBuffer.remove() - Web APIs
recommendation initial definition. ...
SourceBuffer.removeAsync() - Web APIs
ed from the sourcebuffer. example this example establishes an asynchronous function, emptysourcebuffer(), which simply clears the contents of the specified sourcebuffer. async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification. specification status comment media source extensions recommendation initial definition. ...
SourceBuffer.textTracks - Web APIs
recommendation initial definition. ...
SourceBuffer.timestampOffset - Web APIs
exception explanation invalidstateerror one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e. their sourcebuffer.updating property is currently true), a media segment inside the sourcebuffer is currently being parsed, or this sourcebuffer has been removed from the mediasource. example tbd specifications specification status comment media source extensionsthe definition of 'timestampoffset' in that specification. recommendation initial definition. ...
SourceBuffer.updating - Web APIs
the updating read-only property of the sourcebuffer interface indicates whether the sourcebuffer is currently being updated — i.e. whether an sourcebuffer.appendbuffer(), sourcebuffer.appendstream(), or sourcebuffer.remove() operation is currently in progress. syntax var isupdating = sourcebuffer.updating; value a boolean. example tbd specifications specification status comment media source extensionsthe definition of 'updating' in that specification. recommendation initial definition. ...
SourceBuffer.videoTracks - Web APIs
recommendation initial definition. ...
SourceBuffer - Web APIs
recommendation initial definition. ...
SourceBufferList: indexed property getter - Web APIs
yntax var mysourcebuffer = sourcebufferlist[index]; parameters index the index position of the sourcebuffer object you want to return. return value a sourcebuffer object. exceptions no specific exceptions are thrown, but if the supplied index is great than or equal to sourcebufferlist.length, the operation will return undefined. example tbd. specifications specification status comment media source extensionsthe definition of 'sourcebuffer() getter' in that specification. recommendation initial definition. ...
SourceBufferList.length - Web APIs
the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list. syntax var mylistlength = sourcebufferlist.length; value an unsigned long number. example tbd specifications specification status comment media source extensionsthe definition of 'length' in that specification. recommendation initial definition. ...
SourceBufferList - Web APIs
r the addsourcebuffer event. sourcebufferlist.onremovesourcebuffer the event handler for the removesourcebuffer event. methods inherits methods from its parent interface, eventtarget. sourcebufferlist: indexed property getter this getter allows the sourcebuffer objects in the list to be accessed with an array operator (i.e. [].) examples tbd. specifications specification status comment media source extensionsthe definition of 'sourcebufferlist' in that specification. recommendation initial definition. ...
SpeechGrammar.SpeechGrammar() - Web APIs
draft ...
SpeechGrammar.src - Web APIs
Web › API › SpeechGrammar › src
draft ...
SpeechGrammar.weight - Web APIs
draft ...
SpeechGrammar - Web APIs
draft ...
SpeechGrammarList.SpeechGrammarList() - Web APIs
draft ...
SpeechGrammarList.addFromString() - Web APIs
draft ...
SpeechGrammarList.addFromURI() - Web APIs
draft ...
SpeechGrammarList.item() - Web APIs
draft ...
SpeechGrammarList.length - Web APIs
draft ...
SpeechGrammarList - Web APIs
draft ...
SpeechRecognition() - Web APIs
draft ...
SpeechRecognition.abort() - Web APIs
draft ...
SpeechRecognition: audioend event - Web APIs
draft ...
SpeechRecognition: audiostart event - Web APIs
draft ...
SpeechRecognition: end event - Web APIs
draft ...
SpeechRecognition: error event - Web APIs
draft ...
SpeechRecognition.grammars - Web APIs
draft ...
SpeechRecognition.interimResults - Web APIs
draft ...
SpeechRecognition.lang - Web APIs
draft ...
SpeechRecognition.maxAlternatives - Web APIs
draft ...
SpeechRecognition: nomatch event - Web APIs
draft ...
SpeechRecognition.onaudioend - Web APIs
draft ...
SpeechRecognition.onaudiostart - Web APIs
draft ...
SpeechRecognition.onend - Web APIs
draft ...
SpeechRecognition.onerror - Web APIs
draft ...
SpeechRecognition.onnomatch - Web APIs
draft ...
SpeechRecognition.onresult - Web APIs
e getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'onresult' in that specification. draft ...
SpeechRecognition.onsoundend - Web APIs
draft ...
SpeechRecognition.onsoundstart - Web APIs
draft ...
SpeechRecognition.onspeechend - Web APIs
draft ...
SpeechRecognition.onspeechstart - Web APIs
draft ...
SpeechRecognition.onstart - Web APIs
draft ...
SpeechRecognition: result event - Web APIs
draft ...
SpeechRecognition: soundend event - Web APIs
draft ...
SpeechRecognition: soundstart event - Web APIs
draft ...
SpeechRecognition: speechend event - Web APIs
draft ...
SpeechRecognition: speechstart event - Web APIs
draft ...
SpeechRecognition.start() - Web APIs
draft ...
SpeechRecognition: start event - Web APIs
draft ...
SpeechRecognition.stop() - Web APIs
draft ...
SpeechRecognition - Web APIs
draft ...
SpeechRecognitionAlternative.confidence - Web APIs
[0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log('confidence: ' + event.results[0][0].confidence); } specifications specification status comment web speech apithe definition of 'confidence' in that specification. draft ...
SpeechRecognitionAlternative.transcript - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'transcript' in that specification. draft ...
SpeechRecognitionAlternative - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionalternative' in that specification. draft ...
SpeechRecognitionErrorEvent.error - Web APIs
tags, or the chosen grammar format or semantic tag format was unsupported. language-not-supported the language was not supported. examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'error' in that specification. draft ...
SpeechRecognitionErrorEvent.message - Web APIs
as raised. note that the spec does not define the exact wording of these messages — this is up to the implementors to decide upon. examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'message' in that specification. draft ...
SpeechRecognitionErrorEvent - Web APIs
s the type of error raised. speechrecognitionerrorevent.message read only returns a message describing the error in more detail. examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'speechrecognitionerrorevent' in that specification. draft ...
SpeechRecognitionEvent.resultIndex - Web APIs
by array syntax. syntax var myresultindex = event.resultindex; value a number. examples recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.resultindex); // returns 0 if there is only one result } specifications specification status comment web speech apithe definition of 'resultindex' in that specification. draft ...
SpeechRecognitionEvent.results - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'results' in that specification. draft ...
SpeechRecognitionEvent - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionevent' in that specification. draft ...
SpeechRecognitionResult.isFinal - Web APIs
rays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].isfinal); } specifications specification status comment web speech apithe definition of 'isfinal' in that specification. draft ...
SpeechRecognitionResult.item() - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification. draft ...
SpeechRecognitionResult.length - Web APIs
rrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].length); } specifications specification status comment web speech apithe definition of 'length' in that specification. draft ...
SpeechRecognitionResult - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresult' in that specification. draft ...
SpeechRecognitionResultList.item() - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification. draft ...
SpeechRecognitionResultList.length - Web APIs
e arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results.length); } specifications specification status comment web speech apithe definition of 'length' in that specification. draft ...
SpeechRecognitionResultList - Web APIs
ve getters so they can be accessed like arrays. // the second [0] returns the speechrecognitionalternative at position 0. // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresultlist' in that specification. draft ...
SpeechSynthesis.cancel() - Web APIs
draft ...
SpeechSynthesis.getVoices() - Web APIs
draft initial definition ...
SpeechSynthesis.onvoiceschanged - Web APIs
draft ...
SpeechSynthesis.pause() - Web APIs
draft ...
SpeechSynthesis.paused - Web APIs
rough it. if utterances are then added to the utterance queue, they will not be spoken until the speechsynthesis object is unpaused, using speechsynthesis.resume(). syntax var amipaused = speechsynthesisinstance.paused; value a boolean. examples var synth = window.speechsynthesis; synth.pause(); var amipaused = synth.paused; // will return true specifications specification status comment web speech apithe definition of 'paused' in that specification. draft ...
SpeechSynthesis.pending - Web APIs
draft ...
SpeechSynthesis.resume() - Web APIs
draft ...
SpeechSynthesis.speak() - Web APIs
draft ...
SpeechSynthesis.speaking - Web APIs
draft ...
SpeechSynthesis: voiceschanged event - Web APIs
draft ...
SpeechSynthesis - Web APIs
draft ...
SpeechSynthesisErrorEvent.error - Web APIs
draft ...
SpeechSynthesisErrorEvent - Web APIs
draft ...
SpeechSynthesisEvent.charIndex - Web APIs
esisutterance.text that was being spoken when the event was triggered. syntax event.charindex; value a number. examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'charindex' in that specification. draft ...
SpeechSynthesisEvent.elapsedTime - Web APIs
draft ...
SpeechSynthesisEvent.name - Web APIs
draft ...
SpeechSynthesisEvent.utterance - Web APIs
nce instance that the event was triggered on. syntax event.utterance; value a speechsynthesisutterance object. examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'utterance' in that specification. draft ...
SpeechSynthesisEvent - Web APIs
draft ...
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
draft ...
SpeechSynthesisUtterance: boundary event - Web APIs
draft ...
SpeechSynthesisUtterance: end event - Web APIs
draft ...
SpeechSynthesisUtterance: error event - Web APIs
draft ...
SpeechSynthesisUtterance.lang - Web APIs
draft ...
SpeechSynthesisUtterance: mark event - Web APIs
draft ...
SpeechSynthesisUtterance.onboundary - Web APIs
draft ...
SpeechSynthesisUtterance.onend - Web APIs
draft ...
SpeechSynthesisUtterance.onerror - Web APIs
draft ...
SpeechSynthesisUtterance.onmark - Web APIs
draft ...
SpeechSynthesisUtterance.onpause - Web APIs
draft ...
SpeechSynthesisUtterance.onresume - Web APIs
draft ...
SpeechSynthesisUtterance.onstart - Web APIs
draft ...
SpeechSynthesisUtterance: pause event - Web APIs
draft ...
SpeechSynthesisUtterance.pitch - Web APIs
draft ...
SpeechSynthesisUtterance.rate - Web APIs
draft ...
SpeechSynthesisUtterance: resume event - Web APIs
draft ...
SpeechSynthesisUtterance: start event - Web APIs
draft ...
SpeechSynthesisUtterance.text - Web APIs
draft ...
SpeechSynthesisUtterance.voice - Web APIs
draft ...
SpeechSynthesisUtterance.volume - Web APIs
draft ...
SpeechSynthesisUtterance - Web APIs
draft ...
SpeechSynthesisVoice.default - Web APIs
draft ...
SpeechSynthesisVoice.lang - Web APIs
draft ...
SpeechSynthesisVoice.localService - Web APIs
draft ...
SpeechSynthesisVoice.name - Web APIs
draft ...
SpeechSynthesisVoice.voiceURI - Web APIs
draft ...
SpeechSynthesisVoice - Web APIs
draft ...
StaticRange.StaticRange() - Web APIs
fired if either or both of the startcontainer and/or endcontainer are a type of node which you can't include in a range. those node types are node.document_type_node (representing the documenttype node derived from the dtd identified using the doctype preamble in the html, for example) and the attr node describing an attribute of an element on the dom.. specifications specification status comment domthe definition of 'staticrange()' in that specification. living standard initial definition. ...
StaticRange.collapsed - Web APIs
d read-only property of the staticrange interface returns true if the range's start position and end position are the same. syntax var iscollpased = staticrange.collapsed value a boolean value which is true if the range is collapsed. a collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range.. specifications specification status comment domthe definition of 'collapsed' in that specification. living standard static rangethe definition of 'collapsed' in that specification. editor's draft initial definition. ...
StaticRange.endContainer - Web APIs
the endcontainer property of the staticrange interface returns the end node for the range. syntax var node = staticnode.endcontainer staticnode.endcontainer = endcontainer value the dom node which contains the final character of the range. specifications specification status comment domthe definition of 'endcontainer' in that specification. living standard static rangethe definition of 'endcontainer' in that specification. editor's draft initial definition. ...
StaticRange.endOffset - Web APIs
the endoffset property of the staticrange interface returns the offset into the end node of the range's end position. syntax var endoffset = staticrange.endoffset value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located. specifications specification status comment domthe definition of 'endoffset' in that specification. living standard static rangethe definition of 'endoffset' in that specification. editor's draft initial definition. ...
StaticRange.startContainer - Web APIs
the read-only startcontainer property of the staticrange interface returns the start node for the range. syntax var node = staticnode.startcontainer value the dom node inside which the start position of the range is found. specifications specification status comment domthe definition of 'startcontainer ' in that specification. living standard static rangethe definition of 'startcontainer' in that specification. editor's draft initial definition. ...
StaticRange.startOffset - Web APIs
the read-only startoffset property of the staticrange interface returns the offset into the start node of the range's start position. syntax var startoffset = staticrange.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located. specifications specification status comment domthe definition of 'startoffset' in that specification. living standard static rangethe definition of 'startoffset' in that specification. editor's draft initial definition. ...
StaticRange.toRange() - Web APIs
the torange() property of the staticrange interface converts the staticrange object to a range object. syntax var range = staticrange.torange() parameters none. return value a new range object. specifications specification status comment static rangethe definition of 'torange()' in that specification. editor's draft initial definition. ...
StaticRange - Web APIs
ange which is fixed in time; it does not change to try to keep the same content within it as the document changes. if any changes are made to the dom, the actual data contained within the range specified by a staticrange may change. this lets the user agent avoid a lot of work that is unnecessary if the web app or site doesn't need a live-updating range. specifications specification status comment domthe definition of 'staticrange' in that specification. living standard static rangethe definition of 'staticrange' in that specification. editor's draft initial definition. ...
StereoPannerNode.StereoPannerNode() - Web APIs
ctionary. context a reference to an audiocontext. options optional options are as follows: pan: a floating point number in the range [-1,1] indicating the position of an audionode in an output image. the value -1 represents full left and 1 represents full right. the default value is 0. return value a new stereopannernode object instance. specifications specification status comment web audio apithe definition of 'stereopannernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxi...
StereoPannerNode.pan - Web APIs
working draft ...
StereoPannerNode - Web APIs
working draft initial definition ...
Storage.clear() - Web APIs
Web › API › Storage › clear
following function creates three data entries in local storage, and then deletes them by using clear(). function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'migato.png'); localstorage.clear(); } note: for a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.clear' in that specification. living standard ...
Storage.getItem() - Web APIs
Web › API › Storage › getItem
living standard ...
Storage.key() - Web APIs
Web › API › Storage › key
living standard ...
Storage.length - Web APIs
Web › API › Storage › length
living standard ...
Storage.removeItem() - Web APIs
moveitem('image'); } we can do the same for the session storage. function populatestorage() { sessionstorage.setitem('bgcolor', 'red'); sessionstorage.setitem('font', 'helvetica'); sessionstorage.setitem('image', 'mycat.png'); sessionstorage.removeitem('image'); } note: to see this used within a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.removeitem' in that specification. living standard ...
Storage.setItem() - Web APIs
Web › API › Storage › setItem
ble exceptions from setitem(). example the following function creates three data items inside local storage. function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); } note: to see this used within a real world example, see our web storage demo. specifications specification status comment html living standardthe definition of 'storage.setitem' in that specification. living standard ...
Storage - Web APIs
Web › API › Storage
living standard ...
StorageEstimate.quota - Web APIs
pacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'quota' in that specification. living standard initial definition ...
StorageEstimate.usage - Web APIs
pacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'usage' in that specification. living standard initial definition ...
StorageEstimate - Web APIs
ount of storage space currently being used by the site or web app, out of the available space as indicated by quota. unit is byte. usagedetails secure context a dictionary containing a breakdown of usage by storage system. all included members will have a usage greater than 0 and any storage system with 0 usage will be excluded from the dictionary. specifications specification status comment storagethe definition of 'storageestimate' in that specification. living standard initial definition. ...
StorageManager.estimate() - Web APIs
pacity currently used to the user. html content <label> you’re currently using about <output id="percent"> </output>% of your available storage. </label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'estimate()' in that specification. living standard initial definition. ...
StorageManager.persist() - Web APIs
ue a promise that resolves to a boolean. example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorer...
StorageManager.persisted() - Web APIs
a promise that resolves to a boolean. example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification. living standard initial definition. ...
StorageManager - Web APIs
stimate object containing usage and quota numbers for your origin. storagemanager.persist() secure context returns a promise that resolves to true if the user agent is able to persist your site's storage. storagemanager.persisted() secure context returns a promise that resolves to true if persistence has already been granted for your site's storage. specifications specification status comment storagethe definition of 'storagemanger' in that specification. living standard initial definition. ...
StorageQuota.queryInfo - Web APIs
obsolete initial definition. ...
StorageQuota.requestPersistentQuota - Web APIs
ota 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) { ... }) parameters none. returns a reference to a storageinfo object. specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification. obsolete initial definition. ...
StorageQuota.supportedTypes - Web APIs
the supportedtypes read-only property of the storagequota interface returns a list of the available storage types. syntax var storagetypes = storagequota.supportedtypes value a frozen array of available storage types. specifications specification status comment quota management apithe definition of 'supportedtypes' in that specification. obsolete initial definition. ...
StorageQuota - Web APIs
o returns a storageinfo object containting the current data usage and available quota information for the application. 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. specifications specification status comment quota management apithe definition of 'storagequota' in that specification. obsolete initial definition. ...
Storage API - Web APIs
...
Streams API - Web APIs
en decode the stream and write the contents to the ui. unpack chunks of a png: this example shows how pipethrough() can be used to transform a readablestream into a stream of other data types by transforming a data of a png file into a stream of png chunks. examples from other developers: progress indicators with streams, service workers, & fetch. specifications specification status comment streams living standard initial definition. ...
StylePropertyMap.append() - Web APIs
interface adds a new css declaration to the stylepropertymap with the given property and value. syntax stylepropertymap.append(property,value) parameters property an identifier indicating the stylistic feature (e.g. font, width, background color) to add. value the value the given property should have. return value undefined. example // tbd specifications specification status comment css typed om level 1the definition of 'append()' in that specification. working draft initial definition. ...
StylePropertyMap.clear() - Web APIs
the clear() method of the stylepropertymap interface removes all declarations in the stylepropertymap. syntax stylepropertmap.clear() parameters none. return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'clear()' in that specification. working draft initial definition. ...
StylePropertyMap.delete() - Web APIs
the delete() method of the stylepropertymap interface removes the css declaration with the given property. syntax stylepropertymap.delete(property) parameters property an identifier indicating the stylistic feature (e.g. font, width, background color) to remove. return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'delete()' in that specification. working draft initial definition. ...
StylePropertyMap.set() - Web APIs
t() method of the stylepropertymap interface changes the css declaration with the given property. syntax stylepropertymap.set(property,value) parameters property an identifier indicating the stylistic feature (e.g. font, width, background color) to change. value the value the given property should have. return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'set()' in that specification. working draft initial definition. ...
StylePropertyMap - Web APIs
ly. stylepropertymap.append() adds a new css declaration to the stylepropertymap with the given property and value. stylepropertymap.clear() removes all declarations in the stylepropertymap. stylepropertymap.delete() removes the css declaration with the given property. stylepropertymap.set() changes the css declaration with the given property. specifications specification status comment css typed om level 1the definition of 'stylepropertymap' in that specification. working draft initial definition. ...
StylePropertyMapReadOnly.entries() - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly.forEach() - Web APIs
urrentvalue the value of the current element being processed. indexoptional the index of the current element being processed. arrayoptional the stylepropertymapreadonly thatforeach() is being called on. thisarg optional value to use as this (i.e the reference object) when executing callback. return value undefined. example // tbd specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification. working draft initial definition. ...
StylePropertyMapReadOnly.get() - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly.getAll() - Web APIs
thod of the stylepropertymapreadonly interface returns an array of cssstylevalue objects containing the values for the provided property. syntax var cssstylevalues[] = stylepropertymapreadonly.getall(property) parameters property the name of the property to retrieve all values of. return value an array of cssstylevalue objects. example // tbd specifications specification status comment css typed om level 1the definition of 'getall()' in that specification. working draft initial definition. ...
StylePropertyMapReadOnly.has() - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly.keys() - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly.size - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly.values() - Web APIs
working draft initial definition. ...
StylePropertyMapReadOnly - Web APIs
working draft initial definition. ...
StyleSheet.disabled - Web APIs
nually setting this property to true or if it's an inactive alternative style sheet. note that disabled == false does not guarantee the style sheet is applied (it could be removed from the document, for instance). syntax bool = stylesheet.disabled example // if the stylesheet is disabled... if (stylesheet.disabled) { // ... apply styles in-line. } specification specification status comment css object model (cssom)the definition of 'stylesheet.disabled' in that specification. working draft no change from document object model (dom) level 2 style specification. document object model (dom) level 2 style specificationthe definition of 'stylesheet.disabled' in that specification. obsolete initial definition. ...
Stylesheet.href - Web APIs
Web › API › StyleSheet › href
working draft ...
StyleSheet.media - Web APIs
Web › API › StyleSheet › media
working draft ...
StyleSheet.ownerNode - Web APIs
working draft ...
StyleSheet.parentStyleSheet - Web APIs
ding the given style sheet. syntax objref = stylesheet.parentstylesheet example // find the top level stylesheet if (stylesheet.parentstylesheet) { sheet = stylesheet.parentstylesheet; } else { sheet = stylesheet; } notes this property returns null if the current stylesheet is a top-level stylesheet or if stylesheet inclusion is not supported. specifications specification status comment css object model (cssom)the definition of 'stylesheet: parentstylesheet' in that specification. working draft ...
StyleSheet.title - Web APIs
Web › API › StyleSheet › title
the title property of the stylesheet interface returns the advisory title of the current style sheet. the title is often specified in the ownernode. specifications specification status comment css object model (cssom)the definition of 'stylesheet: title' in that specification. working draft ...
StyleSheet.type - Web APIs
Web › API › StyleSheet › type
the type property of the stylesheet interface specifies the style sheet language for the given style sheet. syntax string = stylesheet.type example mystylesheet.type = 'text/css'; specifications specification status comment css object model (cssom)the definition of 'stylesheet: type' in that specification. working draft ...
StyleSheet - Web APIs
ent document. stylesheet.parentstylesheet read only returns a stylesheet including this one, if any; returns null if there aren't any. stylesheet.title read only returns a domstring representing the advisory title of the current style sheet. stylesheet.typeread only returns a domstring representing the style sheet language for this style sheet. specifications specification status comment css object model (cssom)the definition of 'stylesheet' in that specification. working draft no change from document object model (dom) level 2 style specification. document object model (dom) level 2 style specificationthe definition of 'stylesheet' in that specification. obsolete initial definition. ...
StyleSheetList - Web APIs
working draft ...
SubmitEvent() - Web APIs
living standard ...
SubmitEvent.submitter - Web APIs
walertmessage("an unknown or unaccepted payment type was selected. please try again.", "ok"); } }); the handler id is obtained by using the submit event's submitter property to get the submit button, from which we then get the id. with that in hand, we can call a processorder() function to handle the order, passing along the form and the handler id. specifications specification status comment html living standardthe definition of 'submitevent.submitter' in that specification. living standard ...
SubmitEvent - Web APIs
walertmessage("an unknown or unaccepted payment type was selected. please try again.", "ok"); } }); the handler id is obtained by using the submit event's submitter property to get the submit button, from which we then get the id. with that in hand, we can call a processorder() function to handle the order, passing along the form and the handler id. specifications specification status comment html living standardthe definition of 'submitevent' in that specification. living standard ...
SubtleCrypto.decrypt() - Web APIs
}, key, ciphertext ); } aes-gcm this code decrypts ciphertext using aes in gcm mode. note that iv must match the value that was used for encryption. see the complete code on github. function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-gcm", iv: iv }, key, ciphertext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.decrypt()' in that specification. recommendation initial definition. ...
SubtleCrypto.deriveBits() - Web APIs
recommendation initial definition. ...
SubtleCrypto.deriveKey() - Web APIs
recommendation initial definition. ...
SubtleCrypto.digest() - Web APIs
recommendation initial definition. ...
SubtleCrypto.encrypt() - Web APIs
recommendation initial definition. ...
SubtleCrypto.exportKey() - Web APIs
pair, then set up an event listener on the "export" button. */ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".jwk"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.privatekey); }); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.exportkey()' in that specification. recommendation initial definition. ...
SubtleCrypto.generateKey() - Web APIs
recommendation initial definition. ...
SubtleCrypto.importKey() - Web APIs
ate key, to use for rsa-pss signing. takes a string containing the pem encoded key, and returns a promise that will resolve to a cryptokey representing the private key. */ function importprivatekey(jwk) { return window.crypto.subtle.importkey( "jwk", jwk, { name: "ecdsa", namedcurve: "p-384" }, true, ["sign"] ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.importkey()' in that specification. recommendation initial definition. ...
SubtleCrypto.sign() - Web APIs
Web › API › SubtleCrypto › sign
in a form we can use for the sign operation. */ function getmessageencoding() { const messagebox = document.queryselector(".hmac #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } let encoded = getmessageencoding(); let signature = await window.crypto.subtle.sign( "hmac", key, encoded ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.sign()' in that specification. recommendation initial definition. ...
SubtleCrypto.unwrapKey() - Web APIs
recommendation initial definition. ...
SubtleCrypto.verify() - Web APIs
recommendation initial definition. ...
SubtleCrypto.wrapKey() - Web APIs
recommendation initial definition. ...
SubtleCrypto - Web APIs
recommendation initial definition. ...
SyncEvent.tag - Web APIs
Web › API › SyncEvent › tag
the syncevent.tag read-only property of the syncevent interface returns the developer-defined identifier for this syncevent. this is the value passed in the tag parameter of the syncevent() constructor. syntax var tag = syncevent.tag value the developer-defined identifier for this syncevent. specifications specification status comment web background synchronizationthe definition of 'tag' in that specification. living standard initial definition. ...
SyncManager - Web APIs
the syncmanager interface of the the serviceworker api provides an interface for registering and listing sync registrations. properties none. methods syncmanager.register create a new sync registration and return a promise. syncmanager.gettags return a list of developer-defined identifiers for syncmanager registration. specifications specification status comment web background synchronizationthe definition of 'syncmanager' in that specification. living standard initial definition. ...
TaskAttributionTiming.containerId - Web APIs
the containerid readonly property of the taskattributiontiming interface returns the container's id attribute. a container is the iframe, embed or object etc. that is being implicated, on the whole, for a long task. syntax var containerid = taskattributiontiming.containerid; value a domstring containing the containers id attribute. specifications specification status comment long tasks api 1the definition of 'containerid' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroper...
TaskAttributionTiming.containerName - Web APIs
the containername readonly property of the taskattributiontiming interface returns the container's name attribute. a container is the iframe, embed or object etc. that is being implicated, on the whole, for a long task. syntax var containername = taskattributiontiming.containername; value a domstring containing the container's name attribute. specifications specification status comment long tasks api 1the definition of 'containername' in that specification. working draft initial definition. ...
TaskAttributionTiming.containerSrc - Web APIs
the containersrc readonly property of the taskattributiontiming interface returns the container's src attribute. a container is the iframe, embed or object etc. that is being implicated, on the whole, for a long task. syntax var containersrc = taskattributiontiming.containersrc; value a domstring containing the container's src attribute. specifications specification status comment long tasks api 1the definition of 'containersrc' in that specification. working draft initial definition. ...
TaskAttributionTiming.containerType - Web APIs
the containertype readonly property of the taskattributiontiming interface returns the type of frame container, one of iframe, embed, or object. syntax var containertype = taskattributiontiming.containertype; value a domstring containing the container's type, one of iframe, embed, or object. specifications specification status comment long tasks api 1the definition of 'containertype' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androi...
TaskAttributionTiming - Web APIs
ontainertype read only returns the type of frame container, one of iframe, embed, or object. taskattributiontiming.containersrc read only returns the container's src attribute. taskattributiontiming.containerid read only returns the container's id attribute. taskattributiontiming.containername read only returns the container's name attribute. specifications specification status comment long tasks api 1the definition of 'taskattributiontiming' in that specification. working draft initial definition. ...
Text() - Web APIs
Web › API › Text › Text
living standard initial definition. ...
HTMLSlotElement.assignedSlot - Web APIs
Web › API › Text › assignedSlot
living standard browser compatibility the compatibility table on this page is generated from structured data. ...
Text.replaceWholeText() - Web APIs
is an empty string. the returned node is the current node unless the current node is read only, in which case the returned node is a newly created text node of the same type which has been inserted at the location of the replacement. syntax replacementnode = textnode.replacewholetext(content) example see the example for the text.wholetext property. specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'text' in that specification. obsolete initial definition. ...
Text.splitText() - Web APIs
Web › API › Text › splitText
living standard no change from document object model (dom) level 3 core specification. document object model (dom) level 3 core specificationthe definition of 'text.splittext' in that specification. obsolete no change from document object model (dom) level 2 core specification. docum...
Text.wholeText - Web APIs
Web › API › Text › wholeText
tricky.</p> some uses of the whole-text functionality may be better served by using node.textcontent, or the longstanding element.innerhtml; that’s fine and probably clearer in most circumstances. if you have to work with mixed content within an element, as seen here, wholetext and replacewholetext() may be useful. replacewholetext() is obsolete. specifications specification status comment domthe definition of 'text.wholetext' in that specification. living standard no significant change. document object model (dom) level 3 core specificationthe definition of 'text.wholetext' in that specification. obsolete initial definition. ...
Text - Web APIs
Web › API › Text
nedslot read only returns a htmlslotelement representing the <slot> the node is inserted in. methods inherits methods from its parent, characterdata. text.replacewholetext replaces the text of the current node and all logically adjacent nodes with the specified text. text.splittext breaks the node into two nodes at a specified offset. specifications specification status comment domthe definition of 'text' in that specification. living standard removed the iselementcontentwhitespace property. removed the replacewholetext() method. added the text() constructor. added the assignedslot property. document object model (dom) level 3 core specificationthe definition of 'text' in that specification. obsolete added the ise...
TextDecoder() - Web APIs
lue when an coding error is found. it defaults to false. example var textdecoder1 = new textdecoder("iso-8859-2"); var textdecoder2 = new textdecoder(); var textdecoder3 = new textdecoder("csiso2022kr", {fatal: true}); // allows encodingerror exception to be thrown. var textdecoder4 = new textdecoder("iso-2022-cn"); // throw a typeerror exception. specifications specification status comment encodingthe definition of 'textdecoder()' in that specification. living standard initial definition. ...
TextDecoder.prototype.decode() - Web APIs
living standard initial definition. ...
TextDecoder.prototype.encoding - Web APIs
'iso-2022-kr'. the legacy miscelleanous encodings: 'utf-16be', 'utf-16le', and 'x-user-defined'. a special encoding, 'replacement', which only emits an error and an eof code point. it is used to prevent attacks that mismatch encodings between the client and server. it can happen with iso-2022-cn and iso-2022-cn-ext. syntax var b = decoder.decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification. living standard initial definition. ...
TextDecoder - Web APIs
n indicating whether the error mode is fatal. textdecoder.prototype.ignorebomread only is a boolean indicating whether the byte order marker is ignored. methods the textdecoder interface doesn't inherit any method. textdecoder.prototype.decode() returns a domstring containing the text decoded with the method of the specific textdecoder object. specifications specification status comment encodingthe definition of 'textdecoder' in that specification. living standard initial definition. ...
TextEncoder() - Web APIs
r any encoder type other than utf-8, to match the spec. any type label passed into the textencoder constructor will now be ignored and a utf-8 textencoder will be created. exceptions textencoder() throws no exceptions since firefox 48 and chrome 53 note: prior to firefox 48 and chrome 53 an exception would be thrown for an unknown encoding type. specifications specification status comment encodingthe definition of 'textencoder()' in that specification. living standard initial definition ...
TextEncoder.prototype.encode() - Web APIs
living standard initial definition. ...
TextEncoder.prototype.encodeInto() - Web APIs
living standard initial definition. ...
TextEncoder.encoding - Web APIs
the textencoder.encoding read-only property returns a domstring containing the name of the encoding algorithm used by the specific encoder. it can only have the following value utf-8. syntax b = encoder.encoding; specifications specification status comment encodingthe definition of 'textencoder.encoding' in that specification. living standard initial definition. ...
TextEncoder - Web APIs
living standard initial definition. ...
TextTrack: cuechange event - Web APIs
living standard ...
TextTrack.mode - Web APIs
Web › API › TextTrack › mode
ensure that the track's cues are available, we first set mode to showing. window.addeventlistener("load", event => { let trackelem = document.queryselector("track"); let track = trackelem.track; track.mode = "showing"; for (let index=0; index < track.cues.length; index++) { let cue = track.cues[index]; cue.pauseonexit = true; }; }); specifications specification status comment html living standardthe definition of 'mode' in that specification. living standard ...
TextTrack - Web APIs
Web › API › TextTrack
hen the cue is exited. also available via the oncuechange property. methods this interface also inherits methods from eventtarget. texttrack.addcue() adds a cue (specified as a texttrackcue object to the track's list of cues. texttrack.removecue() removes a cue (specified as a texttrackcue object from the track's list of cues. example tbd specifications specification status comment html living standardthe definition of 'texttrack' in that specification. living standard ...
TextTrackCue - Web APIs
ackcue.endtime a double that represents the video time that the cue will stop being displayed, in seconds. texttrackcue.pauseonexit a boolean for whether the video will pause when this cue stops being displayed. event handlers texttrackcue.onenter the event handler for the enter event. texttrackcue.onexit the event handler for the exit event. specifications specification status comment html living standardthe definition of 'texttrackcue' in that specification. living standard html5the definition of 'texttrackcue' in that specification. recommendation initial definition ...
TextTrackList: addtrack event - Web APIs
living standard ...
TextTrackList: change event - Web APIs
living standard ...
getTrackById() - Web APIs
rst track found within the texttracklist whose id matches the specified string. if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. specifications specification status comment html living standardthe definition of 'texttracklist.gettrackbyid()' in that specification. living standard ...
TextTrackList.length - Web APIs
first media element found in the dom by queryselector(). var mediaelem = document.queryselector("video, audio"); var numtexttracks = 0; if (mediaelem.texttracks) { numtexttracks = mediaelem.texttracks.length; } note that this sample checks to be sure htmlmediaelement.texttracks is defined, to avoid failing on browsers without support for texttrack. specifications specification status comment html living standardthe definition of 'texttracklist: length' in that specification. living standard ...
TextTrackList.onaddtrack - Web APIs
or the addtrack event that calls a function, addtotracklist(), passing in the videotrack object representing the newly-added track. in this scenario, that function's role is to add the new track to a list of video tracks available to choose from. document.queryselector("video").texttracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'texttracklist: onaddtrack' in that specification. living standard ...
TextTrackList.onchange - Web APIs
living standard ...
TextTrackList.onremovetrack - Web APIs
media element whenever a track is removed from the media element. document.queryselectorall("video, audio")[0].texttracks.onremovetrack = function(event) { mytrackcount = document.queryselectorall("video, audio")[0].texttracks.length; }; the current number of text tracks remaining in the media element is obtained from texttracklist property length. specifications specification status comment html living standardthe definition of 'texttracklist: onremovetrack' in that specification. living standard ...
TextTrackList: removeTrack event - Web APIs
living standard ...
TextTrackList - Web APIs
an app that displays information about the number of channels available. to keep it up to date, handlers for the addtrack and removetrack events are set up. texttracks.onaddtrack = updatetrackcount; texttracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = texttracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'textracklist' in that specification. living standard ...
TimeRanges.end() - Web APIs
Web › API › TimeRanges › end
living standard initial definition ...
TimeRanges.length - Web APIs
Web › API › TimeRanges › length
living standard initial definition ...
TimeRanges.start() - Web APIs
Web › API › TimeRanges › start
living standard initial definition ...
TimeRanges - Web APIs
re folded into one bigger range). properties timeranges.length read only returns an unsigned long representing the number of time ranges represented by the time range object. methods timeranges.start() returns the time for the start of the range with the specified index. timeranges.end() returns the time for the end of the specified range. specifications specification status comment html living standardthe definition of 'timeranges' in that specification. living standard initial definition ...
Touch() - Web APIs
Web › API › Touch › Touch
draft initial definition. ...
Touch.clientX - Web APIs
Web › API › Touch › clientX
r('touchend', function(e) { var deltax, deltay; // compute the change in x and y coordinates. // the first touch point in the changedtouches // list is the touch point that was just removed from the surface. deltax = e.changedtouches[0].clientx - clientx; deltay = e.changedtouches[0].clienty - clienty; // process the data ... }, false); specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
Touch.clientY - Web APIs
Web › API › Touch › clientY
ner('touchend', function(e) { var deltax, deltay; // compute the change in x and y coordinates. // the first touch point in the changedtouches // list is the touch point that was just removed from the surface. deltax = e.changedtouches[0].clientx - clientx; deltay = e.changedtouches[0].clienty - clienty; // process the data ... }, false); specifications specification status comment touch events – level 2 draft no changes since last version. touch events recommendation initial definition. ...
Touch.force - Web APIs
Web › API › Touch › force
touch // point's force. for (var i=0; i < e.targettouches.length; i++) { // add code to "switch" based on the force value. for example // minimum pressure vs. maximum pressure could result in // different handling of the user's input. console.log("targettouches[" + i + "].force = " + e.targettouches[i].force); } }, false); specifications specification status comment touch events – level 2 draft initial definition. ...
Touch.identifier - Web APIs
Web › API › Touch › identifier
object. example someelement.addeventlistener('touchmove', function(e) { // iterate through the list of touch points that changed // since the last event and print each touch point's identifier. for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft no change. touch events recommendation initial definition. ...
Touch.pageX - Web APIs
Web › API › Touch › pageX
ugh the touch points that have moved and log each // of the pagex/y coordinates. the unit of each coordinate is css pixels. var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from the previous version. touch events recommendation initial definition. ...
Touch.pageY - Web APIs
Web › API › Touch › pageY
ough the touch points that have moved and log each // of the pagex/y coordinates. the unit of each coordinate is css pixels. var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from last version. touch events recommendation initial definition. ...
Touch.radiusX - Web APIs
Web › API › Touch › radiusX
...
Touch.radiusY - Web APIs
Web › API › Touch › radiusY
el 2 draft specification and not in touch events recommendation. this attribute is not widely implemented. syntax var yradius = touchitem.radiusy; return value yradius the y radius of the ellipse that most closely circumscribes the area of contact with the screen. example the touch.radiusx example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. ...
Touch.rotationAngle - Web APIs
ents recommendation. this attribute is not widely implemented. syntax var angle = touchitem.rotationangle; return value angle the number of degrees of rotation to apply to the described ellipse to align with the contact area between the user and the touch surface. example the touch.radiusx example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. ...
Touch.screenX - Web APIs
Web › API › Touch › screenX
', function(e) { // iterate through the touch points and log each screenx/y coordinate. // the unit of each coordinate is css pixels. var i; for (i=0; i < e.touches.length; i++) { console.log("touchpoint[" + i + "].screenx = " + e.touches[i].screenx); console.log("touchpoint[" + i + "].screeny = " + e.touches[i].screeny); } }, false); specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
Touch.screenY - Web APIs
Web › API › Touch › screenY
summary returns the y coordinate of the touch point relative to the screen, not including any scroll offset. syntax var y = touchitem.screeny; return value y the y coordinate of the touch point relative to the screen, not including any scroll offset. example the touch.screenx example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
Touch.target - Web APIs
Web › API › Touch › target
touch events recommendation initial definition. ...
Touch - Web APIs
Web › API › Touch
clockwise, to most accurately cover the area of contact between the user and the surface. touch.forceread only returns the amount of pressure being applied to the surface by the user, as a float between 0.0 (no pressure) and 1.0 (maximum pressure). methods this interface has no method and no parent, and doesn't inherits or implements any method. specifications specification status comment touch events – level 2the definition of 'touch' in that specification. draft added radiusx, radiusy, rotationangle, force properties, as well as the touch() constructor. touch eventsthe definition of 'touch' in that specification. recommendation initial definition. ...
TouchEvent.altKey - Web APIs
Web › API › TouchEvent › altKey
uchstart event handler logs the state of the event's modifier keys. someelement.addeventlistener('touchstart', function(e) { // log the state of this event's modifier keys console.log("altkey = " + e.altkey); console.log("ctrlkey = " + e.ctrlkey); console.log("metakey = " + e.metakey); console.log("shiftkey = " + e.shiftkey); }, false); specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.changedTouches - Web APIs
event. someelement.addeventlistener('touchmove', function(e) { // iterate through the list of touch points that changed // since the last event and print each touch point's identifier. for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.ctrlKey - Web APIs
ey is enabled, the attribute's value is true. otherwise, it is false. this property is read only . syntax var ctrlenabled = touchevent.ctrlkey; return value ctrlenabled true if the control key is enabled for this event; and false if the control is not enabled. example the touchevent.altkey example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.metaKey - Web APIs
n macintosh keyboards, this is the ⌘ command key. on windows keyboards, this is the windows key (⊞). syntax var metaenabled = touchevent.metakey; return value metaenabled true if the meta key is enabled for this event; and false if the meta is not enabled. example the touchevent.altkey example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.shiftKey - Web APIs
is enabled, the attribute's value is true. otherwise, it is false. this property is read only . syntax var shiftenabled = touchevent.shiftkey; return value shiftenabled true if the shift key is enabled for this event; and false if the shift key is not enabled. example the touchevent.altkey example includes an example of this property's usage. specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.targetTouches - Web APIs
the length of the touches list to the the length of the targettouches list and returns true if the lengths are the same and returns false otherwise. function touches_in_target(ev) { // return true if all of the touches are within the target element; // otherwise return false. return (ev.touches.length == ev.targettouches.length ? true : false); } specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchEvent.touches - Web APIs
ddeventlistener('touchstart', function(e) { // invoke the appropriate handler depending on the // number of touch points. switch (e.touches.length) { case 1: handle_one_touch(e); break; case 2: handle_two_touches(e); break; case 3: handle_three_touches(e); break; default: console.log("not supported"); break; } }, false); specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
TouchList.item() - Web APIs
Web › API › TouchList › item
touch events recommendation initial definition. ...
TouchList.length - Web APIs
Web › API › TouchList › length
touch events recommendation initial definition. ...
TouchList - Web APIs
Web › API › TouchList
operties touchlist.length read only the number of touch objects in the touchlist. methods touchlist.identifiedtouch() returns the first touch item in the list whose identifier matches a specified value. touchlist.item() returns the touch object at the specified index in the list. example see the example on the main touch events article. specifications specification status comment touch events – level 2 draft non-stable version. touch events recommendation initial definition. ...
Touch events - Web APIs
draft added radiusx, radiusy, rotationangle, force properties touch eventsthe definition of 'touch' in that specification. recommendation initial definition. ...
TrackEvent() - Web APIs
. cancelable optional a boolean indicating whether or not the event can be canceled. composed optional a boolean indicating whether or not the event will trigger listeners outside of a shadow root; see event.composed for more details. return value a newly-created trackevent object, initialized as described by the inputs to the constructor. specifications specification status comment html living standardthe definition of 'trackevent()' in that specification. living standard initial definition. html5the definition of 'trackevent()' in that specification. recommendation initial definition. ...
TrackEvent.track - Web APIs
Web › API › TrackEvent › track
erface specifies the media track object to which the event applies. this will be an audiotrack, videotrack, or texttrack object. syntax track = trackevent.track; value an object which is one of the types audiotrack, videotrack, or texttrack, depending on the type of media represented by the track. this identifies the track to which the event applies. specifications specification status comment html living standardthe definition of 'trackevent.track' in that specification. living standard initial definition. html5the definition of 'trackevent.track' in that specification. recommendation initial definition. ...
TrackEvent - Web APIs
living standard initial definition. html5the definition of 'trackevent' in that specification. recommendation initial definition. ...
Transferable - Web APIs
level (technically speaking, using the [transferable] webidl extended attribute). the arraybuffer, messageport, imagebitmap and offscreencanvas types implement this interface. properties the transferable interface does not implement or inherit specific properties. methods the transferable interface does not implement or inherit specific properties. specifications specification status comment html living standardthe definition of 'transferable' in that specification. living standard replaced transferable interface with [transferable] web idl extended attribute. html5the definition of 'transferable' in that specification. recommendation initial definition. ...
TransformStream - Web APIs
building a pwa with progressive loading and progressive streaming. let responses = [ /* conjoined response tree */ ] let {readable, writable} = new transformstream responses.reduce( (a, res, i, arr) => a.then(() => res.pipeto(writable, {preventclose: (i+1) !== arr.length})), promise.resolve() ) note that this is not resilient to other influences. specifications specification status comment streamsthe definition of 'transformstream' in that specification. living standard initial definition ...
TransitionEvent() - Web APIs
or animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay). it defaults to 0.0. pseudoelement optional is a domstring, starting with "::", containing the name of the pseudo-element the animation runs on. if the animation doesn't run on a pseudo-element but on the element, an empty string: "". it defaults to "". specifications specification status comment css transitionsthe definition of 'transitionevent()' in that specification. working draft initial definition. ...
TransitionEvent.transitionName - Web APIs
the transitionevent.transitionname read-only property is a domstring containing the name of the css property associated with the transition. syntax name = transitionevent.transitionname specifications specification status comment css transitionsthe definition of 'transitionevent.transitionname' in that specification. working draft initial definition. ...
TransitionEvent.elapsedTime - Web APIs
the transitionevent.elapsedtime read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired. this value is not affected by the transition-delay property. syntax name = transitionevent.elapsedtime specifications specification status comment css transitionsthe definition of 'transitionevent.elapsedtime' in that specification. working draft initial definition. ...
TransitionEvent.pseudoElement - Web APIs
the transitionevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on. if the transition doesn't run on a pseudo-element but on the element, an empty string: ''. syntax name = transitionevent.pseudoelement specifications specification status comment css transitionsthe definition of 'transitionevent.pseudoelement' in that specification. working draft initial definition. ...
TransitionEvent - Web APIs
to a set of running transitions, though not nessarilty started transitionstart an event fired when a css transition has started transitioning. methods also inherits properties from its parent event. transitionevent.inittransitionevent() initializes a transitionevent created using the deprecated document.createevent("transitionevent") method. specifications specification status comment css transitionsthe definition of 'transitionevent' in that specification. working draft initial definition. ...
TreeWalker.currentNode - Web APIs
tly pointing at. syntax node = treewalker.currentnode; treewalker.currentnode = node; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.currentnode; // the root element as it is the first element! specifications specification status comment domthe definition of 'treewalker.currrentnode' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.currentnode' in that specification. obsolete initial definition. ...
TreeWalker.filter - Web APIs
Web › API › TreeWalker › filter
on every single node to determine whether or not to accept it. syntax nodefilter = treewalker.filter; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = treewalker.filter; // document.body in this case specifications specification status comment domthe definition of 'treewalker.filter' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.filter' in that specification. obsolete initial definition. ...
TreeWalker.firstChild() - Web APIs
urrent node is not changed. syntax node = treewalker.firstchild; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.firstchild(); // returns the first child of the root element, or null if none specifications specification status comment domthe definition of 'treewalker.firstchild' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.firstchild' in that specification. obsolete initial definition. ...
TreeWalker.lastChild() - Web APIs
and the current node is not changed. syntax node = treewalker.lastchild(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.lastchild(); // returns the last visible child of the root element specifications specification status comment domthe definition of 'treewalker.lastchild' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.lastchild' in that specification. obsolete initial definition. ...
TreeWalker.nextNode() - Web APIs
is not changed. syntax node = treewalker.nextnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.nextnode(); // returns the first child of root, as it is the next node in document order specifications specification status comment domthe definition of 'treewalker.nextnode' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextnode' in that specification. obsolete initial definition. ...
TreeWalker.nextSibling() - Web APIs
living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextsibling' in that specification. obsolete initial definition. ...
TreeWalker.parentNode() - Web APIs
returns null and the current node is not changed. syntax node = treewalker.parentnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.parentnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.parentnode' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.parentnode' in that specification. obsolete initial definition. ...
TreeWalker.previousNode() - Web APIs
urns null and the current node is not changed. syntax node = treewalker.previousnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previousnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.previousnode' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previousnode' in that specification. obsolete initial definition. ...
TreeWalker.previousSibling() - Web APIs
current node is not changed. syntax node = treewalker.previoussibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previoussibling(); // returns null as there is no previous sibiling specifications specification status comment domthe definition of 'treewalker.previoussibling' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previoussibling' in that specification. obsolete initial definition. ...
TreeWalker.root - Web APIs
Web › API › TreeWalker › root
nly property returns the node that is the root of what the treewalker traverses. syntax root = treewalker.root; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.root; // document.body in this case specifications specification status comment domthe definition of 'treewalker.root' in that specification. living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.root' in that specification. obsolete initial definition. ...
TreeWalker.whatToShow - Web APIs
living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.whattoshow' in that specification. obsolete initial definition. ...
TreeWalker - Web APIs
is before that the root node defined at the object construction, returns null and the current node is not changed. treewalker.nextnode() moves the current node to the next visible node in the document order, and returns the found node. it also moves the current node to this one. if no such node exists, returns null and the current node is not changed. specifications specification status comment domthe definition of 'treewalker' in that specification. living standard removed the expandentityreferences property. document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker' in that specification. obsolete initial definition. ...
TypeInfo - Web APIs
Web › API › TypeInfo
's name. typeinfo.typenamespace read only returns a domstring indicating the type's namespace within the schema. methods typeinfo.isderivedfrom() returns a boolean. constants constant value derivation_restriction 1 derivation_extension 2 derivation_union 4 derivation_list 8 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'typeinfo' in that specification. obsolete initial definition ...
UIEvent() - Web APIs
Web › API › UIEvent › UIEvent
nal and defaulting to null, of type windowproxy, that is the window associated with the event . sourcecapabilities: an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event. the uieventinit dictionary also accepts fields from the eventinit dictionary. specifications specification status comment inputdevicecapabilities draft added sourcecapabilities property. document object model (dom) level 3 events specificationthe definition of 'uievent()' in that specification. obsolete initial definition. ...
UIEvent.detail - Web APIs
Web › API › UIEvent › detail
the uievent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count. for click or dblclick events, uievent.detail is the current click count. for mousedown or mouseup events, uievent.detail is 1 plus the current click count. for all other uievent objects, uievent.detail is always zero. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.detail' in that specification. obsolete document object model (dom) level 2 events specificationthe definition of 'uievent.detail' in that specification. obsolete initial definition. ...
UIEvent.initUIEvent() - Web APIs
pe of event. for mouse events, it indicates how many times the mouse has been clicked on a given screen location. example var e = document.createevent("uievent"); // creates a click event that bubbles, can be cancelled, // and with its view and detail property initialized to window and 1, // respectively e.inituievent("click", true, true, window, 1); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.inituievent()' in that specification. obsolete from document object model (dom) level 2 events specification, deprecated. document object model (dom) level 2 events specificationthe definition of 'uievent.inituievent()' in that specification. obsolete initial definition. ...
sourceCapabilities - Web APIs
abstraction provided by the web platform. for example, many user agents allow a window to be resized with a mouse or a keyboard, but this detail is not exposed to the web platform in any way, and so the sourcecapabilities of a resize event will typically be null. syntax var idc = event.sourcecapabilities value an instance of inputdevicecapabilities. specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification. draft initial definition. ...
UIEvent.view - Web APIs
Web › API › UIEvent › view
the uievent.view read-only property returns the windowproxy object from which the event was generated. in browsers, this is the window object the event happened in. syntax var view = event.view; view is a reference to an abstractview object. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification. obsolete from document object model (dom) level 2 events specification, changed the type of view from abstractview to windowproxy. document object model (dom) level 2 events specificationthe definition of 'uievent' in that specification. obsolete initial definition. ...
UIEvent - Web APIs
Web › API › UIEvent
ated the event. uievent.which read only returns the numeric keycode of the key pressed, or the character code (charcode) for an alphanumeric key pressed. methods this interface also inherits methods of its parent, event. uievent.inituievent() initializes a uievent object. if the event has already being dispatched, this method does nothing. specifications specification status comment inputdevicecapabilities draft added sourcecapabilities property. ui events working draft extend dom3 document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification. obsolete added the uievent() constructor, deprecated the inituievent() method and changed the type of view from abstractview to windowp...
ULongRange - Web APIs
32-bit integers, specifying the largest permissible value of the property it describes. min a numeric value in the range of signed 32-bit integers, specifying the smallest permissible value of the property it describes. the specified min and/or and max values are required. if no match can be found that is within the given range, an error will occur. specifications specification status comment media capture and streamsthe definition of 'ulongrange' in that specification. candidate recommendation initial definition ...
URL() - Web APIs
Web › API › URL › URL
living standard initial definition. ...
URL.createObjectURL() - Web APIs
ching a stream to a <video> element required creating an object url for the mediastream. this is no longer necessary, and browsers are removing support for doing this. important: if you still have code that relies on createobjecturl() to attach streams to media elements, you need to update your code to simply set srcobject to the mediastream directly. specifications specification status comment file apithe definition of 'createobjecturl()' in that specification. working draft initial definition. media source extensionsthe definition of 'url' in that specification. recommendation mediasource extension. older versions of this specification used createobjecturl() for mediastream objects; this is no longer supported. ...
URL.hash - Web APIs
Web › API › URL › hash
ent is not percent-decoded. if the url does not have a fragment identifier, this property contains an empty string — "". note: this feature is available in web workers. syntax const string = url.hash url.hash = newhash value a usvstring. examples const url = new url('/docs/web/api/url/href#examples'); console.log(url.hash); // logs: '#examples' specifications specification status comment urlthe definition of 'url.hash' in that specification. living standard initial definition ...
URL.host - Web APIs
Web › API › URL › host
living standard initial definition ...
URL.hostname - Web APIs
Web › API › URL › hostname
the hostname property of the url interface is a usvstring containing the domain name of the url. note: this feature is available in web workers. syntax const domain = url.hostname url.hostname = domain value a usvstring. examples const url = new url('/docs/web/api/url/hostname'); console.log(url.hostname); // logs: 'developer.mozilla.org' specifications specification status comment urlthe definition of 'url.hostname' in that specification. living standard initial definition. ...
URL.href - Web APIs
Web › API › URL › href
the href property of the url interface is a usvstring containing the whole url. note: this feature is available in web workers. syntax const urlstring = url.href url.href = newurlstring value a usvstring. examples const url = new url('/docs/web/api/url/href'); console.log(url.href); // logs: '/docs/web/api/url/href' specifications specification status comment urlthe definition of 'url.href' in that specification. living standard initial definition. ...
URL.origin - Web APIs
Web › API › URL › origin
e origin of the url following blob: will be used, e.g "blob:https://mozilla.org" will be returned as "https://mozilla.org". note: this feature is available in web workers. syntax const originstring = url.origin value a usvstring. examples const url = new url("blob:https://mozilla.org:443/") console.log(url.origin); // logs 'https://mozilla.org' specifications specification status comment urlthe definition of 'url.origin' in that specification. living standard initial definition. ...
URL.password - Web APIs
Web › API › URL › password
out first setting the username property, it silently fails. note: this feature is available in web workers. syntax const passwordstring = url.password url.password = newpassword value a usvstring. examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/password'); console.log(url.password) // logs "flabada" specifications specification status comment urlthe definition of 'url.password' in that specification. living standard initial definition. ...
URL.pathname - Web APIs
Web › API › URL › pathname
ng an initial '/' followed by the path of the url (or the empty string if there is no path). note: this feature is available in web workers. syntax const path = url.pathname url.pathname = newpath value a usvstring. examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification. living standard initial definition. ...
URL.pathname - Web APIs
ng an initial '/' followed by the path of the url (or the empty string if there is no path). note: this feature is available in web workers. syntax const path = url.pathname url.pathname = newpath value a usvstring. examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification. living standard initial definition. ...
URL.port - Web APIs
Web › API › URL › port
ng containing the port number of the url. if the url does not contain an explicit port number, it will be set to ''. note: this feature is available in web workers. syntax const portnumber = url.port url.port = newportnumber value a usvstring. examples const url = new url('https://mydomain.com:80/svn/repos/'); console.log(url.port); // logs '80' specifications specification status comment urlthe definition of 'url.port' in that specification. living standard initial definition. ...
URL.protocol - Web APIs
Web › API › URL › protocol
operty of the url interface is a usvstring representing the protocol scheme of the url, including the final ':'. note: this feature is available in web workers. syntax const protocol = url.protocol url.protocol = newprotocol value a usvstring. examples const url = new url('/docs/web/api/url/protocol'); console.log(url.protocol); // logs "https:" specifications specification status comment urlthe definition of 'protocol' in that specification. living standard initial definition. ...
URL.revokeObjectURL() - Web APIs
note: this method is not available from service workers, due to issues with the blob interface's life cycle and the potential for leaks. syntax url.revokeobjecturl(objecturl) parameters objecturl a domstring representing a object url that was previously created by calling createobjecturl(). examples see using object urls to display images. specification specification status comment file apithe definition of 'revokeobjecturl()' in that specification. working draft initial definition ...
URL.search - Web APIs
Web › API › URL › search
rovide the url.searchparams property to make it easy to parse out the parameters from the query string. note: this feature is available in web workers. syntax const searchparams = object.search url.search = newsearchparams value a usvstring. examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification. living standard initial definition. ...
URL.search - Web APIs
Web › API › URL › search?q=123
rovide the url.searchparams property to make it easy to parse out the parameters from the query string. note: this feature is available in web workers. syntax const searchparams = object.search url.search = newsearchparams value a usvstring. examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification. living standard initial definition. ...
URL.searchParams - Web APIs
Web › API › URL › searchParams
alue a urlsearchparams object. examples if the url of your page is https://example.com/?name=jonathan%20smith&age=18 you could parse out the name and age parameters using: let params = (new url(document.location)).searchparams; let name = params.get('name'); // is the string "jonathan smith". let age = parseint(params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification. living standard initial definition. ...
URL.toJSON() - Web APIs
Web › API › URL › toJSON
ns a usvstring containing a serialized version of the url, although in practice it seems to have the same effect as url.tostring(). note: this feature is available in web workers. syntax const href = url.tojson() return value a usvstring. examples const url = new url("/docs/web/api/url/tostring"); url.tojson(); // should return the url as a string specifications specification status comment urlthe definition of 'tojson()' in that specification. living standard initial definition. ...
URL.toString() - Web APIs
Web › API › URL › toString
tostring() stringifier method returns a usvstring containing the whole url. it is effectively a read-only version of url.href. note: this feature is available in web workers. syntax const href = url.tostring() return value a usvstring. examples const url = new url("/docs/web/api/url/tostring"); url.tostring(); // should return the url as a string specifications specification status comment urlthe definition of 'stringifier' in that specification. living standard initial definition. ...
URL.username - Web APIs
Web › API › URL › username
containing the username specified before the domain name. note: this feature is available in web workers. syntax const usernamestring = url.username url.username = newusername value a usvstring. examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/username'); console.log(url.username) // logs "anonymous" specifications specification status comment urlthe definition of 'username' in that specification. living standard initial definition. ...
URL - Web APIs
Web › API › URL
/some.site/?id=123 const parsedurl = new url(window.location.href); console.log(parsedurl.searchparams.get("id")); // "123" the tostring() method of url just returns the value of the href property, so the constructor can be used to normalize and encode a url directly. const response = await fetch(new url('http://www.example.com/démonstration.html')); specifications specification status comment file apithe definition of 'url' in that specification. working draft added the static methods url.createobjecturl() and url.revokeobjecturl(). urlthe definition of 'api' in that specification. living standard initial definition (implements urlutils). ...
URLSearchParams() - Web APIs
living standard initial definition. ...
URLSearchParams.append() - Web APIs
me, value) parameters name the name of the parameter to append. value the value of the parameter to append. return value void. examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter. params.append('foo', 4); //query string is now: 'foo=1&bar=2&foo=4' specifications specification status comment urlthe definition of 'append()' in that specification. living standard initial definition. ...
URLSearchParams.delete() - Web APIs
available in web workers. syntax urlsearchparams.delete(name) parameters name the name of the parameter to be deleted. return value void examples let url = new url('https://example.com?foo=1&bar=2&foo=3'); let params = new urlsearchparams(url.search.slice(1)); // delete the foo parameter. params.delete('foo'); //query string is now: 'bar=2' specifications specification status comment urlthe definition of 'delete()' in that specification. living standard initial definition. ...
URLSearchParams.entries() - Web APIs
searchparams.entries(); parameters none. return value returns an iterator. examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the key/value pairs for(var pair of searchparams.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification. living standard initial definition. ...
URLSearchParams.forEach() - Web APIs
executed against each parameter, with the param value provided as its parameter. return value void. examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // log the values searchparams.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification. living standard initial definition. ...
URLSearchParams.get() - Web APIs
living standard initial definition. ...
URLSearchParams.getAll() - Web APIs
lsearchparams.getall(name) parameters name the name of the parameter to return. return value an array of usvstrings. examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter. params.append('foo', 4); console.log(params.getall('foo')) //prints ["1","4"]. specifications specification status comment urlthe definition of 'getall()' in that specification. living standard initial definition. ...
URLSearchParams.has() - Web APIs
ified name exists. note: this feature is available in web workers. syntax var hasname = urlsearchparams.has(name) parameters name the name of the parameter to find. return value a boolean. examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification. living standard initial definition. ...
URLSearchParams.keys() - Web APIs
e: this method is available in web workers. syntax searchparams.keys(); parameters none. return value returns an iterator. examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the keys for(var key of searchparams.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification. living standard initial definition. ...
URLSearchParams.set() - Web APIs
living standard initial definition. ...
URLSearchParams.sort() - Web APIs
web workers. syntax searchparams.sort(); parameters none. return value undefined. examples // create a test urlsearchparams object var searchparams = new urlsearchparams("c=4&a=2&b=3&a=1"); // sort the key/value pairs searchparams.sort(); // display the sorted query string console.log(searchparams.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification. living standard initial definition ...
URLSearchParams.toString() - Web APIs
urlsearchparams(url.search.slice(1)); //add a second foo parameter. params.append('foo', 4); console.log(params.tostring()); //prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let params = url.searchparams; // or even simpler let params = new urlsearchparams('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification. living standard initial definition. ...
URLSearchParams.values() - Web APIs
re is available in web workers. syntax searchparams.values(); parameters none. return value returns an iterator. examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the values for(var value of searchparams.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification. living standard initial definition. ...
URLSearchParams - Web APIs
living standard initial definition. ...
URLUtilsReadOnly.hash - Web APIs
the urlutilsreadonly.hash read-only property returns a domstring containing a '#' followed by the fragment identifier of the url. the hash is not percent encoded. syntax string = object.hash; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ...
URLUtilsReadOnly.host - Web APIs
the urlutilsreadonly.host read-only property returns a domstring containing the host, that is the hostname, a ':', and the port of the url. syntax string = object.host; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasaf...
URLUtilsReadOnly.hostname - Web APIs
the urlutilsreadonly.hostname read-only property returns a domstring containing the domain of the url. syntax string = object.hostname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome...
URLUtilsReadOnly.href - Web APIs
the urlutilsreadonly.href read-only property is a stringifier that returns a domstring containing the whole url. syntax string = object.href; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutilsreadonly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasaf...
URLUtilsReadOnly.origin - Web APIs
rt, 80 and 443 respectively, if explicitely specified). for url using file: scheme, the value is browser dependant. this version of origin is implemented by workerlocation for use on workers. syntax string = object.origin; examples // on this page, returns the origin var result = self.location.origin; // returns:'https://developer.mozilla.org:443' specifications specification status comment urlthe definition of 'urlutilsreadonly.origin' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinter...
URLUtilsReadOnly.pathname - Web APIs
the urlutilsreadonly.pathname read-only property returns a domstring containing an initial '/' followed by the path of the url. syntax string = object.pathname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.pathname var result = window.self.pathname; // returns:'/urlutilsreadonly.pathname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorerop...
URLUtilsReadOnly.port - Web APIs
living standard initial definition. ...
URLUtilsReadOnly.protocol - Web APIs
the urlutilsreadonly.protocol read-only property returns a domstring containing the protocol scheme of the url, including the final ':'. syntax string = object.protocol; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroi...
URLUtilsReadOnly.search - Web APIs
the urlutilsreadonly.search read-only property returns a domstring containing a '?' followed by the parameters of the url. syntax string = object.search; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewch...
URL API - Web APIs
Web › API › URL API
cell = document.createelement("td"); cell.innertext = val; row.appendchild(cell); tbl.appendchild(row); }; } a working version of this example can be found on glitch. just add parameters to the url when loading the page to see them in the table. for instance, try https://url-api.glitch.me?from=mdn&excitement=high&likelihood=inconceivable. specifications specification status comment url living standard whatwg specification ...
USB.getDevices() - Web APIs
Web › API › USB › getDevices
t name and serial number of paired devices to the console. for information on pairing devices, see usb.requestdevice(). navigator.usb.getdevices() .then(devices => { console.log("total devices: " + devices.length); devices.foreach(device => { console.log("product name: " + device.productname + ", serial number " + device.serialnumber); }); }); specifications specification status comment webusbthe definition of 'getdevices' in that specification. draft initial definition. ...
USB.onconnect - Web APIs
Web › API › USB › onconnect
the onconnect property of the usb interface is an event handler called whenever a paired device is connected. syntax usb.onconnect = connectfunction specifications specification status comment webusbthe definition of 'onconnect' in that specification. draft initial definition. ...
USB.ondisconnect - Web APIs
Web › API › USB › ondisconnect
the ondisconnect property of the usb is an event handler called whenever a paired device is disconnected. syntax usb.ondisconnect = disconnectfunction specifications specification status comment webusbthe definition of 'ondisconnect' in that specification. draft initial definition. ...
USB.requestDevice() - Web APIs
Web › API › USB › requestDevice
cond, then all three devices will be listed. const filters = [ {vendorid: 0x1209, productid: 0xa800}, {vendorid: 0x1209, productid: 0xa850} ]; navigator.usb.requestdevice({filters: filters}) .then(usbdevice => { console.log("product name: " + usbdevice.productname); }) .catch(e => { console.log("there is no device. " + e); }); specifications specification status comment webusbthe definition of 'requestdevice' in that specification. draft initial definition. ...
USB - Web APIs
Web › API › USB
called whenever a paired device is disconnected. methods usb.getdevices() returns a promise that resolves with an array of usbdevice objects for paired attached devices. usb.requestdevice() returns a promise that resolves with an instance of usbdevice if the specified device is found. calling this function triggers the user agent's pairing flow. specifications specification status comment webusbthe definition of 'usb' in that specification. draft initial definition. ...
USBAlternateInterface - Web APIs
if one is provided by the device. this is the value of the string descriptor with the index specified by the iinterface field of the interface descriptor defining this interface. usbalternateinterface.endpointsread only returns an array containing instances of the usbendpoint interface describing each of the endpoints that are part of this interface. specifications specification status comment webusbthe definition of 'usbalternateinterface' in that specification. draft initial definition. ...
USBConfiguration.USBConfiguration() - Web APIs
configuration on the provided usbdevice with the given configuration value. syntax var usbconfiguration = new usbconfiguration(device, configurationvalue) parameters device specifies the usbdevice you want to configure. configurationvalue specifies the configuration descriptor you want to read. this is an unsigned integer in the range 0 to 255. specifications specification status comment unknownthe definition of 'usbconfiguration' in that specification. unknown initial definition. ...
USBConfiguration.configurationName - Web APIs
e name provided by the device to describe this configuration. this is equal to the value of the string descriptor with the index provided in the iconfiguration field of the configuration descriptor defining this configuration. syntax var name = usbconfiguration.configurationname value the name provided by the device to describe this configuration. specifications specification status comment unknownthe definition of 'configurationname' in that specification. unknown initial definition. ...
USBConfiguration.configurationValue - Web APIs
unknown initial definition. ...
USBConfiguration.interfaces - Web APIs
unknown initial definition. ...
USBConfiguration - Web APIs
e to describe this configuration. this is equal to the value of the string descriptor with the index provided in the iconfiguration field of the configuration descriptor defining this configuration. usbconfiguration.interfacesread only returns an array containing instances of the usbinterface describing each interface supported by this configuration. specifications specification status comment webusbthe definition of 'usbconfiguration' in that specification. draft initial definition. ...
USBDevice.deviceClass - Web APIs
draft initial definition. ...
USBDevice.claimInterface() - Web APIs
ice. interfaces are device-specific. return value a promise. example the following example shows claiminterface() in the context of connecting to a usb device. async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'claiminterface()' in that specification. draft initial definition. ...
USBDevice.close() - Web APIs
Web › API › USBDevice › close
draft initial definition. ...
USBDevice.configuration - Web APIs
draft initial definition. ...
USBDevice.configurations - Web APIs
draft initial definition. ...
USBDevice.deviceClass - Web APIs
draft initial definition. ...
USBDevice.deviceProtocol - Web APIs
draft initial definition. ...
USBDevice.deviceSubclass - Web APIs
draft initial definition. ...
USBDevice.deviceVersionMajor - Web APIs
draft initial definition. ...
USBDevice.deviceVersionMinor - Web APIs
draft initial definition. ...
USBDevice.deviceVersionSubminor - Web APIs
draft initial definition. ...
USBDevice.isochronousTransferIn() - Web APIs
transmitted received from the usb device. syntax var promise = usbdevice.isochronoustransferin(endpointnumber, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer). packetlengths an array of lengths for the packets being received. return value a promise that resolves with a usbisochronousintransferresult specifications specification status comment webusbthe definition of 'isochronoustransferin()' in that specification. draft initial definition. ...
USBDevice.isochronousTransferOut() - Web APIs
draft initial definition. ...
USBDevice.manufacturerName - Web APIs
the manufacturername read only property of the usbdevice interface the of the organization that manufactured the usb device. syntax var serialnumber = usbdevice.manufacturername value a domstring. specifications specification status comment webusbthe definition of 'manufacturername' in that specification. draft initial definition. ...
USBDevice.open() - Web APIs
Web › API › USBDevice › open
the open() method of the usbdevice interface returns a promise that resolves when a device session has started. syntax var promise = usbdevice.open() parameters none. return value a promise. specifications specification status comment webusbthe definition of 'open()' in that specification. draft initial definition. ...
USBDevice.opened - Web APIs
Web › API › USBDevice › opened
draft initial definition. ...
USBDevice.productID - Web APIs
the productid read only property of the usbdevice interface the manufacturer-defined code that identifies a usb device. syntax var serialnumber = usbdevice.productid value the manufacturer-defined code that identifies a usb device. specifications specification status comment webusbthe definition of 'productid' in that specification. draft initial definition. ...
USBDevice.productName - Web APIs
the productname read only property of the usbdevice interface the manufacturer-defined name that identifies a usb device. syntax var serialnumber = usbdevice.productname value the manufacturer-defined name that identifies a usb device. specifications specification status comment webusbthe definition of 'productname' in that specification. draft initial definition. ...
USBDevice.releaseInterface() - Web APIs
draft initial definition. ...
USBDevice.reset() - Web APIs
Web › API › USBDevice › reset
draft initial definition. ...
USBDevice.selectAlternateInterface() - Web APIs
the specified alternative endpoint is selected. syntax var promise = usbdevice.selectalternateinterface(interfacenumber, alternatesetting) parameters interfacenumber the index of one of the interfaces supported by the device. interfaces are device-specific. alternatesetting the configuration of the selected interface. return value a promise. specifications specification status comment webusbthe definition of 'selectalternateinterface()' in that specification. draft initial definition. ...
USBDevice.selectConfiguration() - Web APIs
draft initial definition. ...
USBDevice.serialNumber - Web APIs
draft initial definition. ...
USBDevice.transferIn() - Web APIs
draft initial definition. ...
USBDevice.transferOut() - Web APIs
usbtransferoutresult when bulk or interrupt data is sent to the usb device. syntax var promise = usbdevice.transferout(endpointnumber, data) parameters endpointnumber the number of a device-specific endpoint (buffer). data a typedarray containing the data to send to the device. return value a promise that resolves with a usbtransferoutresult. specifications specification status comment webusbthe definition of 'transferout()' in that specification. draft initial definition. ...
USBDevice.usbVersionMajor - Web APIs
the usbdevice interface is one of three properties that declare the usb protocol version supported by the device. the other two properties are usbdevice.usbversionminor and usbdevice.usbversionsubminor. syntax var serialnumber = usbdevice.usbversionmajor value the last of three properties that declare the usb protocol version supported by the device. specifications specification status comment webusbthe definition of 'usbversionmajor' in that specification. draft initial definition. ...
USBDevice.usbVersionMinor - Web APIs
e usbdevice interface is one of three properties that declare the usb protocol version supported by the device. the other two properties are usbdevice.usbversionmajor and usbdevice.usbversionsubminor. syntax var serialnumber = usbdevice.usbversionminor value the second of three properties that declare the usb protocol version supported by the device. specifications specification status comment webusbthe definition of 'usbversionminor' in that specification. draft initial definition. ...
USBDevice.usbVersionSubminor - Web APIs
he usbdevice interface is one of three properties that declare the usb protocol version supported by the device. the other two properties are usbdevice.usbversionmajor and usbdevice.usbversionminor. syntax var serialnumber = usbdevice.usbversionsubminor value the first of three properties that declare the usb protocol version supported by the device. specifications specification status comment webusbthe definition of 'usbversionsubminor' in that specification. draft initial definition. ...
USBDevice.vendorID - Web APIs
the vendorid read only property of the usbdevice interface is the official usg.org-assigned vendor id. syntax var serialnumber = usbdevice.vendorid value the official usg.org-assigned vendor id. specifications specification status comment webusbthe definition of 'vendorid' in that specification. draft initial definition. ...
USBEndpoint - Web APIs
continue; } for (const endpoint of alternate.endpoints) { // identify the bulk transfer endpoints. if (endpoint.type != "bulk") { continue; } if (endpoint.direction == "in") { inendpoint = endpoint.endpointnumber; } else if (endpoint.direction == "out") { outendpoint = endpoint.endpointnumber; } } } specifications specification status comment webusbthe definition of 'usbendpoint' in that specification. draft initial definition. ...
USBInterface - Web APIs
d in alternates. usbinterface.alternatesread only returns an array containing instances of the usbalternateinterface interface describing each of the alternative configurations possible for this interface. usbinterface.claimedread only returns whether or not this interface has been claimed by the current page by calling usbdevice.claiminterface(). specifications specification status comment webusbthe definition of 'usbinterface' in that specification. draft initial definition. ...
USBIsochronousInTransferResult - Web APIs
ice. this is the combined data from all packets. see the individual dataview objects in the packets array for the portion of this buffer containing data from each packet. usbisochronousintransferresult.packetsread only returns an array of usbisochronousintransferpacket objects containing the result of each request to receive a packet from the device. specifications specification status comment webusbthe definition of 'usbisochronousintransferresult' in that specification. draft initial definition. ...
USBIsochronousOutTransferResult - Web APIs
draft initial definition. ...
USVString - Web APIs
Web › API › USVString
n javascript; it's generally only used for apis that perform text processing and need a string of unicode scalar values to operate on. usvstring is equivalent to domstring except for not allowing unpaired surrogate codepoints. unpaired surrogate codepoints present in usvstring are converted by the browser to unicode 'replacement character' u+fffd, (�). specifications specification status comment web idlthe definition of 'usvstring' in that specification. candidate recommendation initial definition. ...
VRStageParameters - Web APIs
draft initial definition ...
VTTCue() - Web APIs
Web › API › VTTCue › VTTCue
a domstring providing the text that will be shown during the time span indicated by starttime and endtime. return value a new vttcue object representing a cue which will be presented during the time span given. example // create a cue that is shown from 2 to 3 seconds and uses the given text. var cue = new vttcue(2, 3, 'cool text to be displayed'); specifications specification status comment webvtt: the web video text tracks formatthe definition of 'vttcue()' in that specification. candidate recommendation ...
VTTCue - Web APIs
Web › API › VTTCue
ck.mode = "showing"; const cuecn = new vttcue(0, 2.500, '字幕会在0至2.5秒间显示'); track.addcue(cuecn); const cueen = new vttcue(2.6, 4, 'subtitles will display between 2.6 and 4 seconds'); track.addcue(cueen); }); result chrome: please open in jsfiddle to view the live sample. embed live sample can not show subtitles in chrome. specifications specification status comment webvtt: the web video text tracks format candidate recommendation ...
VTTRegion - Web APIs
Web › API › VTTRegion
isting cues. ...
validityState.badInput - Web APIs
t is a string. note: while this is unsupported in internet explorer, any non-numeric value will be dismissed from the field if it is a number input. example <input type="number" id="age"> var input = document.getelementbyid("age"); if (input.validity.badinput) { console.log("bad input detected…"); } else { console.log("content of input ok."); } specifications specification status comment html living standardthe definition of 'validitystate.badinput' in that specification. living standard live standard html 5.1the definition of 'validitystate.badinput' in that specification. recommendation no change from the previous snapshot html5. html5the definition of 'validitystate.badinput' in that specification. recommendation first sn...
ValidityState.patternMismatch - Web APIs
oolong or validitystate.tooshort being true. note: the email input type requires, at minimum, a match of x@y and the url type requires, at minimum, a match to x:, with no pattern attribute present. when invalid, the validitystate.typemismatch will be true, if there is no pattern attribute (or if the pattern attribute is not valid for that input type). specifications specification status comment html living standardthe definition of 'validitystate.patternmismatch' in that specification. living standard html 5.1the definition of 'validitystate.patternmismatch' in that specification. recommendation html5the definition of 'validitystate.patternmismatch' in that specification. recommendation ...
ValidityState.rangeOverflow - Web APIs
and range types and a max value is set, if the value don't doesn't conform to the constraints set by the max value, the rangeoverflow property will be true. given the following: <input type="number" min="20" max="40" step="2"/> if value > 40, rangeoverflow will be true. when true, the element matches the :invalid and :out-of-range css pseudo-classes. specifications specification status comment html living standardthe definition of 'validitystate.rangeoverflow' in that specification. living standard html 5.1the definition of 'validitystate.rangeoverflow' in that specification. recommendation html5the definition of 'validitystate.rangeoverflow' in that specification. recommendation ...
ValidityState.rangeUnderflow - Web APIs
nd range types and a min value is set, if the value don't doesn't conform to the constraints set by the min value, the rangeunderflow property will be true. given the following: <input type="number" min="20" max="40" step="2"/> if value < 20, rangeunderflow will be true. when true, the element matches the :invalid and :out-of-range css pseudo-classes. specifications specification status comment html living standardthe definition of 'validitystate.rangeunderflow' in that specification. living standard html 5.1the definition of 'validitystate.rangeunderflow' in that specification. recommendation html5the definition of 'validitystate.rangeunderflow' in that specification. recommendation ...
ValidityState.stepMismatch - Web APIs
nder of the form control's value less the min value, divided by the step value (which defaults to 1 if ommitted) is not zero, there is a mismatch. given the following: <input type="number" min="20" max="40" step="2"/> if (value - min) / 2 != 0, stepmismatch will be true. if true, the element matches the :invalid and :out-of-range css pseudo-classes. specifications specification status comment html living standardthe definition of 'validitystate.stepmismatch' in that specification. living standard html 5.1the definition of 'validitystate.stepmismatch' in that specification. recommendation html5the definition of 'validitystate.stepmismatch' in that specification. recommendation ...
validityState.tooLong - Web APIs
the read-only toolong property of a validitystate object indicates if the value of an <input> or <textarea>, after having been edited by the user, exceeds the maximum code-unit length established by the element's maxlength attribute. specifications specification status comment html living standardthe definition of 'validitystate.toolong' in that specification. living standard html 5.1the definition of 'validitystate.toolong' in that specification. recommendation html5the definition of 'validitystate.toolong' in that specification. recommendation ...
validityState.tooShort - Web APIs
the read-only tooshort property of a validitystate object indicates if the value of an <input>, <button>, <select>, <output>, <fieldset> or <textarea>, after having been edited by the user, is less than the minimum code-unit length established by the element's minlength attribute. specifications specification status comment html living standardthe definition of 'validitystate.tooshort' in that specification. living standard html 5.1the definition of 'validitystate.tooshort' in that specification. recommendation html5the definition of 'validitystate.tooshort' in that specification. recommendation ...
ValidityState.typeMismatch - Web APIs
any possible errors and is only relevant for the email and url types. when the value provided doesn't match the expected value based on the type for other input types, you get different errors. for example, if the number input value is not a floating point number, the badinput is true. if the email is required but is empty, the valuemissing will be true. specifications specification status comment html living standardthe definition of 'validitystate.typemismatch' in that specification. living standard html 5.1the definition of 'validitystate.typemismatch' in that specification. recommendation html5the definition of 'validitystate.typemismatch' in that specification. recommendation ...
ValidityState - Web APIs
s therefore considered to be valid, or false if it fails any constraint. if true, the element matches the :valid css pseudo-class; the :invalid css pseudo-class otherwise. valuemissing read only a boolean that is true if the element has a required attribute, but no value, or false otherwise. if true, the element matches the :invalid css pseudo-class. specifications specification status comment html living standardthe definition of 'validitystate' in that specification. living standard living standard html 5.1the definition of 'validitystate' in that specification. recommendation no change from the previous snapshot html5. html5the definition of 'validitystate' in that specification. recommendation first snapshot of html living st...
Vibration API - Web APIs
...
VideoConfiguration - Web APIs
draft initial definition ...
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
e is greater than 5%, calls a funciton called downgradevideo() that would be implemented to switch to a different video that might tax the network less. var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if (quality.corruptedvideoframes/quality.totalvideoframes > 0.05) { downgradevideo(videoelem); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality: corruptedvideoframes' in that specification. editor's draft ...
VideoPlaybackQuality.creationTime - Web APIs
led lostframesthresholdexceeded() is called to, perhaps, update a quality indicator to show an increase in frame loss. var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.corruptedvideoframes' in that specification. editor's draft initial definition. ...
VideoPlaybackQuality.droppedVideoFrames - Web APIs
is then presented in an element for the user's reference. var videoelem = document.getelementbyid("my_vid"); var percentelem = document.getelementbyid("percent"); var quality = videoelem.getvideoplaybackquality(); var droppercent = (quality.droppedvideoframes/quality.totalvideoframes)*100; percentelem.innertext = math.trunc(droppercent).tostring(10); specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.droppedvideoframes' in that specification. editor's draft initial definition. ...
VideoPlaybackQuality.totalVideoFrames - Web APIs
editor's draft initial definition. ...
VideoPlaybackQuality - Web APIs
e created or dropped. totalframedelay read only a double containing the sum of the frame delay since the creation of the associated htmlvideoelement. the frame delay is the difference between a frame's theoretical presentation time and its effective display time. methods the videoplaybackquality interface has no methods, and does not inherit any. specifications specification status comment media playback qualitythe definition of 'videoplaybackquality' in that specification. editor's draft initial definition. ...
VideoTrack.id - Web APIs
Web › API › VideoTrack › id
ement. the track id can also be used as the fragment of a url that loads the specific track (if the media supports media fragments). syntax var trackid = videotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an videotracklist such as the one specified by a media element's videotracks property. specifications specification status comment html living standardthe definition of 'videotrack: id' in that specification. living standard ...
VideoTrack.kind - Web APIs
Web › API › VideoTrack › kind
"subtitles" a version of the main video track with subtitles burnt in. "commentary" a video track containing a commentary. this might be used to contain the director's commentary track on a movie, for example. "" (empty string) the track doesn't have an explicit kind, or the kind provided by the track's metadata isn't recognized by the user agent. specifications specification status comment html living standardthe definition of 'videotrack: kind' in that specification. living standard ...
VideoTrack.label - Web APIs
Web › API › VideoTrack › label
living standard ...
Videotrack.language - Web APIs
living standard ...
VideoTrack.selected - Web APIs
is active. syntax isvideoselected = videotrack.selected; videotrack.selected = true | false; value the selected property is a boolean whose value is true if the track is active. only a single video track can be active at any given time, so setting this property to true for one track while another track is active will make that other track inactive. specifications specification status comment html living standardthe definition of 'videotrack: selected' in that specification. living standard ...
VideoTrack.sourceBuffer - Web APIs
recommendation ...
VideoTrack - Web APIs
acks, activating the first video track that is in the user's preferred language (taken from a variable userlanguage). for (var i = 0; i < tracks.length; i++) { if (tracks[i].language === userlanguage) { tracks[i].selected = true; break; } }); the language is in standard (rfc 5646) format. for us english, this would be "en-us", for example. specifications specification status comment html living standardthe definition of 'videotrack' in that specification. living standard ...
VideoTrackList: addtrack event - Web APIs
living standard ...
VideoTrackList: change event - Web APIs
living standard ...
getTrackById - Web APIs
st track found within the videotracklist whose id matches the specified string. if no match is found, this method returns null. the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource. specifications specification status comment html living standardthe definition of 'videotracklist.gettrackbyid()' in that specification. living standard ...
VideoTrackList.length - Web APIs
irst <video> element found in the dom by queryselector(). var videoelem = document.queryselector("video"); var numvideotracks = 0; if (videoelem.videotracks) { numvideotracks = videoelem.videotracks.length; } note that this sample checks to be sure htmlmediaelement.videotracks is defined, to avoid failing on browsers without support for videotrack. specifications specification status comment html living standardthe definition of 'videotracklist: length' in that specification. living standard ...
VideoTrackList.onaddtrack - Web APIs
r the addtrack event that calls a function, addtotracklist(), passing in the videotrack object representing the newly-added track. in this scenario, that function's role is to add the new track to a list of video tracks available to choose from. document.queryselector("video").videotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'videotracklist: onaddtrack' in that specification. living standard ...
VideoTrackList.onchange - Web APIs
living standard ...
VideoTrackList.onremovetrack - Web APIs
eo tracks in the media element whenever a track is removed from the media element. document.queryselector("my-video").videotracks.onremovetrack = function(event) { mytrackcount = document.queryselector("my-video").videotracks.length; }; the current number of video tracks remaining in the media element is obtained from videotracklist property length. specifications specification status comment html living standardthe definition of 'videotracklist: onremovetrack' in that specification. living standard ...
VideoTrackList: removetrack event - Web APIs
living standard ...
VideoTrackList.selectedIndex - Web APIs
the read-only videotracklist property selectedindex returns the index of the currently selected track, if any, or -1 otherwise. syntax var index = videotracklist.selectedindex; value a number indicating the index of the currently selected track, if any, or -1 otherwise. specifications specification status comment html living standardthe definition of 'videotracklist: selectedindex' in that specification. living standard ...
VideoTrackList - Web APIs
app that displays information about the number of channels available. to keep it up to date, handlers for the addtrack and removetrack events are set up. videotracks.onaddtrack = updatetrackcount; videotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = videotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'videotracklist' in that specification. living standard ...
VisualViewport.height - Web APIs
the height read-only property of the visualviewport interface returns the height of the visual viewport, in css pixels. syntax var height = visualviewport.height value a double. specifications specification status comment visual viewport apithe definition of 'height' in that specification. draft initial definition. ...
VisualViewport.offsetTop - Web APIs
draft initial definition. ...
VisualViewport.offsetleft - Web APIs
draft initial definition. ...
VisualViewport.onresize - Web APIs
the onresize event handler of the visualviewport interface is called when a viewport is resized, i.e. when the resize event is fired. syntax visualviewport.onresize = function(e) { ... } examples visualviewport.onresize = function(e) { ... } specifications specification status comment visual viewport apithe definition of 'onresize' in that specification. draft initial definition. ...
VisualViewport.onscroll - Web APIs
the onscroll event handler of the visualviewport interface is called when a viewport is scrolled, i.e. when the scroll event is fired. syntax visualviewport.onscroll = function(e) { ... } examples visualviewport.onscroll = function(e) { ... } specifications specification status comment visual viewport apithe definition of 'onscroll' in that specification. draft initial definition. ...
VisualViewport.pageLeft - Web APIs
draft initial definition. ...
VisualViewport.pageTop - Web APIs
draft initial definition. ...
VisualViewport: resize event - Web APIs
draft initial definition ...
VisualViewport.scale - Web APIs
the scale read-only property of the visualviewport interface returns the pinch-zoom scaling factor applied to the visual viewport. syntax var scale = visualviewport.scale value a double. specifications specification status comment visual viewport apithe definition of 'scale' in that specification. draft initial definition. ...
VisualViewport: scroll event - Web APIs
draft initial definition ...
VisualViewport.width - Web APIs
the width read-only property of the visualviewport interface returns the width of the visual viewport, in css pixels. syntax var width = visualviewport.width value a double. specifications specification status comment visual viewport apithe definition of 'width' in that specification. draft initial definition. ...
VisualViewport - Web APIs
draft initial definition. ...
Visual Viewport API - Web APIs
draft initial definition. ...
WEBGL_color_buffer_float - Web APIs
recommendation initial definition. ...
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
rkest parts of the scene. low dynamic ranges are for example jpeg format images which won't exceed 255:1, or crt monitors which won't exceed 100:1. an hdr image stores pixel values that span the whole tonal range of real-world scenes (100,000:1). examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupportedprofiles(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification. recommendation initial definition. ...
WEBGL_compressed_texture_astc - Web APIs
recommendation initial definition. ...
WEBGL_compressed_texture_atc - Web APIs
bgl compresses rgba textures using interpolated alpha encoding (useful when alpha transitions are gradient). examples var ext = gl.getextension('webgl_compressed_texture_atc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_atcthe definition of 'webgl_compressed_texture_atc' in that specification. draft initial definition. ...
WEBGL_compressed_texture_etc - Web APIs
ut with ability to punch through the alpha channel, which means to make it completely opaque or transparent. examples var ext = gl.getextension('webgl_compressed_texture_etc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba8_etc2_eac, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etcthe definition of 'webgl_compressed_texture_etc' in that specification. draft initial definition. ...
WEBGL_compressed_texture_etc1 - Web APIs
exsubimage2d() method). ext.compressed_rgb_etc1_webgl compresses 24-bit rgb data with no alpha channel. examples var ext = gl.getextension('webgl_compressed_texture_etc1'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_etc1_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etc1the definition of 'webgl_compressed_texture_etc1' in that specification. draft initial definition. ...
WEBGL_compressed_texture_pvrtc - Web APIs
xt.compressed_rgba_pvrtc_2bppv1_img rgba compression in 2-bit mode. one block for each 8×4 pixels. examples var ext = gl.getextension('webgl_compressed_texture_pvrtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_pvrtcthe definition of 'webgl_compressed_texture_pvrtc' in that specification. draft initial definition. ...
WEBGL_compressed_texture_s3tc - Web APIs
recommendation initial definition. ...
WEBGL_compressed_texture_s3tc_srgb - Web APIs
recommendation initial definition. ...
WEBGL_debug_renderer_info - Web APIs
recommendation initial definition. ...
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
recommendation initial definition. ...
WEBGL_debug_shaders - Web APIs
nformation, see also using extensions in the webgl tutorial. availability: depending on the privacy settings of the browser, this extension might only be available to privileged contexts. this extension is available to both, webgl1 and webgl2 contexts. methods webgl_debug_shaders.gettranslatedshadersource() returns the translated shader source. specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders' in that specification. recommendation initial definition. ...
WEBGL_depth_texture - Web APIs
nt parameter now accepts gl.depth_stencil_attachment. incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?id=674. examples var ext = gl.getextension('webgl_depth_texture'); gl.teximage2d(gl.texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.unsigned_short, null); specifications specification status comment webgl_depth_texturethe definition of 'webgl_depth_texture' in that specification. recommendation initial definition. ...
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
ext.color_attachment15_webgl return value none. examples see webgl_draw_buffers for more context with this example code. ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification. recommendation initial definition. opengl es 3.0the definition of 'gldrawbuffers' in that specification. standard man page of the (similar) opengl api. ...
WEBGL_draw_buffers - Web APIs
recommendation initial definition. ...
WEBGL_lose_context.loseContext() - Web APIs
recommendation initial definition. ...
WEBGL_lose_context.restoreContext() - Web APIs
id_operation if the context was not lost. examples with this method, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification. recommendation initial definition. ...
WEBGL_lose_context - Web APIs
recommendation initial definition. ...
WakeLock.request() - Web APIs
Web › API › WakeLock › request
t 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 'request()' in that specification. unknown initial definition. ...
WakeLock - Web APIs
Web › API › WakeLock
t 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. unknown initial definition. ...
WakeLockSentinel.release() - Web APIs
returns a promise that resolves with undefined exceptions no exceptions are thrown. you should always listen for the onrelease event to check if a wake lock has been released. examples in this example, when a user clicks a button the wakelocksentinel is released. wakelockoffbutton.addeventlistener('click', () => { wakelocksentinel.release(); }) specifications specification status comment screen wake lock apithe definition of 'release()' in that specification. unknown initial definition. ...
WakeLockSentinel.type - Web APIs
lock. prevents devices from dimming or locking the screen. examples this example shows an asynchronous function that acquires a wakelocksentinel, then logs the type to the console. const requestwakelock = async () => { wakelock = await navigator.wakelock.request('screen'); console.log(wakelock.type); // logs 'screen' }; requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelocktype' in that specification. unknown initial definition. ...
WakeLockSentinel - Web APIs
unknown initial definition. ...
WaveShaperNode.WaveShaperNode() - Web APIs
as follows: curve: the shaping curve used for the waveshaping effect. the input signal is nominally within the range [-1;1]. oversample: specifies what type of oversampling (if any) should be used when applying the shaping curve. valid values are 'none', '2x', or '4x'. the default is 'none'. return value a new waveshapernode object instance. specifications specification status comment web audio apithe definition of 'waveshapernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
WaveShaperNode.curve - Web APIs
working draft ...
WaveShaperNode.oversample - Web APIs
working draft ...
WaveShaperNode - Web APIs
working draft ...
WebGL2RenderingContext.beginQuery() - Web APIs
e: same as above above, but less accurate and faster version. gl.transform_feedback_primitives_written: number of primitives that are written to transform feedback buffers. query a webglquery object for which to start the querying. return value none. examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); // ... specifications specification status comment webgl 2.0the definition of 'beginquery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glbeginquery' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
into the buffer objects that are bound for transform feedback. possible values: gl.points gl.lines gl.triangles return value none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); specifications specification status comment webgl 2.0the definition of 'begintransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glbegintransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.bindBufferBase() - Web APIs
s target a glenum specifying the target for the bind operation. possible values: gl.transform_feedback_buffer gl.uniform_buffer index a gluint specifying the index of the target. buffer a webglbuffer which to bind to the binding point (target). return value none. examples gl.bindbufferbase(gl.transform_feedback_buffer, 0, buffer); specifications specification status comment webgl 2.0the definition of 'bindbufferbase' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glbindbufferbase' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.bindBufferRange() - Web APIs
index a gluint specifying the index of the target. buffer a webglbuffer which to bind to the binding point (target). offset a glintptr specifying the starting offset. size a glsizeiptr specifying the amount of data that can be read from the buffer. return value none. examples gl.bindbufferrange(gl.transform_feedback_buffer, 1, buffer, 0, 4); specifications specification status comment webgl 2.0the definition of 'bindbufferrange' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glbindbufferrange' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.bindSampler() - Web APIs
a passed webglsampler object to the texture unit at the passed index. syntax void gl.bindsampler(unit, sampler); parameters unit a gluint specifying the index of the texture unit to which to bind the sampler to. sampler a webglsampler object to bind. return value none. examples var sampler = gl.createsampler(); gl.bindsampler(0, sampler); specifications specification status comment webgl 2.0the definition of 'bindsampler' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glbindsampler' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
feedback(target, transformfeedback); parameters target a glenum specifying the target (binding point). must be gl.transform_feedback. transformfeedback a webgltransformfeedback object to bind. return value none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); specifications specification status comment webgl 2.0the definition of 'bindtransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glbindtransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.bindVertexArray() - Web APIs
lvertexarrayobject object to the buffer. syntax void gl.bindvertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to bind. return value none. examples var vao = gl.createvertexarray(); gl.bindvertexarray(vao); // ... // calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ... specifications specification status comment webgl 2.0the definition of 'bindvertexarray' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glbindvertexarray' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.blitFramebuffer() - Web APIs
gl.stencil_buffer_bit filter a glenum specifying the interpolation to be applied if the image is stretched. possible values: gl.nearest gl.linear return value none. examples gl.blitframebuffer(0, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height, gl.color_buffer_bit, gl.nearest); specifications specification status comment webgl 2.0the definition of 'blitframebuffer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glblitframebuffer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
clear the stencil render buffer to. return value none. examples gl.clearbufferiv(gl.color, 0, new int32array([r, g, b, a])); gl.clearbufferuiv(gl.color, 0, new uint32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, new float32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, [0.0, 0.0, 0.0, 0.0]); gl.clearbufferfi(gl.depth_stencil, 0, 1.0, 0); specifications specification status comment webgl 2.0the definition of 'clearbuffer[fiuv]()' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glclearbuffer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
fer. offset a glint specifying the offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer. srcdata an arraybufferview that be used as a data store for the compressed image data in memory. return value none. examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glcompressedtexsubimage3d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.copyBufferSubData() - Web APIs
editor's draft initial definition for webgl. opengl es 3.0the definition of 'glcopybuffersubdata' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
oordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. return value none. examples gl.copytexsubimage3d(gl.texture_3d, 0, 0, 0, 0, 0, 0, 16, 16); specifications specification status comment webgl 2.0the definition of 'copytexsubimage3d' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glcopytexsubimage3d' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.createQuery() - Web APIs
y() method of the webgl 2 api creates and initializes webglquery objects, which provide ways to asynchronously query for information. syntax webglquery gl.createquery(); parameters none. return value a webglquery object. examples gl must be a webgl2renderingcontext. webglquery objects are not available in webgl 1. var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'createquery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgenqueries' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.createSampler() - Web APIs
the webgl2renderingcontext.createsampler() method of the webgl 2 api creates and initializes webglsampler objects. syntax webglsampler gl.createsampler(); parameters none. return value a webglsampler object. examples gl must be a webgl2renderingcontext. webglsampler objects are not available in webgl 1. var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'createsampler' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgensamplers' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.createTransformFeedback() - Web APIs
2 api creates and initializes webgltransformfeedback objects. syntax webgltransformfeedback gl.createtransformfeedback(); parameters none. return value a webgltransformfeedback object. examples gl must be a webgl2renderingcontext. webgltransformfeedback objects are not available in webgl 1. var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'createtransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgentransformfeedbacks' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.createVertexArray() - Web APIs
x webglvertexarrayobject gl.createvertexarray(); parameters none. return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data. examples var vao = gl.createvertexarray(); gl.bindvertexarray(vao); // ... // calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ... specifications specification status comment webgl 2.0the definition of 'createvertexarray' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgenvertexarrays' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.deleteQuery() - Web APIs
context.deletequery() method of the webgl 2 api deletes a given webglquery object. syntax void gl.deletequery(query); parameters query a webglquery object to delete. return value none. examples gl must be a webgl2renderingcontext. webglquery objects are not available in webgl 1. var query = gl.createquery(); // ... gl.deletequery(query); specifications specification status comment webgl 2.0the definition of 'deletequery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'gldeletequeries' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.deleteSampler() - Web APIs
) method of the webgl 2 api deletes a given webglsampler object. syntax void gl.deletesampler(sampler); parameters sampler a webglsampler object to delete. return value none. examples gl must be a webgl2renderingcontext. webglsampler objects are not available in webgl 1. var sampler = gl.createsampler(); // ... gl.deletesampler(sampler); specifications specification status comment webgl 2.0the definition of 'deletesampler' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'gldeletesamplers' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.deleteSync() - Web APIs
method of the webgl 2 api deletes a given webglsync object. syntax void gl.deletesync(sync); parameters sync a webglsync object to delete. return value none. examples gl must be a webgl2renderingcontext. webglsync objects are not available in webgl 1. var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); // ... gl.deletesync(sync); specifications specification status comment webgl 2.0the definition of 'deletesync' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldeletesync' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.deleteTransformFeedback() - Web APIs
ansformfeedback(transformfeedback); parameters transformfeedback a webgltransformfeedback object to delete. return value none. examples gl must be a webgl2renderingcontext. webgltransformfeedback objects are not available in webgl 1. var transformfeedback = gl.createtransformfeedback(); // ... gl.deletetransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'deletetransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldeletetransformfeedbacks' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.deleteVertexArray() - Web APIs
context.deletevertexarray() method of the webgl 2 api deletes a given webglvertexarrayobject object. syntax void gl.deletevertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to delete. return value none. examples var vao = gl.createvertexarray(); gl.bindvertexarray(vao); // ... gl.deletevertexarray(vao); specifications specification status comment webgl 2.0the definition of 'deletevertexarray' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'gldeletevertexarrays' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
e for a group of three vertices. first a glint specifying the starting index in the array of vector points. count a glsizei specifying the number of indices to be rendered. instancecount a glsizei specifying the number of instances of the range of elements to execute. return value none. examples gl.drawarraysinstanced(gl.points, 0, 8, 4); specifications specification status comment webgl 2.0the definition of 'drawarraysinstanced' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldrawarraysinstanced' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.drawBuffers() - Web APIs
r output is written into the back color buffer. gl.color_attachment{0-15}: fragment shader output is written in the nth color attachment of the current framebuffer. return value none. exceptions if buffers contains not one of the accepted values, a gl.invalid_enum error is thrown. examples gl.drawbuffers([gl.none, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'drawbuffers' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldrawbuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count or instancecount are negative, a gl.invalid_value error is thrown. examples gl.drawelementsinstanced(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment webgl 2.0the definition of 'drawelementsinstanced' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldrawelementsinstanced' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.drawRangeElements() - Web APIs
ype. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count is negative, a gl.invalid_value error is thrown. examples gl.drawrangeelements(gl.points, 0, 7, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 2.0the definition of 'drawrangeelements' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gldrawrangeelements' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.endQuery() - Web APIs
mples_passed_conservative: same as above above, but less accurate and faster version. gl.transform_feedback_primitives_written: number of primitives that are written to transform feedback buffers. return value none. examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); // ... gl.endquery(gl.any_samples_passed); specifications specification status comment webgl 2.0the definition of 'endquery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glendquery' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.endTransformFeedback() - Web APIs
ends a transform feedback operation. syntax void gl.endtransformfeedback(); parameters none. return value none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'endtransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glendtransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.fenceSync() - Web APIs
mands_complete. flags a glbitfield specifying a bitwise combination of flags controlling the behavior of the sync object. must be 0 (exists for extensions only). return value a webglsync object. examples gl must be a webgl2renderingcontext. webglsync objects are not available in webgl 1. var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'fencesync' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glfencesync' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
il buffer. texture a webgltexture object whose image to attach. level a glint specifying the mipmap level of the texture image to attach. layer a glint specifying the layer of the texture image to attach. return value none. examples gl.framebuffertexturelayer(gl.framebuffer, gl.color_attachment0, texture, 0, 8); specifications specification status comment webgl 2.0the definition of 'framebuffertexturelayer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glframebuffertexturelayer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
ctiveuniformblockname(program, uniformblockindex); parameters program a webglprogram containing the uniform block. uniformblockindex a gluint specifying the index of the uniform block to whose name to retrieve. return value a domstring indicating the active uniform block name. examples var blockname = gl.getactiveuniformblockname(program, 0); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockname' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetactiveuniformblockname' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
: returns a glboolean indicating whether the uniform block is referenced by the fragment shader. return value depends on which information is requested using the pname parameter. if an error occurs, null is returned. examples var blocksize = gl.getactiveuniformblockparameter(program, blockindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockparameter' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetactiveuniformblockiv' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getActiveUniforms() - Web APIs
of glboolean indicating whether each of the uniforms is a row-major matrix or not. return value depends on which information is requested using the pname parameter. examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); var uniformoffsets = gl.getactiveuniforms(program, uniformindices, gl.uniform_offset); specifications specification status comment webgl 2.0the definition of 'getactiveuniforms' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetactiveuniformsiv' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getBufferSubData() - Web APIs
fer, and any transform feedback object is currently active. examples var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array(vertices), gl.static_draw); var arrbuffer = new arraybuffer(vertices.length * float32array.bytes_per_element); gl.getbuffersubdata(gl.array_buffer, 0, arrbuffer); specifications specification status comment webgl 2.0the definition of 'getbuffersubdata' in that specification. editor's draft initial definition. ...
WebGL2RenderingContext.getFragDataLocation() - Web APIs
glint gl.getfragdatalocation(program, name); parameters program a webglprogram to query. name a domstring specifying the name of the user-defined varying out variable. return value a glint indicating the assigned color number binding, or -1 otherwise. examples // program is a linked webglprogram gl.getfragdatalocation(program, 'fragcolor'); specifications specification status comment webgl 2.0the definition of 'getfragdatalocation' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgetfragdatalocation' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getIndexedParameter() - Web APIs
s a webglbuffer. gl.uniform_buffer_size: returns a glsizeiptr. gl.uniform_buffer_start: returns a glintptr. index a gluint specifying the index of the target that is queried. return value depends on the requested information (as specified with target). examples var binding = gl.getindexedparameter(gl.transform_feedback_buffer_binding, 0); specifications specification status comment webgl 2.0the definition of 'getindexedparameter' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glget' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
a int32array containing sample counts supported for internalformat in descending order. return value depends on the requested information (as specified with pname). it is an int32array if pname is gl.samples. examples var samples = gl.getinternalformatparameter(gl.renderbuffer, gl.rgba8, gl.samples); specifications specification status comment webgl 2.0the definition of 'getinternalformatparameter' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetinternalformativ' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getQuery() - Web APIs
but less accurate and faster version. gl.transform_feedback_primitives_written: number of primitives that are written to transform feedback buffers. pname a glenum specifying the query object target. must be gl.current_query. return value a webglquery object. examples var currentquery = gl.getquery(gl.any_samples_passed, gl.current_query); specifications specification status comment webgl 2.0the definition of 'getquery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgetqueryiv' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getQueryParameter() - Web APIs
ing the query result. gl.query_result_available: returns a glboolean indicating whether or not a query result is available. return value depends on the pname parameter, either a gluint or a glboolean. examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); var result = gl.getqueryparameter(query, gl.query_result); specifications specification status comment webgl 2.0the definition of 'getqueryparameter' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgetqueryobjectuiv' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getSamplerParameter() - Web APIs
g the texture wrapping function for the texture coordinate s. gl.texture_wrap_t: returns a glenum indicating the texture wrapping function for the texture coordinate t. return value depends on the pname parameter, either a glenum or a glfloat. examples var sampler = gl.createsampler(); gl.getsamplerparameter(sampler, gl.texture_compare_func); specifications specification status comment webgl 2.0the definition of 'getsamplerparameter' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glgetsamplerparameter' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getTransformFeedbackVarying() - Web APIs
s from webgltransformfeedback buffers. syntax webglactiveinfo gl.gettransformfeedbackvarying(program, index); parameters program a webglprogram. index a gluint specifying the index of the varying variable whose information to retrieve. return value a webglactiveinfo object. examples activeinfo = gl.gettransformfeedbackvarying(program, 0); specifications specification status comment webgl 2.0the definition of 'gettransformfeedbackvarying' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgettransformfeedbackvarying' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
ecifying the name of the uniform block to whose index to retrieve. return value a gluint indicating the uniform block index. examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetuniformblockindex' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.getUniformIndices() - Web APIs
program, uniformnames); parameters program a webglprogram containing uniforms whose indices to query. uniformnames an array of domstring specifying the names of the uniforms to query. return value an array of gluint containing the uniform indices. examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); specifications specification status comment webgl 2.0the definition of 'getuniformindices' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glgetuniformindices' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
dates the framebuffer's depth buffer. gl.stencil_attachment: invalidates the framebuffer's stencil buffer. gl.depth_stencil_attachment: invalidates both the framebuffer's depth and stencil buffer. return value none. examples gl.invalidateframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'invalidateframebuffer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glinvalidateframebuffer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
width a glsizei specifying the width of the pixel rectangle to invalidate. height a glsizei specifying the height of the pixel rectangle to invalidate. return value none. examples gl.invalidatesubframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1], 0, 0, 256, 256); specifications specification status comment webgl 2.0the definition of 'invalidatesubframebuffer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glinvalidatesubframebuffer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.isQuery() - Web APIs
x glboolean gl.isquery(query); parameters query a webglquery object to test. return value a glboolean indicating whether the given object is a valid webglquery object (true) or not (false). examples gl must be a webgl2renderingcontext. webglquery objects are not available in webgl 1. var query = gl.createquery(); // ... gl.isquery(query); specifications specification status comment webgl 2.0the definition of 'isquery' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glisquery' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.isSampler() - Web APIs
mpler(sampler); parameters sampler a webglsampler object to test. return value a glboolean indicating whether the given object is a valid webglsampler object (true) or not (false). examples gl must be a webgl2renderingcontext. webglsampler objects are not available in webgl 1. var sampler = gl.createsampler(); // ... gl.issampler(sampler); specifications specification status comment webgl 2.0the definition of 'issampler' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glissampler' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.isSync() - Web APIs
c(sync); parameters sync a webglsync object to test. return value a glboolean indicating whether the given object is a valid webglsync object (true) or not (false). examples gl must be a webgl2renderingcontext. webglsync objects are not available in webgl 1. var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); // ... gl.issync(sync); specifications specification status comment webgl 2.0the definition of 'issync' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glissync' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.isTransformFeedback() - Web APIs
ct to test. return value a glboolean indicating whether the given object is a valid webgltransformfeedback object (true) or not (false). examples gl must be a webgl2renderingcontext. webgltransformfeedback objects are not available in webgl 1. var transformfeedback = gl.createtransformfeedback(); // ... gl.istransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'istransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glistransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.isVertexArray() - Web APIs
syntax glboolean gl.isvertexarray(vertexarray); parameters vertexarray a webglvertexarrayobject (vao) object to test. return value a glboolean indicating whether the given object is a valid webglvertexarrayobject object (true) or not (false). examples var vao = gl.createvertexarray(); gl.bindvertexarray(vao); // ... gl.isvertexarray(vao); specifications specification status comment webgl 2.0the definition of 'isvertexarray' in that specification. editor's draft initial definition. opengl es 3.0the definition of 'glisvertexarray' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
rmfeedback(); parameters none. return value none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.pausetransformfeedback(); //... gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'pausetransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glpausetransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.readBuffer() - Web APIs
dpixels. syntax void gl.readbuffer(src); parameters src a glenum specifying a color buffer. possible values: gl.back: reads from the back color buffer. gl.none: reads from no color buffer. gl.color_attachment{0-15}: reads from one of the 16 color attachment buffers. return value none. examples gl.readbuffer(gl.color_attachment0); specifications specification status comment webgl 2.0the definition of 'readbuffer' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glreadbuffer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
epth_component32f gl.depth_stencil gl.depth24_stencil8 gl.depth32f_stencil8 gl.stencil_index8 width a glsizei specifying the width of the renderbuffer in pixels. height a glsizei specifying the height of the renderbuffer in pixels. return value none. examples gl.renderbufferstoragemultisample(gl.renderbuffer, 4, gl.rbga4, 256, 256); specifications specification status comment webgl 2.0the definition of 'glrenderbufferstoragemultisample' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glrenderbufferstoragemultisample' in that specification. standard man page of the (similar) opengl es 3 api. ...
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
rmfeedback(); parameters none. return value none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.pausetransformfeedback(); //... gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'resumetransformfeedback' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glresumetransformfeedback' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.texImage3D() - Web APIs
editor's draft updated definition for webgl. opengl es 3.0the definition of 'glteximage3d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.texStorage2D() - Web APIs
compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. return value none. examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage2d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.texStorage3D() - Web APIs
gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. depth a glsizei specifying the depth of the texture. return value none. examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexstorage3d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.texSubImage3D() - Web APIs
tmlvideoelement. offset a glintptr byte offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target. return value none. examples gl.texsubimage3d(gl.texture_3d, 0, 0, 0, 0, image.width, image.height, 1, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 2.0the definition of 'texsubimage3d' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltexsubimage2d' in that specification. standard man page of the (similar) opengl es 3.0 api. ...
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
none. examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); var transformfeedbackoutputs = ['gl_position', 'anotheroutput']; gl.transformfeedbackvaryings(shaderprog, transformfeedbackoutputs, gl.interleaved_attribs); gl.linkprogram(shaderprog); specifications specification status comment webgl 2.0the definition of 'transformfeedbackvaryings' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gltransformfeedbackvaryings' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
ation of the uniform attribute to modify. data, v0, v1, v2, v3 a new value to be used for the uniform variable. possible types: a number for unsigned integer values (methods with ui), for integer values (methods with i), or for floats (methods with f). a uint32array for unsigned integer vector methods (methods with uiv). return value none. specifications specification status comment webgl 2.0the definition of 'uniform' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gluniform' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
rs program a webglprogram containing the active uniform block whose binding to assign. uniformblockindex a gluint specifying the index of the active uniform block within the program. uniformblockbinding a gluint specifying the binding point to which to bind the uniform block. return value none. examples gl.uniformblockbinding(program, 0, 1); specifications specification status comment webgl 2.0the definition of 'uniformblockbinding' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gluniformblockbinding' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
rcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify. transpose a glboolean specifying whether to transpose the matrix. must be false. data a float32array of float values. return value none. examples gl.uniformmatrix2x3fv(loc, false, [1, 2, 3, 4, 5, 6]); specifications specification status comment webgl 2.0the definition of 'uniformmatrix' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'gluniformmatrix' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
extension can provide this method, too. syntax void gl.vertexattribdivisor(index, divisor); parameters index a gluint specifying the index of the generic vertex attributes. divisor a gluint specifying the number of instances that will pass between updates of the generic attribute. return value none. examples gl.vertexattribdivisor(0, 2); specifications specification status comment webgl 2.0the definition of 'vertexattribdivisor' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glvertexattribdivisor' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
(index, value); parameters index a gluint specifying the position of the vertex attribute to be modified. v0, v1, v2, v3 an integer number for the vertex attribute value. value a uint32array/int32array or sequences of gluint/ glint for integer vector vertex attribute values. return value none. examples gl.vertexattribi4i(a_foobar, 10); specifications specification status comment webgl 2.0the definition of 'vertexattribi' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glvertexattribi' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
editor's draft initial definition for webgl. opengl es 3.0the definition of 'glvertexattribpointer' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext.waitSync() - Web APIs
ying a bitwise combination of flags controlling the flushing behavior. must be 0 (exists for extensions only). timeout a glint64 specifying a timeout the server should wait before continuing. must be gl.timeout_ignored. return value none. examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.waitsync(sync, 0, gl.timeout_ignored); specifications specification status comment webgl 2.0the definition of 'waitsync' in that specification. editor's draft initial definition for webgl. opengl es 3.0the definition of 'glwaitsync' in that specification. standard man page of the (similar) opengl api. ...
WebGL2RenderingContext - Web APIs
ngcontext.createvertexarray() creates a new webglvertexarrayobject. webgl2renderingcontext.deletevertexarray() deletes a given webglvertexarrayobject. webgl2renderingcontext.isvertexarray() returns true if a given object is a valid webglvertexarrayobject. webgl2renderingcontext.bindvertexarray() binds a given webglvertexarrayobject to the buffer. specifications specification status comment webgl 2.0the definition of 'webgl2renderingcontext' in that specification. editor's draft initial definition. ...
WebGLActiveInfo.name - Web APIs
recommendation initial definition. ...
WebGLActiveInfo.size - Web APIs
recommendation initial definition. ...
WebGLActiveInfo.type - Web APIs
recommendation initial definition. ...
WebGLActiveInfo - Web APIs
recommendation initial definition. ...
WebGLBuffer - Web APIs
recommendation initial definition. ...
WebGLFramebuffer - Web APIs
recommendation initial definition. ...
WebGLQuery - Web APIs
editor's draft initial definition. ...
WebGLRenderbuffer - Web APIs
recommendation initial definition. ...
WebGLRenderingContext.activeTexture() - Web APIs
et this number with the help of the max_combined_texture_image_units constant. it is, per specification, at least 8. gl.getparameter(gl.max_combined_texture_image_units); to get the active texture, query the active_texture constant. gl.activetexture(gl.texture0); gl.getparameter(gl.active_texture); // returns "33984" (0x84c0, gl.texture0 enum value) specifications specification status comment webgl 1.0the definition of 'activetexture' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glactivetexture' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.attachShader() - Web APIs
am, shader); parameters program a webglprogram. shader a fragment or vertex webglshader. examples the following code attaches pre-existing shaders to a webglprogram. var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program. \n\n' + info; } specifications specification status comment webgl 1.0the definition of 'attachshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glattachshader' in that specification. standard opengl man page. ...
WebGLRenderingContext.bindAttribLocation() - Web APIs
ject to bind. index a gluint specifying the index of the generic vertex to bind. name a domstring specifying the name of the variable to bind to the generic vertex index. this name cannot start with "webgl_" or "_webgl_", as these are reserved for use by webgl. return value none. examples gl.bindattriblocation(program, colorlocation, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'bindattriblocation' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glbindattriblocation' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.bindBuffer() - Web APIs
('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants. gl.getparameter(gl.array_buffer_binding); gl.getparameter(gl.element_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'bindbuffer' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbindbuffer' in that specification. standard man page of the (similar) opengl es 2 api. webgl 2.0the definition of 'bindbuffer' in that specification. editor's draft updated definition for webgl 2.
WebGLRenderingContext.bindFramebuffer() - Web APIs
binding a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); getting current bindings to check the current frame buffer binding, query the framebuffer_binding constant. gl.getparameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbindframebuffer' in that specification. standard man page of the opengl api. webgl 2.0the definition of 'bindframebuffer' in that specification. editor's draft updated definition for webgl 2. ...
WebGLRenderingContext.bindRenderbuffer() - Web APIs
recommendation initial definition. opengl es 2.0the definition of 'glbindrenderbuffer' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.bindTexture() - Web APIs
ing a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); getting current bindings to check the current texture binding, query the gl.texture_binding_2d or gl.texture_binding_cube_map constants. gl.getparameter(gl.texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bindtexture' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbindtexture' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'bindtexture' in that specification. editor's draft updated definition for webgl 2.
WebGLRenderingContext.blendColor() - Web APIs
omponent in the range of 0 to 1. alpha a glclampf for the alpha component (transparency) in the range of 0 to 1. return value none. examples to set the blend color, use: gl.blendcolor(0, 0.5, 1, 1); to get the blend color, query the blend_color constant which returns a float32array. gl.getparameter(gl.blend_color); // float32array[0, 0.5, 1, 1] specifications specification status comment webgl 1.0the definition of 'blendcolor' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glblendcolor' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.blendEquation() - Web APIs
tions, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext. gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequation' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glblendequation' in that specification. standard man page of the opengl es 2.0 api. opengl es 3.0the definition of 'glblendequation' in that specification. standard man page of the opengl es 3.0 api. ...
WebGLRenderingContext.blendEquationSeparate() - Web APIs
tions, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext. gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequationseparate' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glblendequationseparate' in that specification. standard man page of the opengl es 2.0 api. opengl es 3.0the definition of 'glblendequationseparate' in that specification. standard man page of...
WebGLRenderingContext.blendFunc() - Web APIs
nable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants. gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification. recommendation initial definition. in webgl, constant color and constant alpha cannot be used together as source and destination factors in the blend function. see section 6.13. of the specification. opengl es 2.0the definition of 'glblendfunc' in that specification. standard man page of the...
WebGLRenderingContext.blendFuncSeparate() - Web APIs
, gl.dst_color, gl.one, gl.zero); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants. gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification. recommendation initial definition. in webgl, constant color and constant alpha cannot be used together as source and destination factors in the blend function. see section 6.13. of the specification. opengl es 2.0the definition of 'glblendfunc' in that specification. standard man page of the...
WebGLRenderingContext.bufferData() - Web APIs
lrenderingcontext.getbufferparameter() method. gl.getbufferparameter(gl.array_buffer, gl.buffer_size); gl.getbufferparameter(gl.array_buffer, gl.buffer_usage); getting size of a typed array to calculate size parameter for a typed array. var dataarray = new float32array([1, 2, 3, 4]); var sizeinbytes = dataarray.length * dataarray.bytes_per_element; specifications specification status comment webgl 1.0the definition of 'bufferdata' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glbufferdata' in that specification. standard man page of the opengl api. opengl es 3.0the definition of 'glbufferdata' in that specification. standard man page of the (similar) opengl es 3 api. adds new ta...
WebGLRenderingContext.bufferSubData() - Web APIs
d_enum error is thrown if target is not one of the allowed enums. examples using buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of 'buffersubdata' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glbuffersubdata' in that specification. standard man page of the opengl es 2 api. opengl es 3.0the definition of 'glbuffersubdata' in that specification. standard man page of the (similar) opengl es 3...
WebGLRenderingContext.canvas - Web APIs
recommendation initial definition. ...
WebGLRenderingContext.clear() - Web APIs
method accepts multiple values. gl.clear(gl.depth_buffer_bit); gl.clear(gl.depth_buffer_bit | gl.color_buffer_bit); to get the current clear values, query the color_clear_value, depth_clear_value, and stencil_clear_value constants. gl.getparameter(gl.color_clear_value); gl.getparameter(gl.depth_clear_value); gl.getparameter(gl.stencil_clear_value); specifications specification status comment webgl 1.0the definition of 'clear' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glclear' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.clearColor() - Web APIs
alpha a glclampf specifying the alpha (transparency) value used when the color buffers are cleared. default value: 0. return value none. examples gl.clearcolor(1, 0.5, 0.5, 3); to get the current clear color, query the color_clear_value constant which returns a float32array. gl.getparameter(gl.color_clear_value); // float32array[1, 0.5, 0.5, 1] specifications specification status comment webgl 1.0the definition of 'clearcolor' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glclearcolor' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.clearDepth() - Web APIs
clamped between 0 and 1. syntax void gl.cleardepth(depth); parameters depth a glclampf specifying the depth value used when the depth buffer is cleared. default value: 1. return value none. examples gl.cleardepth(0.5); to get the current depth clear value, query the depth_clear_value constant. gl.getparameter(gl.depth_clear_value); // 0.5 specifications specification status comment webgl 1.0the definition of 'cleardepth' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcleardepthf' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.clearStencil() - Web APIs
when calling the clear() method. syntax void gl.clearstencil(s); parameters s a glint specifying the index used when the stencil buffer is cleared. default value: 0. return value none. examples gl.clearstencil(1); to get the current stencil clear value, query the stencil_clear_value constant. gl.getparameter(gl.stencil_clear_value); // 1 specifications specification status comment webgl 1.0the definition of 'clearstencil' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glclearstencil' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.colorMask() - Web APIs
lean specifying whether or not the alpha (transparency) component can be written into the frame buffer. default value: true. return value none. examples gl.colormask(true, true, true, false); to get the current color mask, query the color_writemask constant which returns an array. gl.getparameter(gl.color_writemask); // [true, true, true, false] specifications specification status comment webgl 1.0the definition of 'colormask' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcolormask' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.commit() - Web APIs
directly fixed to a specific canvas. syntax void webglrenderingcontext.commit() examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ... some drawing using the gl context ... // push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'the commit() method of the offscreencanvas object's rendering context' in that specification. living standard ...
WebGLRenderingContext.compileShader() - Web APIs
ingcontext.compileshader() method of the webgl api compiles a glsl shader into binary data so that it can be used by a webglprogram. syntax void gl.compileshader(shader); parameters shader a fragment or vertex webglshader. examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, shadersource); gl.compileshader(shader); specifications specification status comment webgl 1.0the definition of 'compileshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcompileshader' in that specification. standard opengl man page. ...
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
recommendation initial definition for webgl. opengl es 2.0the definition of 'glcompressedteximage2d' in that specification. standard man page of the (similar) opengl es 2.0 api. opengl es 3.0the definition of 'glcompressedteximage2d' in that specification. standard man ...
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
d image data in memory. return value none. examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); gl.compressedtexsubimage2d(gl.texture_2d, 0, 256, 256, 512, 512, ext.compressed_rgba_s3tc_dxt5_ext, texturedata); specifications specification status comment webgl 1.0the definition of 'compressedtexsubimage2d' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glcompressedtexsubimage2d' in that specification. standard man page of the (similar) opengl es 2.0 api. opengl es 3.0the definition of 'glcompressedtexsubimage2d' in that specification. standar...
WebGLRenderingContext.copyTexImage2D() - Web APIs
lint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. border a glint specifying the width of the border. must be 0. return value none. examples gl.copyteximage2d(gl.texture_2d, 0, gl.rgba, 0, 0, 512, 512, 0); specifications specification status comment webgl 1.0the definition of 'copyteximage2d' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcopyteximage2d' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
x coordinate of the lower left corner where to start copying. y a glint specifying the y coordinate of the lower left corner where to start copying. width a glsizei specifying the width of the texture. height a glsizei specifying the height of the texture. return value none. examples gl.copytexsubimage2d(gl.texture_2d, 0, 0,0, 0, 0, 16, 16); specifications specification status comment webgl 1.0the definition of 'copytexsubimage2d' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcopytexsubimage2d' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.createBuffer() - Web APIs
creates and initializes a webglbuffer storing data such as vertices or colors. syntax webglbuffer gl.createbuffer(); parameters none. return value a webglbuffer storing data such as vertices or colors. examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'createbuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgenbuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.createFramebuffer() - Web APIs
fer() method of the webgl api creates and initializes a webglframebuffer object. syntax webglframebuffer gl.createframebuffer(); parameters none. return value a webglframebuffer object. examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'createframebuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgenframebuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.createProgram() - Web APIs
piled webglshaders consisting of a vertex shader and a fragment shader (both written in glsl). these are then linked into a usable program.. examples creating a webgl program var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program. \n\n' + info; } see webglshader for information on creating the vertexshader and fragmentshader in the above example. specifications specification status comment webgl 1.0the definition of 'createprogram' in that specification. recommendation initial definition. op...
WebGLRenderingContext.createRenderbuffer() - Web APIs
ebglrenderbuffer gl.createrenderbuffer(); parameters none. return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation. examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'createrenderbuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgenrenderbuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.createShader() - Web APIs
ngcontext method createshader() of the webgl api creates a webglshader that can then be configured further using webglrenderingcontext.shadersource() and webglrenderingcontext.compileshader(). syntax webglshader gl.createshader(type); parameters type either gl.vertex_shader or gl.fragment_shader examples see webglshader for usage and examples. specifications specification status comment webgl 1.0the definition of 'createshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcreateshader' in that specification. standard opengl man page. ...
WebGLRenderingContext.createTexture() - Web APIs
ltexture object. syntax webgltexture gl.createtexture(); parameters none. return value a webgltexture object to which images can be bound to. examples see also the webgl tutorial on using textures in webgl. creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'createtexture' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgentextures' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.cullFace() - Web APIs
one. examples polygon culling is disabled by default. to enable or disable culling, use the enable() and disable() methods with the argument gl.cull_face. gl.enable(gl.cull_face); gl.cullface(gl.front_and_back); to check the current cull face mode, query the cull_face_mode constant. gl.getparameter(gl.cull_face_mode) === gl.front_and_back; // true specifications specification status comment webgl 1.0the definition of 'cullface' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glcullface' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.deleteBuffer() - Web APIs
thod has no effect if the buffer has already been deleted. syntax void gl.deletebuffer(buffer); parameters buffer a webglbuffer object to delete. return value none. examples deleting a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); // ... gl.deletebuffer(buffer); specifications specification status comment webgl 1.0the definition of 'deletebuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeletebuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.deleteFramebuffer() - Web APIs
een deleted. syntax void gl.deleteframebuffer(framebuffer); parameters framebuffer a webglframebuffer object to delete. return value none. examples deleting a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); // ... gl.deleteframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'deleteframebuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeleteframebuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.deleteProgram() - Web APIs
o effect if the program has already been deleted. syntax void gl.deleteprogram(program); parameters program a webglprogram object to delete. return value none. examples deleting a program var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var program = gl.createprogram(); // ... gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'deleteprogram' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeleteprogram' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
ted. syntax void gl.deleterenderbuffer(renderbuffer); parameters renderbuffer a webglrenderbuffer object to delete. return value none. examples deleting a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); // ... gl.deleterenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'deleterenderbuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeleterenderbuffers' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.deleteShader() - Web APIs
longer in use. this method has no effect if the shader has already been deleted, and the webglshader is automatically marked for deletion when it is destroyed by the garbage collector. syntax void gl.deleteshader(shader); parameters shader a webglshader object to delete. return value none. examples deleting a shader gl.deleteshader(shader); specifications specification status comment webgl 1.0the definition of 'deleteshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeleteshader' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.deleteTexture() - Web APIs
o effect if the texture has already been deleted. syntax void gl.deletetexture(texture); parameters texture a webgltexture object to delete. return value none. examples deleting a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); // ... gl.deletetexture(texture); specifications specification status comment webgl 1.0the definition of 'deletetexture' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldeletetextures' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.depthFunc() - Web APIs
return value none. examples the depth testing is disabled by default. to enable or disable depth testing, use the enable() and disable() methods with the argument gl.depth_test. gl.enable(gl.depth_test); gl.depthfunc(gl.never); to check the current depth function, query the depth_func constant. gl.getparameter(gl.depth_func) === gl.never; // true specifications specification status comment webgl 1.0the definition of 'depthfunc' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldepthfunc' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.depthMask() - Web APIs
lag); parameters flag a glboolean specifying whether or not writing into the depth buffer is enabled. default value: true, meaning that writing is enabled. return value none. examples gl.depthmask(false); to get the current depth mask, query the depth_writemask constant which returns a boolean. gl.getparameter(gl.depth_writemask); // false specifications specification status comment webgl 1.0the definition of 'depthmask' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldepthmask' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.depthRange() - Web APIs
ampf specifying the mapping of the far clipping plane to window or viewport coordinates. clamped to the range 0 to 1. the default value is 1. return value none. examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.getparameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification. recommendation initial definition. unlike opengl, webgl requires znear and zfar values to be clamped to the range 0 to 1. additionally, znear must be less than or equal to zfar. opengl es 2.0the definition of 'gldepthrangef' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.detachShader() - Web APIs
the webglrenderingcontext.detachshader() method of the webgl api detaches a previously attached webglshader from a webglprogram. syntax void gl.detachshader(program, shader); parameters program a webglprogram. shader a fragment or vertex webglshader. specifications specification status comment webgl 1.0the definition of 'detachshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldetachshader' in that specification. standard opengl man page. ...
WebGLRenderingContext.disable() - Web APIs
tivates that primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage. gl.clear() commands are ignored. return value none. examples gl.disable(gl.dither); to check if a capability is disabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // false specifications specification status comment webgl 1.0the definition of 'disable' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'gldisable' in that specification. standard man page of the (similar) opengl es 2.0 api. opengl es 3.0the definition of 'gldisable' in that specification. standard man page of the (similar) opengl es 3.0 api...
WebGLRenderingContext.disableVertexAttribArray() - Web APIs
the webglrenderingcontext.disablevertexattribarray() method of the webgl api turns the generic vertex attribute array off at a given index position. syntax void gl.disablevertexattribarray(index); parameters index a gluint specifying the index of the vertex attribute to disable. return value none. examples gl.disablevertexattribarray(0); specifications specification status comment webgl 1.0the definition of 'disablevertexattribarray' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldisablevertexattribarray' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.drawArrays() - Web APIs
lsizei specifying the number of indices to be rendered. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if first or count are negative, a gl.invalid_value error is thrown. if gl.current_program is null, a gl.invalid_operation error is thrown. examples gl.drawarrays(gl.points, 0, 8); specifications specification status comment webgl 1.0the definition of 'drawarrays' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldrawarrays' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.drawElements() - Web APIs
given type. return value none. exceptions if mode is not one of the accepted values, a gl.invalid_enum error is thrown. if offset is not a valid multiple of the size of the given type, a gl.invalid_operation error is thrown. if count is negative, a gl.invalid_value error is thrown. examples gl.drawelements(gl.points, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 1.0the definition of 'drawelements' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gldrawelements' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.drawingBufferHeight - Web APIs
e implementation is not able to provide the requested height. syntax gl.drawingbufferheight; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the height of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferheight; // 150 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferheight' in that specification. recommendation initial definition. ...
WebGLRenderingContext.drawingBufferWidth - Web APIs
f the implementation is not able to provide the requested width. syntax gl.drawingbufferwidth; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the width of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferwidth; // 300 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferwidth' in that specification. recommendation initial definition. ...
WebGLRenderingContext.enable() - Web APIs
zer_discard primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage. gl.clear() commands are ignored. return value none. examples gl.enable(gl.dither); to check if a capability is enabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // true specifications specification status comment webgl 1.0the definition of 'enable' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glenable' in that specification. standard man page of the opengl es 2.0 api. opengl es 3.0the definition of 'glenable' in that specification. standard man page of the opengl es 3.0 api. ...
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
obvious, since this binding is almost a side effect. but as a result, accessing avertexposition now obtains data from the vertex buffer. with the association in place between the vertex buffer for our shape and the avertexposition attribute used to deliver vertexes one by one into the vertex shader, we're ready to draw the shape by calling drawarrays(). specifications specification status comment webgl 1.0the definition of 'enablevertexattribarray' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glenablevertexattribarray' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.finish() - Web APIs
the webglrenderingcontext.finish() method of the webgl api blocks execution until all previously called commands are finished. syntax void gl.finish(); parameters none. return value none. specifications specification status comment webgl 1.0the definition of 'finish' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glfinish' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.flush() - Web APIs
the webglrenderingcontext.flush() method of the webgl api empties different buffer commands, causing all commands to be executed as quickly as possible. syntax void gl.flush(); parameters none. return value none. specifications specification status comment webgl 1.0the definition of 'flush' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glflush' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
hrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.read_framebuffer. a gl.invalid_enum error is thrown if renderbuffertarget is not gl.renderbuffer. a gl.invalid_enum error is thrown if attachment is not one of the allowed enums. examples gl.framebufferrenderbuffer(gl.framebuffer, gl.color_attachment0, gl.renderbuffer, renderbuffer); specifications specification status comment webgl 1.0the definition of 'framebufferrenderbuffer' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glframebufferrenderbuffer' in that specification. standard man page of the (similar) opengl api. opengl es 3.0the definition of 'glframebufferrenderbuffer' in that specification. standard ma...
WebGLRenderingContext.framebufferTexture2D() - Web APIs
of the accepted attachment points. textarget is not one of the accepted texture targets. a gl.invalid_value error is thrown if level is not 0. a gl.invalid_operation error is thrown if texture isn't 0 or the name of an existing texture object. examples gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, texture, 0); specifications specification status comment webgl 1.0the definition of 'framebuffertexture2d' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glframebuffertexture2d' in that specification. standard man page of the (similar) opengl es 2 api. opengl es 3.0the definition of 'glframebuffertexture2d' in that specification. standard man page of the ...
WebGLRenderingContext.frontFace() - Web APIs
api specifies whether polygons are front- or back-facing by setting a winding orientation. syntax void gl.frontface(mode); parameters mode a glenum type winding orientation. the default value is gl.ccw. possible values: gl.cw: clock-wise winding. gl.ccw: counter-clock-wise winding. return value none. examples gl.frontface(gl.cw); specifications specification status comment webgl 1.0the definition of 'frontface' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glfrontface' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.generateMipmap() - Web APIs
l.texture_2d: a two-dimensional texture. gl.texture_cube_map: a cube-mapped texture. when using a webgl 2 context, the following values are available additionally: gl.texture_3d: a three-dimensional texture. gl.texture_2d_array: a two-dimensional array texture. return value none. examples gl.generatemipmap(gl.texture_2d); specifications specification status comment webgl 1.0the definition of 'generatemipmap' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgeneratemipmap' in that specification. standard man page of the (similar) opengl es 2.0 api. opengl es 3.0the definition of 'glgeneratemipmap' in that specification. standard man page of the (simil...
WebGLRenderingContext.getActiveAttrib() - Web APIs
eturned by gl.getprogramparameter(program, gl.active_attributes). return value a webglactiveinfo object. examples const numattribs = gl.getprogramparameter(program, gl.active_attributes); for (let i = 0; i < numattribs; ++i) { const info = gl.getactiveattrib(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveattrib' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetactiveattrib' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getActiveUniform() - Web APIs
e is generated if index is not in the range [0, gl.getprogramparameter(program, gl.active_uniforms) - 1]. examples const numuniforms = gl.getprogramparameter(program, gl.active_uniforms); for (let i = 0; i < numuniforms; ++i) { const info = gl.getactiveuniform(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveuniform' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetactiveuniform' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getAttachedShaders() - Web APIs
bglprogram object to get attached shaders for. return value an array of webglshader objects that are attached to the given webglprogram. examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getattachedshaders(program); specifications specification status comment webgl 1.0the definition of 'getattachedshaders' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetattachedshaders' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.getAttribLocation() - Web APIs
etattriblocation(program, name); parameters program a webglprogram containing the attribute variable. name a domstring specifying the name of the attribute variable whose location to get. return value a glint number indicating the location of the variable name if found. returns -1 otherwise. examples gl.getattriblocation(program, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'getattriblocation' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetattriblocation' in that specification. standard main page of the opengl api. ...
WebGLRenderingContext.getBufferParameter() - Web APIs
able additionally: gl.static_read, gl.dynamic_read, gl.stream_read, gl.static_copy, gl.dynamic_copy, gl.stream_copy. return value depends on the requested information (as specified with pname). either a glint or a glenum. examples gl.getbufferparameter(gl.array_buffer, gl.buffer_size); specifications specification status comment webgl 1.0the definition of 'getbufferparameter' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgetbufferparameteriv' in that specification. standard man page of the (similar) opengl es 2 api. webgl 2.0the definition of 'getbufferparameter' in that specification. editor's draft updated de...
WebGLRenderingContext.getContextAttributes() - Web APIs
recommendation initial definition. ...
WebGLRenderingContext.getError() - Web APIs
not enough memory is left to execute the command. gl.context_lost_webgl if the webgl context is lost, this error is returned on the first call to geterror. afterwards and until the context has been restored, it returns gl.no_error. examples gl.geterror(); // gl.no_error (0) gl.enable(gl.foobar); gl.geterror(); // gl.invalid_enum; specifications specification status comment webgl 1.0the definition of 'geterror' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgeterror' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getExtension() - Web APIs
recommendation initial definition. ...
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, gl.read_framebuffer or if attachment is not one of the accepted attachment points. examples gl.getframebufferattachmentparameter(gl.framebuffer, gl.color_attachment0, gl.framebuffer_attachment_object_type); specifications specification status comment webgl 1.0the definition of 'getframebufferattachmentparameter' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgetframebufferattachmentparameteriv' in that specification. standard man page of the (similar) opengl api. webgl 2.0the definition of 'getframebufferattachmentparameter' in that specif...
WebGLRenderingContext.getParameter() - Web APIs
the current time. ext.gpu_disjoint_ext glboolean ext_disjoint_timer_query returns whether or not the gpu performed any disjoint operation. ext.max_views_ovr glint ovr_multiview2 maximum number of views. examples gl.getparameter(gl.dither); gl.getparameter(gl.version); gl.getparameter(gl.viewport); specifications specification status comment webgl 1.0the definition of 'getparameter' in that specification. recommendation initial definition. webgl 2.0the definition of 'getparameter' in that specification. editor's draft adds additional parameter names. opengl es 2.0the definition of 'glget' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.getProgramInfoLog() - Web APIs
ion operation. when a webglprogram object is initially created, its information log will be a string of length 0. examples checking program errors var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getprograminfolog(program); specifications specification status comment webgl 1.0the definition of 'getprograminfolog' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetprograminfolog' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
available additionally: gl.renderbuffer_samples: returns a glint indicating the number of samples of the image of the currently bound renderbuffer. return value depends on the requested information (as specified with pname). either a glint or a glenum. examples gl.getrenderbufferparameter(gl.renderbuffer, gl.renderbuffer_width); specifications specification status comment webgl 1.0the definition of 'getrenderbufferparameter' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgetrenderbufferparameteriv' in that specification. standard man page of the (similar) opengl api. webgl 2.0the definition of 'getrenderbufferparameter' in that specification. editor's draft ...
WebGLRenderingContext.getShaderInfoLog() - Web APIs
its information log will be a string of length 0. examples checking compilation messages /* load shader source code. */ gl.shadersource(shader, shadercode); /* compile shader source code. */ gl.compileshader(shader); var message = gl.getshaderinfolog(shader); if (message.length > 0) { /* message may be an error or a warning */ throw message; } specifications specification status comment webgl 1.0the definition of 'getshaderinfolog' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetshaderinfolog' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
pported. examples the following code gets the precision format of a gl.vertex_shader with a gl.medium_float precision type. var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'getshaderprecisionformat' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetshaderprecisionformat' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.getShaderSource() - Web APIs
lshader as a domstring. syntax domstring gl.getshadersource(shader); parameters shader a webglshader object to get the source code from. return value a domstring containing the source code of the shader. examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'getshadersource' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetshadersource' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.getSupportedExtensions() - Web APIs
recommendation initial definition. ...
WebGLRenderingContext.getTexParameter() - Web APIs
gl.texture_wrap_r glenum wrapping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat. return value returns the requested texture information (as specified with pname). if an error occurs, null is returned. examples gl.gettexparameter(gl.texture_2d, gl.texture_mag_filter); specifications specification status comment webgl 1.0the definition of 'gettexparameter' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgettexparameter' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'gettexparameter' in that specification. editor's draft updated definition ...
WebGLRenderingContext.getUniform() - Web APIs
recommendation initial definition for webgl. opengl es 2.0the definition of 'glgetuniform' in that specification. standard man page of the (similar) opengl es 2 api. webgl 2.0the definition of 'getuniform' in that specification. editor's draft updated definition for webgl. ...
WebGLRenderingContext.getUniformLocation() - Web APIs
lor is set to the color [0.1, 0.7, 0.2, 1.0], the components in this 4-component vector represent the values of red, green, blue, and alpha, respectively. having done this, the next time the shading functions are called, their own variables named uscalingfactor, uglobalcolor, and urotationvector will all have the values provided by the javascript code. specifications specification status comment webgl 1.0the definition of 'getuniformlocation' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetuniformlocation' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.getVertexAttrib() - Web APIs
when using the angle_instanced_arrays extension: ext.vertex_attrib_array_divisor_angle: returns a glint describing the frequency divisor used for instanced rendering. return value returns the requested vertex attribute information (as specified with pname). examples gl.getvertexattrib(0, gl.vertex_attrib_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'getvertexattrib' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glgetvertexattrib' in that specification. standard man page of the opengl es 2 api. webgl 2.0the definition of 'getvertexattrib' in that specification. editor's draft updated definition for webgl 2.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
ttribute. syntax glintptr gl.getvertexattriboffset(index, pname); parameters index a gluint specifying the index of the vertex attribute. pname a glenum which must be gl.vertex_attrib_array_pointer. return value a glintptr indicating the address of the vertex attribute. examples gl.getvertexattriboffset(i, gl.vertex_attrib_array_pointer); specifications specification status comment webgl 1.0the definition of 'getvertexattriboffset' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.hint() - Web APIs
gl.nicest: the most correct or the highest quality option should be used. gl.dont_care: there is no preference for this behavior. return value none. examples the following example hints that the quality of filtering when generating mipmap images should be most efficient instead of best quality. gl.hint(gl.generate_mipmap_hint, gl.fastest); specifications specification status comment webgl 1.0the definition of 'hint' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glhint' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isBuffer() - Web APIs
id and false otherwise. syntax glboolean gl.isbuffer(buffer); parameters buffer a webglbuffer to check. return value a glboolean indicating whether or not the buffer is valid. examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.isbuffer(buffer); specifications specification status comment webgl 1.0the definition of 'isbuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glisbuffer' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isContextLost() - Web APIs
would cause every webgl context to be lost throughout the entire browser. the user updates their graphics driver on an operating system that allows graphics drivers to be updated without restarting the system. examples for example, when checking for program linking success, you could also check if the context is not lost: gl.linkprogram(program); if (!gl.getprogramparameter(program, gl.link_status) && !gl.iscontextlost()) { var info = gl.getprograminfolog(program); console.log('error linking program:\n' + info); } specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.iscontextlost' in that specification. recommendation initial definition. ...
WebGLRenderingContext.isEnabled() - Web APIs
ed. return value a glboolean indicating if the capability cap is enabled (true), or not (false). examples gl.isenabled(gl.stencil_test); // false to activate or deactivate a specific capability, use the webglrenderingcontext.enable() and webglrenderingcontext.disable() methods: gl.enable(gl.stencil_test); gl.disable(gl.stencil_test); specifications specification status comment webgl 1.0the definition of 'isenabled' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glisenabled' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'isenabled' in that specification. editor's draft updated definition for webgl 2. ...
WebGLRenderingContext.isFramebuffer() - Web APIs
ebuffer(framebuffer); parameters framebuffer a webglframebuffer to check. return value a glboolean indicating whether or not the frame buffer is valid. examples checking a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.isframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'isframebuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glisframebuffer' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isProgram() - Web APIs
wise. syntax glboolean gl.isprogram(program); parameters program a webglprogram to check. return value a glboolean indicating whether or not the program is valid. examples checking a program var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var program = gl.createprogram(); // ... gl.isprogram(program); specifications specification status comment webgl 1.0the definition of 'isprogram' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glisprogram' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isRenderbuffer() - Web APIs
(renderbuffer); parameters renderbuffer a webglrenderbuffer to check. return value a glboolean indicating whether or not the renderbuffer is valid. examples checking a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.isrenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'isrenderbuffer' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glisrenderbuffer' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isShader() - Web APIs
syntax glboolean gl.isshader(shader); parameters shader a webglshader to check. return value a glboolean indicating whether or not the shader is valid. examples checking a shader var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var shader = gl.createshader(gl.vertex_shader); // ... gl.isshader(shader); specifications specification status comment webgl 1.0the definition of 'isshader' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glisshader' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.isTexture() - Web APIs
se otherwise. syntax glboolean gl.istexture(texture); parameters texture a webgltexture to check. return value a glboolean indicating whether or not the texture is valid. examples checking a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.istexture(texture); specifications specification status comment webgl 1.0the definition of 'istexture' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glistexture' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.lineWidth() - Web APIs
l.linewidth(width); parameters width a glfloat specifying the width of rasterized lines. default value: 1. return value none. examples setting the line width: gl.linewidth(5); getting the line width: gl.getparameter(gl.line_width); getting the range of available widths. returns a float32array. gl.getparameter(gl.aliased_line_width_range); specifications specification status comment webgl 1.0the definition of 'linewidth' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gllinewidth' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.linkProgram() - Web APIs
pu code for the program's fragment and vertex shaders. syntax void gl.linkprogram(program); parameters program the webglprogram to link. return value none. examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw new error('could not compile webgl program. \n\n' + info); } specifications specification status comment webgl 1.0the definition of 'linkprogram' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gllinkprogram' in that specification. standard man page of ...
WebGLRenderingContext.makeXRCompatible() - Web APIs
artgame() function is called to trigger the beginning of gameplay. handlers are provided for both webglcontextlost and webglcontextrestored; in the first case, we make sure we're aware that the state can be recovered, while in the latter we actually reload the scene to ensure we have the correct resources for the current screen or headset configuration. specifications specification status comment webxr device apithe definition of 'webglrenderingcontext.makexrcompatible()' in that specification. working draft initial definition ...
WebGLRenderingContext.pixelStorei() - Web APIs
image2d() methods. var tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); gl.pixelstorei(gl.pack_alignment, 4); to check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with webglrenderingcontext.getparameter(). gl.getparameter(gl.pack_alignment); gl.getparameter(gl.unpack_alignment); specifications specification status comment webgl 1.0the definition of 'pixelstorei' in that specification. recommendation initial definition for webgl. webgl 1.0the definition of 'pixel storage parameters' in that specification. recommendation additional pixel storage parameters that aren't specified in opengl. opengl es 2.0the definition of 'glpixelstorei' in that specification. standa...
WebGLRenderingContext.polygonOffset() - Web APIs
he enable() and disable() methods with the argument gl.polygon_offset_fill. gl.enable(gl.polygon_offset_fill); gl.polygonoffset(2, 3); to check the current polygon offset factor or units, query the polygon_offset_factor and polygon_offset_units constants. gl.getparameter(gl.polygon_offset_factor); // 2 gl.getparameter(gl.polygon_offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygonoffset' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glpolygonoffset' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.readPixels() - Web APIs
ramebuffer is not framebuffer complete. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var pixels = new uint8array(gl.drawingbufferwidth * gl.drawingbufferheight * 4); gl.readpixels(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight, gl.rgba, gl.unsigned_byte, pixels); console.log(pixels); // uint8array specifications specification status comment webgl 1.0the definition of 'readpixels' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glreadpixels' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.renderbufferStorage() - Web APIs
n: gl.r16f gl.rg16f gl.rgba16f gl.r32f gl.rg32f gl.rgba32f gl.r11f_g11f_b10f width a glsizei specifying the width of the renderbuffer in pixels. height a glsizei specifying the height of the renderbuffer in pixels. return value none. examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); specifications specification status comment webgl 1.0the definition of 'renderbufferstorage' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glrenderbufferstorage' in that specification. standard man page of the opengl es 2 api. webgl 2.0the definition of 'getrenderbufferparameter' in that specification. editor's draft updated defini...
WebGLRenderingContext.sampleCoverage() - Web APIs
methods with the argument gl.sample_coverage and gl.sample_alpha_to_coverage. gl.enable(gl.sample_coverage); gl.samplecoverage(0.5, false); to check the sample coverage values, query the sample_coverage_value and sample_coverage_invert constants. gl.getparameter(gl.sample_coverage_value); // 0.5 gl.getparameter(gl.sample_coverage_invert); // false specifications specification status comment webgl 1.0the definition of 'samplecoverage' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glsamplecoverage' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.scissor() - Web APIs
ngle gl.scissor(x, y, width, height); // execute drawing commands in the scissor box (e.g. clear) // turn off scissor test again gl.disable(gl.scissor_test); to get the current scissor box dimensions, query the scissor_box constant which returns an int32array. gl.scissor(0, 0, 200, 200); gl.getparameter(gl.scissor_box); // int32array[0, 0, 200, 200] specifications specification status comment webgl 1.0the definition of 'scissor' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glscissor' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.shaderSource() - Web APIs
hader. syntax void gl.shadersource(shader, source); parameters shader a webglshader object in which to set the source code. source a domstring containing the glsl source code to set. return value none. examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'shadersource' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glshadersource' in that specification. standard man page of the (similar) opengl api. ...
WebGLRenderingContext.stencilFunc() - Web APIs
nce value, or other stencil information, query the following constants with getparameter(). gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfunc' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilfunc' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
nce value, or other stencil information, query the following constants with getparameter(). gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfuncseparate' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilfuncseparate' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.stencilMask() - Web APIs
planes. by default, the mask is all 1. return value none. examples gl.stencilmask(110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants. gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmask' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilmask' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
t, the mask is all 1. return value none. examples gl.stencilmaskseparate(gl.front, 110101); to get the current stencil masks, query the stencil_writemask, stencil_back_writemask, or stencil_bits constants. gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmaskseparate' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilmaskseparate' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.stencilOp() - Web APIs
fail, query the following constants with getparameter(). gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilop' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilop' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.stencilOpSeparate() - Web APIs
fail, query the following constants with getparameter(). gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilopseparate' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glstencilopseparate' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.texImage2D() - Web APIs
htmlvideoelement, imagebitmap. offset (webgl 2 only) a glintptr byte offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target. return value none. examples gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'teximage2d' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'glteximage2d' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'teximage2d' in that specification. editor's draft updated definition for webgl. ...
WebGLRenderingContext.texParameter[fi]() - Web APIs
value any float values. gl.texture_wrap_r wrapping function for texture coordinate r gl.repeat (default value), gl.clamp_to_edge, gl.mirrored_repeat. return value none. examples gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear_mipmap_nearest); specifications specification status comment webgl 1.0the definition of 'texparameter[fi]' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'gltexparameter' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'texparameter[fi]' in that specification. editor's draft updated definition f...
WebGLRenderingContext.texSubImage2D() - Web APIs
htmlvideoelement, imagebitmap. offset (webgl 2 only) a glintptr byte offset into the webglbuffer's data store. used to upload data to the currently bound webgltexture from the webglbuffer bound to the pixel_unpack_buffer target. return value none. examples gl.texsubimage2d(gl.texture_2d, 0, 0, 0, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'texsubimage2d' in that specification. recommendation initial definition for webgl. opengl es 2.0the definition of 'gltexsubimage2d' in that specification. standard man page of the (similar) opengl es 2.0 api. webgl 2.0the definition of 'texsubimage2d' in that specification. editor's draft updated definition for we...
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
es (methods with "f"). a sequence of floating point numbers (for example a float32array or an array of numbers) for floating point vector methods (methods with "fv"). an integer number for integer values (methods with "i"). an int32array for integer vector methods (methods with "iv"). return value none. examples gl.uniform1f(u_alpha, 0.8); specifications specification status comment webgl 1.0the definition of 'uniform' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gluniform' in that specification. standard main page of the opengl api. ...
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
ttribute to modify. the location is obtained using getuniformlocation(). transpose a glboolean specifying whether to transpose the matrix. must be false. value a float32array or sequence of glfloat values. the values are assumed to be supplied in column major order. return value undefined examples gl.uniformmatrix2fv(loc, false, [2,1, 2,2]); specifications specification status comment webgl 1.0the definition of 'uniformmatrix' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gluniform' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.useProgram() - Web APIs
s part of the current rendering state. syntax void gl.useprogram(program); parameters program a webglprogram to use. return value none. examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'useprogram' in that specification. recommendation initial definition. opengl es 2.0the definition of 'gluseprogram' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.validateProgram() - Web APIs
urrent webgl state. syntax void gl.validateprogram(program); parameters program a webglprogram to validate. return value none. examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.validateprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program. \n\n' + info; } gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'validateprogram' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glvalidateprogram' in that specification. s...
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
recommendation initial definition. opengl es 2.0the definition of 'glvertexattrib' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
recommendation initial definition. opengl es 2.0the definition of 'glvertexattribpointer' in that specification. standard man page of the opengl api. ...
WebGLRenderingContext.viewport() - Web APIs
height are clamped to a range that is implementation dependent. to get this range, you can use the max_viewport_dims constant, which returns an int32array. gl.getparameter(gl.max_viewport_dims); // e.g. int32array[16384, 16384] to get the current viewport, query the viewport constant. gl.getparameter(gl.viewport); // e.g. int32array[0, 0, 640, 480] specifications specification status comment webgl 1.0the definition of 'viewport' in that specification. recommendation initial definition. opengl es 2.0the definition of 'glviewport' in that specification. standard man page of the opengl api. ...
WebGLSampler - Web APIs
editor's draft initial definition. ...
WebGLShaderPrecisionFormat.precision - Web APIs
the number of bits of precision that can be represented. for integer formats this value is always 0. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).precision; // 23 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).precision; // 0 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.precision' in that specification. recommendation initial definition. ...
WebGLShaderPrecisionFormat.rangeMax - Web APIs
ax property returns the base 2 log of the absolute value of the maximum value that can be represented. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemax; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemax; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemax' in that specification. recommendation initial definition. ...
WebGLShaderPrecisionFormat.rangeMin - Web APIs
in property returns the base 2 log of the absolute value of the minimum value that can be represented. examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemin; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemin; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemin' in that specification. recommendation initial definition. ...
WebGLShaderPrecisionFormat - Web APIs
0. examples a webglshaderprecisionformat object is returned by the webglrenderingcontext.getshaderprecisionformat() method. var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat' in that specification. recommendation initial definition. ...
WebGLSync - Web APIs
Web › API › WebGLSync
editor's draft initial definition. ...
WebGLTexture - Web APIs
recommendation initial definition. ...
WebGLTransformFeedback - Web APIs
editor's draft initial definition. ...
WebGLUniformLocation - Web APIs
recommendation initial definition. ...
WebGLVertexArrayObject - Web APIs
editor's draft initial definition. ...
Hello GLSL - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0...
Hello vertex attributes - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); document.queryselector("canvas").addeventlistener("click", function (evt) { var c...
Textures from code - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); ...
WebGL types - Web APIs
Web › API › WebGL API › Types
l2renderingcontext. all webgl 1 types are used as well. type web idl type description glint64 long long signed 64-bit integer number. webgl extensions these types are used within webgl extensions. type web idl type description gluint64ext long long unsigned 64-bit integer number. specifications specification status comment webgl 1.0the definition of 'types' in that specification. recommendation initial definition webgl 2.0the definition of 'types' in that specification. editor's draft defines additional types. ext_disjoint_timer_querythe definition of 'gluint64ext' in that specification. working draft adds gluint64ext ...
WebGL: 2D and 3D graphics for the web - Web APIs
Web › API › WebGL API
lating vectors and matrices. not optimized for webgl but extremely robust. three.js is an open-source, fully featured 3d webgl library. phaser is a fast, free and fun open source framework for canvas and webgl powered browser games. redgl is an open-source 3d webgl library. vtk.js is a javascript library for scientific visualization in your browser. specifications specification status comment opengl es 3.0 standard opengl es 2.0 standard webgl 2.0 editor's draft builds on top of webgl 1. based on opengl es 3.0. webgl 1.0 recommendation initial definition. based on opengl es 2.0 ...
WebKitCSSMatrix - Web APIs
an alias for dommatrix. specifications specification status comment geometry interfaces module level 1the definition of 'webkitcssmatrix' in that specification. candidate recommendation ...
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
ance as well as its multiplexing and checksum features. rtp supports multicast; while this isn't yet important for webrtc, it's likely to matter in the future, when webrtc is (hopefully) enhanced to support multi-user conversations. rtp isn't limited to use in audiovisual communication. it can be used for any form of continuous or active data transfer, including data streaming, active badges or status display updates, or control and measurement information transport. things rtp doesn't do rtp itself doesn't provide every possible feature, which is why other protocols are also used by webrtc. some of the more noteworthy things rtp doesn't include: editor's note: we should add information about where these deficiencies are compensated for, if they are at all. rtp does not guarantee qualit...
Signaling and video calling - Web APIs
re already in transport when the peers successfully established their connection. in addition, if something happens to cause a change in the streaming scenario, negotiation will begin again, with the negotiationneeded event being sent to the rtcpeerconnection, and the entire process starts again as described before. this can happen in a variety of situations, including: changes in the network status, such as a bandwidth change, transitioning from wifi to cellular connectivity, or the like. switching between the front and rear cameras on a phone. a change to the configuration of the stream, such as its resolution or frame rate. receiving new streams when new tracks are added to the rtcpeerconnection— either by calling its addtrack() method or because of renegotiation of the stream's fo...
WebRTC Statistics API - Web APIs
transceiver statistics related to a specific rtcrtptransceiver. rtcrtptransceiverstats rtcstats transport statistics about a transport used by the connection. rtctransportstats rtcstats specifications specification status comment identifiers for webrtc's statistics apithe definition of 'webrtc statistics types' in that specification. candidate recommendation compatibility for individual statistic types webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification. candidate recommendation compatibility of statistic reporting ...
WebSocket() - Web APIs
t sub-protocols (for example, you might want one server to be able to handle different types of interactions depending on the specified protocol). if you don't specify a protocol string, an empty string is assumed. exceptions thrown security_err the port to which the connection is being attempted is being blocked. syntaxerror the url is invalid. specifications specification status comment html living standardthe definition of 'the websocket constructor' in that specification. living standard ...
WebSocket.binaryType - Web APIs
the websocket.binarytype property returns the type of binary data being transmitted by the connection. syntax var binarytype = awebsocket.binarytype; value a domstring: "blob" if blob objects are used. "arraybuffer" if arraybuffer objects are used. specifications specification status comment html living standardthe definition of 'websocket: binarytype' in that specification. living standard initial definition ...
WebSocket.bufferedAmount - Web APIs
data that have been queued using calls to send() but not yet transmitted to the network. this value resets to zero once all queued data has been sent. this value does not reset to zero when the connection is closed; if you keep calling send(), this will continue to climb. syntax var bufferedamount = awebsocket.bufferedamount; value an unsigned long. specifications specification status comment html living standardthe definition of 'websocket: bufferedamount' in that specification. living standard initial definition ...
WebSocket: close event - Web APIs
he situation where the socket has been closed. examplesocket.addeventlistener('close', (event) => { console.log('the connection has been closed successfully.'); )}; you can perform the same actions using the event handler property, like this: examplesocket.onclose = function (event) { console.log('the connection has been closed successfully.'); }; specifications specification status html living standardthe definition of 'websocket close' in that specification. living standard ...
WebSocket: error event - Web APIs
le). bubbles no cancelable no interface event event handler property onerror examples // create websocket connection const socket = new websocket('ws://localhost:8080'); // listen for possible errors socket.addeventlistener('error', function (event) { console.log('websocket error: ', event); }); specifications specification status html living standardthe definition of 'websocket error' in that specification. living standard ...
WebSocket.extensions - Web APIs
the websocket.extensions read-only property returns the extensions selected by the server. this is currently only the empty string or a list of extensions as negotiated by the connection. syntax var extensions = awebsocket.extensions; value a domstring. specifications specification status comment html living standardthe definition of 'websocket: extensions' in that specification. living standard initial definition ...
WebSocket: message event - Web APIs
living standard ...
WebSocket.onclose - Web APIs
Web › API › WebSocket › onclose
the websocket.onclose property is an eventhandler that is called when the websocket connection's readystate changes to closed. it is called with a closeevent. syntax awebsocket.onclose = function(event) { console.log("websocket is closed now."); }; value an eventlistener. specifications specification status comment html living standardthe definition of 'websocket: onclose' in that specification. living standard initial definition ...
WebSocket.onerror - Web APIs
Web › API › WebSocket › onerror
rror occurs on the websocket. you can also add an error event handler using addeventlistener(). syntax websocket.onerror = eventhandler; value a function or eventhandler which is executed whenever an error event occurs on the websocket connection. example websocket.onerror = function(event) { console.error("websocket error observed:", event); }; specifications specification status comment html living standardthe definition of 'websocket: onerror' in that specification. living standard initial definition ...
WebSocket.onmessage - Web APIs
the websocket.onmessage property is an eventhandler that is called when a message is received from the server. it is called with a messageevent. syntax awebsocket.onmessage = function(event) { console.debug("websocket message received:", event); }; value an eventlistener. specifications specification status comment html living standardthe definition of 'websocket: onmessage' in that specification. living standard initial definition ...
WebSocket.onopen - Web APIs
Web › API › WebSocket › onopen
living standard initial definition ...
WebSocket: open event - Web APIs
ion with a websocket is opened. bubbles no cancelable no interface event event handler property onopen examples // create websocket connection. const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', (event) => { socket.send('hello server!'); }); specifications specification status html living standardthe definition of 'websocket open' in that specification. living standard ...
WebSocket.protocol - Web APIs
living standard initial definition ...
WebSocket.readyState - Web APIs
hort values: value state description 0 connecting socket has been created. the connection is not yet open. 1 open the connection is open and ready to communicate. 2 closing the connection is in the process of closing. 3 closed the connection is closed or couldn't be opened. specifications specification status comment html living standardthe definition of 'websocket: readystate' in that specification. living standard initial definition ...
WebSocket.send() - Web APIs
Web › API › WebSocket › send
living standard initial definition ...
WebSocket.url - Web APIs
Web › API › WebSocket › url
the websocket.url read-only property returns the absolute url of the websocket as resolved by the constructor. syntax var url = awebsocket.url; value a domstring. specifications specification status comment html living standardthe definition of 'websocket: url' in that specification. living standard initial definition ...
WebSocket - Web APIs
Web › API › WebSocket
pen property. examples // create websocket connection. const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', function (event) { socket.send('hello server!'); }); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket' in that specification. living standard ...
The WebSocket API (WebSockets) - Web APIs
ary for node.js. jsonrpc-bidirectional: asynchronous rpc which, on a single connection, may have functions exported on the server and, and the same time, on the client (client may call server, server may also call client). cowboy: cowboy is a small, fast and modern http server for erlang/otp with websocket support. related topics ajax javascript specifications specification status comments html living standardthe definition of 'websocket api' in that specification. living standard websockets candidate recommendation rfc 6455: the websocket protocol ietf rfc ...
Web Video Text Tracks Format (WebVTT) - Web APIs
html. following css pseudo classes can be used: lang (lanugage): e.g., p:lang(it). link: e.g., a:link. ...
WebXR Device API - Web APIs
like it's coming from the direction of its source. this guide covers how to accomplish this. playing video in a 3d environment in this guide, we examine how to play video into a 3d scene. this technique can be used in both standard webgl applications presented on a flat computer screen, or in a webxr-generated virtual or augmented reality environment. specifications specification status comment webxr device api working draft initial definition. ...
Keyframe Formats - Web APIs
y spaced between adjacent keyframes. easing the timing function used from this keyframe until the next keyframe in the series. composite the keyframeeffect.composite operation used to combine the values specified in this keyframe with the underlying value. this will be auto if the composite operation specified on the effect is being used. specifications specification status comment web animationsthe definition of 'keyframe object formats' in that specification. working draft initial definition ...
Web Animations API - Web APIs
effect on elements in the document. ...
Web audio spatialization basics - Web APIs
de properties do (there are quite a few of them). the values can be hard to manipulate sometimes and depending on your use case it can take some time to get them right. note: there are slight differences in the way the audio spatialization sounds across different browsers. the panner node does some very involved maths under the hood; there are a number of tests here so you can keep track of the status of the inner workings of this node across different platforms. again, you can check out the final demo here, and the final source code is here. there is also a codepen demo too. if you are working with 3d games and/or webxr it's a good idea to harness a 3d library to create such functionality, rather than trying to do this all yourself from first principles. we rolled our own in this article t...
Web Audio API - Web APIs
le has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them). the values can be hard to manipulate sometimes and depending on your use case it can take some time to get them right. examples you can find a number of examples at our webaudio-example repo on github. specifications specification status comment web audio api working draft ...
Web Authentication API - Web APIs
...
Web Budget API - Web APIs
...
Web Crypto API - Web APIs
crypto without having it well defined or being cryptographically sound. ...
Web Locks API - Web APIs
tabs, and other script in the page is not affected. interfaces lock provides the name and mode of a previously requested lock, which is received in the callback to lockmanager.request(). lockmanager provides methods for requesting a new lock object and querying for an existing lock object. to get an instance of lockmanager, call navigator.locks. specifications specification status comment web locks api draft initial definition. ...
Web NFC API - Web APIs
composed of metadata and ndef records. ...
Web Speech API - Web APIs
of a [nointerfaceobject] interface called speechsynthesisgetter, and implemented by the window object, the speechsynthesis property provides access to the speechsynthesis controller, and therefore the entry point to speech synthesis functionality. examples the web speech api repo on github contains demos to illustrate speech recognition and synthesis. specifications specification status comment web speech api draft initial definition ...
Using the Web Storage API - Web APIs
ods to remove data. ...
Web Storage API - Web APIs
choices are stored in localstorage, so that when you leave the page then load it again later on your choices are remembered. in addition, we have provided an event output page — if you load this page in another tab, then make changes to your choices in the landing page, you'll see the updated storage information outputted as the storageevent is fired. specifications specification status comment html living standard living standard ...
Using Web Workers - Web APIs
the parent page. this includes manipulating the dom and using that page's objects. you have to do it indirectly, by sending a message back to the main script via dedicatedworkerglobalscope.postmessage, then actioning the changes from there. note: for a complete list of functions available to workers, see functions and interfaces available to workers. specifications specification status comment html living standardthe definition of 'web workers' in that specification. living standard ...
Web Workers API - Web APIs
eatures. workernavigator represents the identity and state of the user agent (the client): examples we have created a couple of simple demos to show basic usage: basic dedicated worker example (run dedicated worker). basic shared worker example (run shared worker). you can find out more information on how these demos work in using web workers. specifications specification status comment html living standardthe definition of 'web workers' in that specification. living standard initial definition. ...
WheelEvent() - Web APIs
alues are specified in pixels. dom_delta_line 0x01 the delta values are specified in lines. dom_delta_page 0x02 the delta values are specified in pages. the wheeleventinit dictionary also accepts fields from the mouseeventinit, uieventinit and eventinit dictionaries. specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent()' in that specification. obsolete initial definition ...
WheelEvent.deltaMode - Web APIs
are specified in pixels. dom_delta_line 0x01 the delta values are specified in lines. dom_delta_page 0x02 the delta values are specified in pages. syntax var unit = event.deltamode; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltamode); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltamode' in that specification. obsolete initial definition. ...
WheelEvent.deltaX - Web APIs
Web › API › WheelEvent › deltaX
the wheelevent.deltax read-only property is a double representing the horizontal scroll amount in the wheelevent.deltamode unit. syntax var dx = event.deltax; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltax); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltax' in that specification. obsolete initial definition. ...
WheelEvent.deltaY - Web APIs
Web › API › WheelEvent › deltaY
the wheelevent.deltay read-only property is a double representing the vertical scroll amount in the wheelevent.deltamode unit. syntax var dy = event.deltay; example var syntheticevent = new wheelevent("syntheticwheel", {"deltay": 4, "deltamode": 0}); console.log(syntheticevent.deltay); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltay' in that specification. obsolete initial definition. ...
WheelEvent.deltaZ - Web APIs
Web › API › WheelEvent › deltaZ
the wheelevent.deltaz read-only property is a double representing the scroll amount along the z-axis, in the wheelevent.deltamode unit. syntax var dz = event.deltaz; example var syntheticevent = new wheelevent("syntheticwheel", {"deltaz": 4, "deltamode": 0}); console.log(syntheticevent.deltaz); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltaz' in that specification. obsolete initial definition. ...
WheelEvent - Web APIs
re specified in pixels. wheelevent.dom_delta_line 0x01 the delta* values are specified in lines. wheelevent.dom_delta_page 0x02 the delta* values are specified in pages. methods this interface doesn't define any specific methods, but inherits methods from its ancestors, mouseevent, uievent, and event. specifications specification status comment ui eventsthe definition of 'the wheelevent interface' in that specification. working draft document object model (dom) level 3 events specificationthe definition of 'wheelevent' in that specification. obsolete initial definition. ...
Window: DOMContentLoaded event - Web APIs
please see the page on the document: domcontentloaded event. ...
Window: afterprint event - Web APIs
es no cancelable no interface event event handler property onafterprint examples using addeventlistener(): window.addeventlistener('afterprint', (event) => { console.log('after print'); }); using the onafterprint event handler property: window.onafterprint = (event) => { console.log('after print'); }; specifications specification status html living standard living standard ...
Window.alert() - Web APIs
Web › API › Window › alert
nowledgement of the message. the following text is shared between this article, dom:window.prompt and dom:window.confirm dialog boxes are modal windows - they prevent the user from accessing the rest of the program's interface until the dialog box is closed. for this reason, you should not overuse any function that creates a dialog box (or modal window). specification specification status comment html living standardthe definition of 'alert()' in that specification. living standard ...
Window: animationcancel event - Web APIs
l. examples this code adds a listener to the animationcancel event. ...
Window: animationend event - Web APIs
e the page on htmlelement: animationend. ...
Window: animationiteration event - Web APIs
tion', () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }); the same, but using the onanimationiteration event handler property: let iterationcount = 0; window.onanimationiteration = () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }; see a live example of this event. specifications specification status comment css animations working draft initial definition ...
Window: animationstart event - Web APIs
lelement: animationstart. ...
Window: beforeprint event - Web APIs
no cancelable no interface event event handler property onbeforeprint examples using addeventlistener(): window.addeventlistener('beforeprint', (event) => { console.log('before print'); }); using the onbeforeprint event handler property: window.onbeforeprint = (event) => { console.log('before print'); }; specifications specification status html living standard living standard ...
Window: beforeunload event - Web APIs
ion states that authors should use the event.preventdefault() method instead of using event.returnvalue. however, this is not supported by all browsers. window.addeventlistener('beforeunload', (event) => { // cancel the event as stated by the standard. event.preventdefault(); // chrome requires returnvalue to be set. event.returnvalue = ''; }); specifications specification status comment html living standardthe definition of 'beforeunload' in that specification. living standard html5the definition of 'beforeunload' in that specification. recommendation initial definition ...
Window.blur() - Web APIs
Web › API › Window › blur
shifts focus away from the window. syntax window.blur() example window.blur(); notes the window.blur() method is the programmatic equivalent of the user shifting focus away from the current window. specification specification status comment html living standardthe definition of 'window.blur()' in that specification. living standard ...
Window: blur event - Web APIs
Web › API › Window › blur event
ody.classlist.add('paused'); log.textcontent = 'focus lost!'; } function play() { document.body.classlist.remove('paused'); log.textcontent = 'this document has focus. click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed. document object model (dom) level 3 events specification obsolete initial definition ...
window.cancelAnimationFrame() - Web APIs
living standard ...
window.cancelIdleCallback() - Web APIs
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. return value undefined. example see our complete example in the article cooperative scheduling of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreropera...
Window.clearImmediate() - Web APIs
.10+. it meets resistance both from gecko (firefox) and webkit (google/apple). syntax window.clearimmediate( immediateid ) where immediateid is a id returned by window.setimmediate. examples let immediateid = setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification. editor's draft initial definition. ...
Window: clipboardchange event - Web APIs
the clipboardchange event fires when the system clipboard content changes. bubbles no cancelable no interface clipboardevent event handler property none examples javascript window.addeventlistener('clipboardchange', () => { console.log('clipboard contents changed'); }); specifications specification status clipboard api and eventsthe definition of 'clipboardchange event' in that specification. working draft ...
Window.close() - Web APIs
Web › API › Window › close
close() on a window instance, the browser closed the frontmost window, whether your script created that window or not. this is no longer the case; for security reasons, scripts are no longer allowed to close windows they didn't open. (firefox 46.0.1: scripts can not close windows, they had not opened) function closecurrentwindow() { window.close(); } specification specification status comment html living standardthe definition of 'window.close()' in that specification. living standard html5the definition of 'window.close()' in that specification. recommendation ...
Window.closed - Web APIs
Web › API › Window › closed
t been opened yet or the user has closed it a new window is opened. const popupwindow = null; function refreshpopupwindow() { if (popupwindow && !popupwindow.closed) { // popupwindow is open, refresh it popupwindow.location.reload(true); } else { // open a new popup window popupwindow = window.open('popup.html', 'datawindow'); } } specification specification status comment html living standardthe definition of 'window.closed' in that specification. living standard ...
Window.confirm() - Web APIs
Web › API › Window › confirm
living standard ...
Window.console - Web APIs
Web › API › Window › console
enting information to end users. examples logging to console the first example logs text to the console. console.log("an error occurred while loading the content"); the next example logs an object to the console, with the object's fields expandable using disclosure widgets: console.dir(someobject); see usage in console for more thorough examples. specifications specification status comment console api living standard initial definition. currently there are many implementation differences among browsers, but work is being done to bring them together and make them more consistent with one another. ...
Window: copy event - Web APIs
Web › API › Window › copy event
this event is the element that was the intended target of the copy action. you can listen for this event on the window interface to handle it in the capture or bubbling phases. for full details on this event please see the page on the element: copy event. examples window.addeventlistener('copy', (event) => { console.log('copy action initiated') }); specifications specification status clipboard api and events working draft ...
Window.crypto - Web APIs
Web › API › Window › crypto
recommendation initial definition ...
Window.customElements - Web APIs
tails', class extends htmlelement { constructor() { super(); const template = document .getelementbyid('element-details-template') .content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(template.clonenode(true)); } } ); see our web-components-examples repo for more usage examples. specification specification status comment html living standardthe definition of 'window.customelements' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrome...
Window: cut event - Web APIs
Web › API › Window › cut event
for this event is the element that was the intended target of the cut action. you can listen for this event on the window interface to handle it in the capture or bubbling phases. for full details on this event please see the page on the element: cut event. examples window.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Window.devicePixelRatio - Web APIs
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. d...
Window: devicemotion event - Web APIs
editor's draft ...
Window: deviceorientation event - Web APIs
editor's draft ...
Window.document - Web APIs
Web › API › Window › document
window.document returns a reference to the document contained in the window. example console.log(window.document.title); specifications specification status comment html living standardthe definition of 'window.document' in that specification. living standard html5the definition of 'window.document' in that specification. recommendation ...
Window: error event - Web APIs
elector('.event-log-contents'); window.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: ${event.message}\n`; console.log(event) }); const scripterror = document.queryselector('#script-error'); scripterror.addeventlistener('click', () => { const badcode = 'const s;'; eval(badcode); }); result specifications specification status ui events working draft ...
Window.event - Web APIs
Web › API › Window › event
into the event handler function. this property is not universally supported and even when supported introduces potential fragility to your code. note: this property can be fragile, in that there may be situations in which the returned event is not the expected value. in addition, window.event is not accurate for events dispatched within shadow trees. specifications specification status comment domthe definition of 'window.event' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explore...
Window.external - Web APIs
Web › API › Window › external
and the contained methods are now dummy functions that do nothing as per spec. methods the external object has the following methods: method description addsearchprovider(descriptionurl) dummy function; does nothing. see autodiscovery of search plugins. issearchproviderinstalled() dummy function; does nothing. specifications specification status html living standardthe definition of 'external' in that specification. living standard ...
Window.focus() - Web APIs
Web › API › Window › focus
makes a request to bring the window to the front. it may fail due to user settings and the window isn't guaranteed to be frontmost before this method returns. syntax window.focus() example if (clicked) { window.focus(); } specification specification status comment html living standardthe definition of 'window.focus()' in that specification. living standard ...
Window: focus event - Web APIs
ody.classlist.add('paused'); log.textcontent = 'focus lost!'; } function play() { document.body.classlist.remove('paused'); log.textcontent = 'this document has focus. click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed. document object model (dom) level 3 events specification obsolete initial definition ...
Window.frameElement - Web APIs
ndow is embedded into. if the window isn't embedded into another document, or if the document into which it's embedded has a different origin, the value is null instead. example const frameel = window.frameelement; // if we're embedded, change the containing element's url to 'http://mozilla.org/' if (frameel) { frameel.src = 'http://mozilla.org/'; } specifications specification status comment html living standardthe definition of 'window.frameelement' in that specification. candidate recommendation initial specification. ...
Window.frames - Web APIs
Web › API › Window › frames
tagname("iframe")[0].contentwindow). for more details about the returned value, refer to this thread on mozilla.dev.platform. example var frames = window.frames; // or // var frames = window.parent.frames; for (var i = 0; i < frames.length; i++) { // do something with each subframe as frames[i] frames[i].document.body.style.background = "red"; } specifications specification status comment html living standardthe definition of 'window.frames' in that specification. living standard html5the definition of 'window.frames' in that specification. recommendation ...
Window: gamepadconnected event - Web APIs
cted or the first time a button/axis of the gamepad is used. bubbles no cancelable no interface gamepadevent event handler property ongamepadconnected examples window.addeventlistener('gamepadconnected', event => { // all buttons and axes values can be accessed through event.gamepad; }); specifications specification status gamepad working draft ...
Window: gamepaddisconnected event - Web APIs
ed event is fired when the browser detects that a gamepad has been disconnected. bubbles no cancelable no interface gamepadevent event handler property ongamepaddisconnected examples window.addeventlistener('gamepaddisconnected', event => { console.log('lost connection with the gamepad.'); }); specifications specification status gamepad working draft ...
Window.getComputedStyle() - Web APIs
tyle returns the original property value in firefox, but the final property value in webkit. in firefox, properties with the value auto return the used value, not the value auto. so if you apply top:auto and bottom:0 on an element with height:30px and a containing block of height:100px, firefox's computed style for top returns 70px, as 100 − 30 = 70. specifications specification status comment css object model (cssom)the definition of 'getcomputedstyle()' in that specification. working draft document object model (dom) level 2 style specificationthe definition of 'getcomputedstyle()' in that specification. obsolete initial definition ...
Window.getSelection() - Web APIs
etselection() doesn't work on the content of <textarea> and <input> elements in firefox, edge (legacy) and internet explorer. htmlinputelement.setselectionrange() or the selectionstart and selectionend properties could be used to work around this. notice also the difference between selection and focus. document.activeelement returns the focused element. specifications specification status comment selection apithe definition of 'window.getselection()' in that specification. working draft new spec. ...
Window: hashchange event - Web APIs
living standard initial definition ...
Window.history - Web APIs
Web › API › Window › history
the urls of other pages in the session history, but it does allow it to navigate the session history. there is no way to clear the session history or to disable the back/forward navigation from unprivileged code. the closest available solution is the location.replace() method, which replaces the current item of the session history with the provided url. specifications specification status comment html living standardthe definition of 'the history interface' in that specification. living standard html5the definition of 'the history interface' in that specification. recommendation ...
Window.innerHeight - Web APIs
ort of the outermost frameset fixme: link to an interactive demo here to change the size of a window, see window.resizeby() and window.resizeto(). to get the outer height of a window, i.e. the height of the whole browser window, see window.outerheight. graphical example the following figure shows the difference between outerheight and innerheight. specification specification status comment css object model (cssom) view modulethe definition of 'window.innerheight' in that specification. working draft initial definition ...
Window.innerWidth - Web APIs
Web › API › Window › innerWidth
working draft initial definition ...
Window.isSecureContext - Web APIs
...
Window: languagechange event - Web APIs
living standard ...
Window.length - Web APIs
Web › API › Window › length
returns the number of frames (either <frame> or <iframe> elements) in the window. syntax framescount = window.length; framescount is the number of frames. example if (window.length) { // this is a document with subframes } specifications specification status comment html living standardthe definition of 'window.length' in that specification. living standard html5the definition of 'window.length' in that specification. recommendation ...
Window: load event - Web APIs
Web › API › Window › load event
working draft html living standardthe definition of 'load event' in that specification. living standard this links to the section in the steps that are carried out at the end of loading a document. 'load' events are fired at many elements too. and note there are many places in the specification ...
Window.localStorage - Web APIs
living standard ...
window.location - Web APIs
Web › API › Window › location
living standard no change from html5. html5the definition of 'window.location' in that specification. recommendation initial definition. ...
Window.locationbar - Web APIs
f = window.locationbar example the following complete html example shows how the visible property of the locationbar object is used. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> var visible = window.locationbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.locationbar' in that specification. living standard html5the definition of 'window.locationbar' in that specification. recommendation ...
Window.matchMedia() - Web APIs
Web › API › Window › matchMedia
matches the media query at the moment the page was loaded. html <span class="mq-value"></span> a simple <span> to receive the output. css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result see testing media queries programmatically for additional code examples. specifications specification status comment css object model (cssom) view modulethe definition of 'window.matchmedia()' in that specification. working draft initial definition ...
Window.menubar - Web APIs
Web › API › Window › menubar
whose visibility can be checked. syntax objref = window.menubar example the following complete html example demonstrates how the visible property of the menubar object is used. <html> <head> <title>various dom tests</title> <script> var visible = window.menubar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.menubar' in that specification. living standard html5the definition of 'window.menubar' in that specification. recommendation ...
Window: message event - Web APIs
the receiver can listen for the message using addeventlistener() with code like this: window.addeventlistener('message', (event) => { console.log(`received message: ${event.data}`); }); alternatively the listener could use the onmessage event handler property: window.onmessage = (event) => { console.log(`received message: ${event.data}`); }; specifications specification status html living standard living standard ...
Window: messageerror event - Web APIs
nterface messageevent event handler property onmessageerror examples listen for messageerror using addeventlistener(): window.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessageerror event handler property: window.onmessageerror = (event) => { console.error(event); }; specifications specification status html living standard living standard ...
Window.moveBy() - Web APIs
Web › API › Window › moveBy
of pixels to move the window horizontally. positive values are to the right, while negative values are to the left. deltay is the amount of pixels to move the window vertically. positive values are down, while negative values are up. example this example moves the window 10 pixels to the right and 10 pixels up. function budge() { moveby(10, -10); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveby()' in that specification. working draft ...
Window.moveTo() - Web APIs
Web › API › Window › moveTo
location. in contrast, window.moveby() moves the window relative to its current location. syntax window.moveto(x, y) parameters x is the horizontal coordinate to be moved to. y is the vertical coordinate to be moved to. example this example moves the window to the top-left corner of the screen. function origin() { window.moveto(0, 0); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveto()' in that specification. working draft initial definition ...
Window.name - Web APIs
Web › API › Window › name
n messaging (e.g., sessionvars and dojo's dojox.io.windowname) as a more secure alternative to jsonp. modern web applications hosting sensitive data should, however, not rely on window.name for cross-domain messaging but instead utilize the postmessage api. window.name will convert all values to their string representations by using the tostring method. specifications specification status comment html living standardthe definition of 'window.name' in that specification. living standard html5the definition of 'window.name' in that specification. recommendation ...
Window.navigator - Web APIs
Web › API › Window › navigator
living standard ...
Window: offline event - Web APIs
living standard ...
Window.ondevicemotion - Web APIs
an event handler for the devicemotion events sent to the window. syntax window.ondevicemotion = funcref; where funcref is a reference to a function. this function receives a devicemotionevent object describing the motion that occurred. specifications specification status comment deviceorientation event specification editor's draft initial definition. ...
window.ondeviceorientation - Web APIs
...
Window.ongamepadconnected - Web APIs
interface represents an event handler that will run when a gamepad is connected (when the gamepadconnected event fires). the event object is of type gamepadevent. syntax window.ongamepadconnected = function() { ... }; examples window.ongamepadconnected = function(event) { // all buttons and axes values can be accessed through event.gamepad; }; specifications specification status comment gamepadthe definition of 'gamepadconnected event' in that specification. working draft initial definition ...
Window.ongamepaddisconnected - Web APIs
working draft initial definition ...
Window: online event - Web APIs
living standard ...
Obsolete features - Web APIs
this page lists the obsolete windowfeatures parameter of window.open function. directories obsolete since gecko 2 obsolete synonym of personalbar. in ie, it rendered the links bar. supported in gecko up to 1.9.2 and in ie up to 6. fullscreen this feature no longer works in msie 6 sp2 the way it worked in msie 5.x. the windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in msie 5.x. fullscreen always upsets users with large monitor screen or with dual monitor screen. forcing fullscreen onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users. fullscreen does not really work in msie 6 sp2. personalbar obsolete sinc...
Window.opener - Web APIs
Web › API › Window › opener
current window (using window.open(), or by a link with target attribute set). if this window was not opened by being linked to or created by another, returns null. in modern browsers, a rel="noopener noreferrer" attribute on the originating <a> element will prevent the window.opener reference from being set, in which case this property will return null. specifications specification status comment html living standardthe definition of 'window.opener' in that specification. living standard ...
Window.orientation - Web APIs
summary returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation. its only possible values are -90, 0, 90, and 180. positive values are clockwise; negative values are counterclockwise. specifications specification status comment compatibility standardthe definition of 'window.orientation' in that specification. living standard ...
Window: orientationchange event - Web APIs
living standard ...
Window.outerHeight - Web APIs
any sidebar, window chrome, and window-resizing borders/handles. notes to change the size of a window, see window.resizeby() and window.resizeto(). to get the inner height of a window, i.e. the height of the page being displayed, see window.innerheight. graphical example the following figure shows the difference between outerheight and innerheight. specification specification status comment css object model (cssom) view modulethe definition of 'window.outerheight' in that specification. working draft ...
Window.outerWidth - Web APIs
Web › API › Window › outerWidth
e outside of the browser window. it represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles. notes to change the size of a window, see window.resizeby() and window.resizeto(). to get the inner width of a window, i.e. the width of the page being displayed, see window.innerwidth. specification specification status comment css object model (cssom) view modulethe definition of 'window.outerwidth' in that specification. working draft initial definition. ...
Window.pageXOffset - Web APIs
the read-only window property pagexoffset is an alias for scrollx. specification specification status comment css object model (cssom) view modulethe definition of 'window.pagexoffset' in that specification. working draft ...
Window.pageYOffset - Web APIs
working draft ...
Window: pagehide event - Web APIs
living standard initial specification. html5the definition of 'pagehide' in that specification. recommendation ...
Window: pageshow event - Web APIs
vent:', event.type); break; } }; events.foreach(eventname => window.addeventlistener(eventname, eventlogger) ); html <p>open the console and watch the output as you navigate to and from this page. try loading new pages into this tab, then navigating forward and backward through history, noting the events’ output to the log.</p> results specifications specification status comment html living standardthe definition of 'pageshow' in that specification. living standard initial specification. html5the definition of 'pageshow' in that specification. recommendation ...
Window.parent - Web APIs
Web › API › Window › parent
ent window or subframe. if a window does not have a parent, its parent property is a reference to itself. when a window is loaded in an <iframe>, <object>, or <frame>, its parent is the window with the element embedding the window. syntax var parentwindow = window.parent; example if (window.parent != window.top) { // we're deeper than one down } specifications specification status comment html living standardthe definition of 'window.parent' in that specification. living standard ...
Window: paste event - Web APIs
event is the element that was the intended target of the paste action. you can listen for this event on the window interface to handle it in the capture or bubbling phases. for full details on this event please see the page on the element: paste event. examples window.addeventlistener('paste', (event) => { console.log('paste action initiated') }); specifications specification status clipboard api and events working draft ...
Window.performance - Web APIs
ument. it serves as the point of exposure for the performance timeline api, the high resolution time api, the navigation timing api, the user timing api, and the resource timing api. syntax performancedata = window.performance; value a performance object offering access to the performance and timing-related information offered by the apis it exposes. specifications specification status comment high resolution timethe definition of 'window.performance' in that specification. recommendation defines now() method. ...
Window.personalbar - Web APIs
, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page. specifications specification status comment html living standardthe definition of 'window.personalbar' in that specification. living standard html5the definition of 'window.personalbar' in that specification. recommendation ...
Window: popstate event - Web APIs
living standard ...
window.postMessage() - Web APIs
living standard ...
Window.print() - Web APIs
Web › API › Window › print
living standard browser compatibility the compatibility table in this page is generated from structured data. ...
Window.prompt() - Web APIs
Web › API › Window › prompt
closed. for this reason, you should not overuse any function that creates a dialog box (or modal window). please note that result is a string. that means you should sometimes cast the value given by the user. for example, if their answer should be a number, you should cast the value to number. const anumber = number(window.prompt("type a number", "")); specification specification status comment html living standardthe definition of 'prompt()' in that specification. living standard browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreropera...
Window: rejectionhandled event - Web APIs
living standard initial definition. ...
Window.requestAnimationFrame() - Web APIs
y 200px. element.style.transform = 'translatex(' + math.min(0.1 * elapsed, 200) + 'px)'; if (elapsed < 2000) { // stop the animation after 2 seconds window.requestanimationframe(step); } } window.requestanimationframe(step); notes edge versions below 17 and internet explorer do not reliably fire requestanimationframe before the paint cycle. specification specification status comment html living standardthe definition of 'requestanimationframe' in that specification. living standard no change, supersedes the previous one. timing control for script-based animationsthe definition of 'requestanimationframe' in that specification. obsolete initial definition ...
Window.requestFileSystem() - Web APIs
ion to use. errorcallback optional an optional parameter specifying a function which is called if an error occurs while attempting to obtain the file system, or if the user denies permission to create or access the file system. the callback receives as input a single parameter: a fileerror object describing the error. return value undefined example specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
window.requestIdleCallback() - Web APIs
eout is specified and has a positive value, and the callback has not already been called by the time timeout milliseconds have passed, the callback will be called during the next idle period, even if doing so risks causing a negative performance impact. example see our complete example in the article cooperative scheduling of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasa...
Window.resizeBy() - Web APIs
Web › API › Window › resizeBy
working draft ...
Window.resizeTo() - Web APIs
Web › API › Window › resizeTo
senting the new outerheight in pixels (including scroll bars, title bars, etc). example this function resizes the window so that it takes up one quarter of the available screen. see the screen.availwidth and screen.availheight properties. function quarter() { window.resizeto( window.screen.availwidth / 2, window.screen.availheight / 2 ); } specification specification status comment css object model (cssom) view modulethe definition of 'window.resizeto()' in that specification. working draft ...
Window: resize event - Web APIs
obsolete css object model (cssom) view modulethe definition of 'resize' in that specification. working draft ...
Window.screen - Web APIs
Web › API › Window › screen
en object associated with the window. the screen object, implementing the screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered. syntax let screenobj = window.screen; example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screen' in that specification. working draft initial definition. ...
Window.screenLeft - Web APIs
Web › API › Window › screenLeft
working draft initial definition. ...
Window.screenTop - Web APIs
Web › API › Window › screenTop
working draft initial definition. ...
Window.screenX - Web APIs
Web › API › Window › screenX
window.requestanimationframe(positionelem); these work in exactly the same way as screenx/screeny. also in the code we include a snippet that detects whether screenleft is supported, and if not, polyfills in screenleft/screentop using screenx/screeny. if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenx' in that specification. working draft initial definition. ...
Window.screenY - Web APIs
Web › API › Window › screenY
window.requestanimationframe(positionelem); these work in exactly the same way as screenx/screeny. also in the code we include a snippet that detects whether screenleft is supported, and if not, polyfills in screenleft/screentop using screenx/screeny. if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screeny' in that specification. working draft initial definition. ...
Window.scroll() - Web APIs
Web › API › Window › scroll
ck to scroll down 100 pixels</button> using options: window.scroll({ top: 100, left: 100, behavior: 'smooth' }); notes window.scrollto() is effectively the same as this method. for relative scrolling, see window.scrollby(), window.scrollbylines(), and window.scrollbypages(). for scrolling elements, see element.scrolltop and element.scrollleft. specification specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopm...
Window.scrollBy() - Web APIs
Web › API › Window › scrollBy
0, window.innerheight); to scroll up: window.scrollby(0, -window.innerheight); using options: window.scrollby({ top: 100, left: 100, behavior: 'smooth' }); notes window.scrollby() scrolls by a particular amount, whereas window.scroll() scrolls to an absolute position in the document. see also window.scrollbylines() and window.scrollbypages(). specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollby()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. deskto...
Window.scrollTo() - Web APIs
Web › API › Window › scrollTo
working draft initial definition. ...
Window.scrollX - Web APIs
Web › API › Window › scrollX
standard properties. a fully compatible example: var x = (window.pagexoffset !== undefined) ? window.pagexoffset : (document.documentelement || document.body.parentnode || document.body).scrollleft; var y = (window.pageyoffset !== undefined) ? window.pageyoffset : (document.documentelement || document.body.parentnode || document.body).scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollx' in that specification. working draft ...
Window.scrollY - Web APIs
Web › API › Window › scrollY
working draft ...
Window.scrollbars - Web APIs
Web › API › Window › scrollbars
cked. syntax objref = window.scrollbars example the following complete html example shows how the visible property of the scrollbars object is used. <!doctype html> <html> <head> <title>various dom tests</title> <script> let visiblescrollbars = window.scrollbars.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.scrollbars' in that specification. living standard html5the definition of 'window.scrollbars' in that specification. recommendation ...
Window.self - Web APIs
Web › API › Window › self
living standard no difference from the latest snapshot html 5.1 html 5.1the definition of 'window.self' in that specification. recommendation no difference from the html5 html5the definition of 'window.self' in that specification. recommendation first snapshot contain...
Window.sessionStorage - Web APIs
living standard ...
Window.setImmediate() - Web APIs
semantics of postmessage mean it cannot be used there. settimeout(fn, 0) can potentially be used, however as it is clamped to 4ms for timers nested more than 5 levels deep per the html spec, it does not make for a suitable polyfill for the natural immediacy of setimmediate. all of these techniques are incorporated into a robust setimmediate polyfill. specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification. editor's draft initial definition. ...
Window.showModalDialog() - Web APIs
resizable: {on | off | yes | no | 1 | 0 } if this argument's value is on, yes, or 1, the dialog window can be resized by the user; otherwise its size is fixed. the default value is no. scroll: {on | off | yes | no | 1 | 0 } if on, yes, or 1, the dialog window has scroll bars; otherwise its size is fixed. default is no. note: firefox does not implement the dialoghide, edge, status, or unadorned arguments. examples try out showmodaldialog(). notes showmodaldialog() was briefly standardized as part of html5. the third argument for additional options was not present in the html5 version. specification msdn page for showmodaldialog browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, p...
Window.speechSynthesis - Web APIs
draft ...
Window.stop() - Web APIs
Web › API › Window › stop
the window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser. because of how scripts are executed, this method cannot interrupt its parent document's loading, but it will stop its images, new windows, and other still-loading objects. syntax window.stop() example window.stop(); specification specification status comment html living standardthe definition of 'window.stop()' in that specification. living standard html5the definition of 'window.stop' in that specification. recommendation browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/bro...
Window: storage event - Web APIs
dump the list to // the console. console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console. console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification. living standard ...
Window.toolbar - Web APIs
Web › API › Window › toolbar
toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above. also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page. see also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar specifications specification status comment html living standardthe definition of 'window.toolbar' in that specification. living standard html5the definition of 'window.toolbar' in that specification. recommendation ...
Window.top - Web APIs
Web › API › Window › top
topwindow = window.top; notes where the window.parent property returns the immediate parent of the current window, window.top returns the topmost window in the hierarchy of window objects. this property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset. specifications specification status comment html living standardthe definition of 'window.top' in that specification. living standard html5the definition of 'window.top' in that specification. recommendation initial definition ...
Window: transitioncancel event - Web APIs
working draft initial definition. ...
Window: transitionend event - Web APIs
transitionend. examples this code adds a listener to the transitionend event: window.addeventlistener('transitionend', () => { console.log('transition ended'); }); the same, but using the ontransitionend property instead of addeventlistener(): window.ontransitionend = () => { console.log('transition ended'); }; see a live example of this event. specifications specification status comment css transitionsthe definition of 'transitionend' in that specification. working draft initial definition. ...
Window: transitionrun event - Web APIs
working draft initial definition. ...
Window: transitionstart event - Web APIs
working draft initial definition. ...
Window: unhandledrejection event - Web APIs
om bubbling up to be handled by the runtime's logging code. this works because unhandledrejection is cancelable. window.addeventlistener('unhandledrejection', function (event) { // ...your code here to handle the unhandled rejection... // prevent the default handling (such as outputting the // error to the console) event.preventdefault(); }); specifications specification status comment html living standardthe definition of 'unhandledrejection' in that specification. living standard initial definition. ...
Window: unload event - Web APIs
working draft ...
Window.visualViewport - Web APIs
draft initial definition. ...
Window.window - Web APIs
Web › API › Window › window
le to readily get the document location. another advantage, is that the objects of such a class (even if the class were defined outside of a module) could change their reference to the window at will, they would not be able to do this if they had hard-coded a reference to "window". the default in the class could still be set as the current window object. specifications specification status comment html living standardthe definition of 'window.window' in that specification. living standard no difference from the latest snapshot html 5.1 html 5.1the definition of 'window.window' in that specification. recommendation no difference from the html5 html5the definition of 'window.window' in that specification. recommendation first snapshot c...
WindowClient.focus() - Web APIs
working draft initial definition. ...
WindowClient.focused - Web APIs
working draft initial definition ...
WindowClient.navigate() - Web APIs
pecified url into a controlled client page then returns a promise that resolves to the existing windowclient. syntax windowclient.navigate(url).then(function(windowclient) { // do something with your windowclient after navigation }); parameters url the location to navigate to. return value a promise that resolves to the existing windowclient. specifications specification status comment service workersthe definition of 'navigate()' in that specification. working draft initial definition. ...
WindowClient.visibilityState - Web APIs
working draft initial definition. ...
WindowClient - Web APIs
working draft initial definition ...
WindowEventHandlers.onafterprint - Web APIs
starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed. in general, you should prefer the use of an @media print css at-rule, but it may be necessary to use these events in some cases. syntax window.addeventlistener("afterprint", function(event) { ... }); window.onafterprint = function(event) { ... }; specification specification status comment html living standardthe definition of 'onafterprint' in that specification. living standard ...
WindowEventHandlers.onbeforeprint - Web APIs
rint = function(event) { ... }; polyfill safari does not implement these events, but you can create an equivalent result to the beforeprint event with window.matchmedia('print'). var mediaquerylist = window.matchmedia('print'); mediaquerylist.addlistener(function(mql) { if(mql.matches) { console.log('webkit equivalent of onbeforeprint'); } }); specification specification status comment html living standardthe definition of 'onbeforeprint' in that specification. living standard ...
WindowEventHandlers.onbeforeunload - Web APIs
avigating back to the page. you can bind to window.onbeforeunload to prevent the browser from fully caching the page. if you do so, javascript in the page will be triggered on the subsequent return visit and update the content as desired. specifications the event was originally introduced by microsoft in internet explorer 4 and standardized in the html5 specification. specification status comment html living standardthe definition of 'onbeforeunload' in that specification. living standard html 5.1the definition of 'globaleventhandlers' in that specification. recommendation html5the definition of 'globaleventhandlers' in that specification. recommendation ...
WindowEventHandlers.onhashchange - Web APIs
living standard html 5.1the definition of 'globaleventhandlers' in that specification. recommendation html5the definition of 'globaleventhandlers' in that specification. recommendation ...
WindowEventHandlers.onlanguagechange - Web APIs
nction is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type event. example window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specifications specification status comment html living standardthe definition of 'windoweventhandler.onlanguagechange' in that specification. living standard initial specification. ...
WindowEventHandlers.onmessage - Web APIs
the onmessage property of the windoweventhandlers mixin is the eventhandler called whenever an object receives a message event. syntax window.addeventlistener('message', function(event) { ... }) window.onmessage = function(event) { ... } specifications specification status comment html living standardthe definition of 'onmessage' in that specification. living standard initial definition. ...
WindowEventHandlers.onmessageerror - Web APIs
living standard ...
WindowEventHandlers.onpopstate - Web APIs
living standard ...
WindowEventHandlers.onrejectionhandled - Web APIs
y of the windoweventhandlers mixin is the eventhandler for processing rejectionhandled events. these events are raised when promises are rejected. syntax window.addeventlistener("rejectionhandled", function(event) { ... }); window.onrejectionhandled = function(event) { ...}; example window.onrejectionhandled = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onrejectionhandled' in that specification. living standard initial definition. ...
WindowEventHandlers.onstorage - Web APIs
onref is a function name or a function expression. this function receives a storageevent as its sole argument. example this example logs the value for a storage key whenever it changes in another document. window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification. living standard ...
WindowEventHandlers.onunhandledrejection - Web APIs
ion; value function is an eventhandler or function to call when unhandledrejection events are received by the window. the event handler receives as an input parameter as a promiserejectionevent. examples this example simply logs unhandled rejections' reason values to the console. window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onunhandledrejection' in that specification. living standard initial definition. ...
WindowEventHandlers.onunload - Web APIs
event occurs. note: browsers equipped with pop-up blockers will ignore all window.open() method calls in onunload event handler functions. syntax window.addeventlistener("unload", function(event) { ... }); window.onunload = function(event) { ... }; typically, it is better to use window.addeventlistener() and the unload event, instead of onunload. specifications specification status comment html living standardthe definition of 'onunload' in that specification. living standard html 5.1the definition of 'globaleventhandlers' in that specification. recommendation html5the definition of 'globaleventhandlers' in that specification. recommendation ...
WindowEventHandlers - Web APIs
nunhandledrejection is an eventhandler representing the code to be called when the unhandledrejection event is raised, indicating that a promise was rejected but the rejection was not handled. windoweventhandlers.onunload is an eventhandler representing the code to be called when the unload event is raised. methods this interface defines no method. specifications specification status comment html living standardthe definition of 'windoweventhandlers' in that specification. living standard no change since the latest snapshot, html 5.1. html 5.1the definition of 'windoweventhandlers' in that specification. recommendation snapshot of html living standard. added onlanguage since the html5 snapshot. html5the definition of 'windoweventh...
WindowOrWorkerGlobalScope.atob() - Web APIs
(name: invalidcharactererror) throws if encodeddata is not valid base64. example const encodeddata = window.btoa('hello, world'); // encode a string const decodeddata = window.atob(encodeddata); // decode the string polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for browsers that don't support it. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.atob()' in that specification. living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html 5.1the definition of 'windowbase64.atob()' in that specification. recommendation snapshot of html living standard. no change. html5the definition of 'window...
WindowOrWorkerGlobalScope.btoa() - Web APIs
.charcodeat(i); } return string.fromcharcode(...new uint16array(bytes.buffer)); } const decoded = atob(encoded); const original = frombinary(decoded); console.log(original); // ☸☹☺☻☼☾☿ polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for browsers that don't support it. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.btoa()' in that specification. living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html 5.1the definition of 'windowbase64.btoa()' in that specification. recommendation snapshot of html living standard. no change. html5the definition of 'window...
WindowOrWorkerGlobalScope.caches - Web APIs
working draft defined in a windoworworkerglobalscope partial in the newest spec. service workers working draft initial definition. ...
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
id was returned by the corresponding call to setinterval(). it's worth noting that the pool of ids used by setinterval() and settimeout() are shared, which means you can technically use clearinterval() and cleartimeout() interchangeably. however, for clarity, you should avoid doing so. return value undefined example see the setinterval() examples. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.clearinterval()' in that specification. living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html living standardthe definition of 'clearinterval()' in that specification. living standard ...
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html living standardthe definition of 'cleartimeout()' in that specification. living standard ...
self.createImageBitmap() - Web APIs
living standard ...
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
sage() call. this value is dependant on any cross-origin-opener-policy and cross-origin-embedder-policy headers present in the response. syntax var mycrossoriginisolated = self.crossoriginisolated; // or just crossoriginisolated value a boolean value examples if(crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification status comment html living standardthe definition of 'crossoriginisolated' in that specification. living standard initial definition. ...
WindowOrWorkerGlobalScope.indexedDB - Web APIs
an idbfactory object. 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. recommendation defined in a windoworworkerglobalscope partial in the newest spec. indexed database api 2.0the definition of 'indexeddb' in that specification. recommendation initial definition. ...
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
the issecurecontext read-only property of the windoworworkerglobalscope interface returns a boolean indicating whether the current context is secure (true) or not (false). syntax var isitsecure = self.issecurecontext; // or just issecurecontext value a boolean. specifications specification status comment secure contextsthe definition of 'windoworworkerglobalscope.issecurecontext' in that specification. candidate recommendation initial definition. ...
WindowOrWorkerGlobalScope.origin - Web APIs
living standard initial definition. ...
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
sically a monkey-patch for queuemicrotask() for modern engines. it creates a microtask by using a promise that resolves immediately. if (typeof window.queuemicrotask !== "function") { window.queuemicrotask = function (callback) { promise.resolve() .then(callback) .catch(e => settimeout(() => { throw e; })); // report exceptions }; } specifications specification status comment html living standardthe definition of 'self.queuemicrotask()' in that specification. living standard initial definition ...
WindowOrWorkerGlobalScope.setInterval() - Web APIs
loop(); }, delay); })(); in the above snippet, a named function loop() is declared and is immediately executed. loop() is recursively called inside settimeout() after the logic has completed executing. while this pattern does not guarantee execution on a fixed interval, it does guarantee that the previous interval has completed before recursing. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.setinterval()' in that specification. living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html living standardthe definition of 'windowtimers.setinterval()' in that specification. living standard initial definition (dom level 0) ...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
ndow.requestidlecallback()), or until the load event is fired. maximum delay value browsers including internet explorer, chrome, safari, and firefox store the delay as a 32-bit signed integer internally. this causes an integer overflow when using delays larger than 2,147,483,647 ms (about 24.8 days), resulting in the timeout being executed immediately. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.settimeout()' in that specification. living standard method moved to the windoworworkerglobalscope mixin in the latest spec. html living standardthe definition of 'windowtimers.settimeout()' in that specification. living standard initial definition (dom level 0) ...
WindowOrWorkerGlobalScope - Web APIs
y higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete. windoworworkerglobalscope.setinterval() schedules a function to execute every time a given number of milliseconds elapses. windoworworkerglobalscope.settimeout() schedules a function to execute in a given amount of time. specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope mixin' in that specification. living standard this is where the main mixin is defined. ...
WindowProxy - Web APIs
ts in every browsing context. all operations performed on a windowproxy object will also be applied to the underlying window object it currently wraps. therefore, interacting with a windowproxy object is almost identical to directly interacting with a window object. when a browsing context is navigated, the window object its windowproxy wraps is changed. specifications specification status comment html living standardthe definition of 'windowproxy' in that specification. living standard initial definition. ...
Worker() - Web APIs
Web › API › Worker › Worker
living standard ...
Worker: message event - Web APIs
ta}`) }); alternatively, it could listen using the onmessage event handler property: const worker = new worker("static/scripts/worker.js"); worker.onmessage = (event) => { console.log(`received message from worker: ${event.data}`) }; the worker posts messages using self.postmessage(): // static/scripts/worker.js self.postmessage('i\'m alive!'); specifications specification status html living standard living standard ...
Worker: messageerror event - Web APIs
ent}`); }); the same, but using the onmessageerror event handler property: // inside main.js const worker = new worker("static/scripts/worker.js"); worker.onmessage = (event) => { console.error(`received message from worker: ${event}`); }; worker.onmessageerror = (event) => { console.error(`error receiving message from worker: ${event}`); }; specifications specification status html living standard living standard ...
Worker.onmessage - Web APIs
Web › API › Worker › onmessage
living standard ...
Worker.onmessageerror - Web APIs
living standard ...
Worker.prototype.postMessage() - Web APIs
... } bootstrap.js:20 got back buf in main thread, abuf.bytelength: 8 bootstrap.js:12 from worker, post send back abuf.bytelength: 0 myworker.js:7:2 bytelength goes to 0 as it is transferred. to see a full working example of this firefox demo add-on see here: github :: chromeworker - demo-transfer-arraybuffer specifications specification status comment html living standardthe definition of 'worker.postmessage()' in that specification. living standard ...
Worker.terminate() - Web APIs
Web › API › Worker › terminate
er the worker an opportunity to finish its operations; it is simply stopped at once. syntax myworker.terminate(); parameters none. returns void. example the following code snippet shows creation of a worker object using the worker() constructor, which is then immediately terminated. var myworker = new worker('worker.js'); myworker.terminate(); specifications specification status comment html living standardthe definition of 'worker.terminate()' in that specification. living standard ...
Worker - Web APIs
Web › API › Worker
living standard ...
WorkerGlobalScope.importScripts() - Web APIs
pt). example if you had some functionality written in a separate script called foo.js that you wanted to use inside worker.js, you could import it using the following line: importscripts('foo.js'); importscripts() and self.importscripts() are effectively equivalent — both represent importscripts() being called from inside the worker's inner scope. specifications specification status comment html living standardthe definition of 'importscripts()' in that specification. living standard ...
WorkerGlobalScope: languagechange event - Web APIs
living standard ...
WorkerGlobalScope.location - Web APIs
living standard ...
WorkerGlobalScope.navigator - Web APIs
living standard ...
WorkerGlobalScope.onerror - Web APIs
roperty of the workerglobalscope interface represents an eventhandler to be called when the error event occurs and bubbles through the worker. syntax self.onerror = function() { ... }; example the following code snippet shows an onerror handler set inside a worker: self.onerror = function() { console.log('there is an error inside your worker!'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onerror' in that specification. living standard ...
WorkerGlobalScope.onlanguagechange - Web APIs
ents an eventhandler to be called when the languagechange event occurs and bubbles through the worker. syntax self.onlanguagechange = function() { ... }; example the following code snippet shows an onlanguagechange handler set inside a worker: self.onlanguagechange = function() { console.log('your preferred language settings have been changed'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onlanguagechange' in that specification. living standard ...
WorkerGlobalScope.onoffline - Web APIs
e property of the workerglobalscope interface represents an eventhandler to be called when the offline event occurs and bubbles through the worker. syntax self.onoffline = function() { ... }; example the following code snippet shows an onoffline handler set inside a worker: self.onoffline = function() { console.log('your worker is now offline'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onoffline' in that specification. living standard ...
WorkerGlobalScope.ononline - Web APIs
living standard ...
WorkerGlobalScope.performance - Web APIs
recommendation defines workerglobalscope.performance. ...
WorkerGlobalScope.self - Web APIs
edicatedworkerglobalscope() { [native code] } error: function error() { [native code] } // etc. etc. this provides a full list of the objects available to that worker scope, so it is quite a useful test if you want to see whether something is available to your worker or not. we also maintain a list of functions and classes available to web workers. specifications specification status comment html living standardthe definition of 'self' in that specification. living standard ...
WorkerGlobalScope - Web APIs
living standard ...
WorkerLocation - Web APIs
ent identifier of the url of the script executed in the worker. methods the workerlocation interface doesn't inherit any method, but implements methods defined in the urlutilsreadonly interface. urlutilsreadonly.tostring() returns a domstring containing the whole url of the script executed in the worker. it is a synonym for urlutilsreadonly.href. specifications specification status comment html living standardthe definition of 'workerlocation' in that specification. living standard ...
WorkerNavigator.connection - Web APIs
draft initial specification ...
WorkerNavigator.locks - Web APIs
draft initial definition. ...
WorkerNavigator.permissions - Web APIs
the workernavigator.permissions read-only property returns a permissions object that can be used to query and update permission status of apis covered by the permissions api. syntax permissionsobj = self.permissions value a permissions object. 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. browser support the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-d...
Worklet.addModule() - Web APIs
Web › API › Worklet › addModule
working draft ...
Worklet - Web APIs
Web › API › Worklet
api for 3d rendering with webgl, you don't use worklets. instead, you write vertex shaders and fragment shaders using glsl code, and those shaders will then run on the graphics card. properties the worklet interface does not define any properties. methods worklet.addmodule() adds the script module at the given url to the current worklet. specifications specification status comment worklets level 1the definition of 'worklet' in that specification. working draft ...
WritableStream.WritableStream() - Web APIs
the data source can wither write more data (line 11) or call close() (line 24). calling close() too early can prevent data from being written. this is why the example calls defaultwriter.ready twice (lines 9 and 22). the promise returned by the sink's write() method (line 40) tells the writablestream and its writer when to resolve defaultwriter.ready. specifications specification status comment streamsthe definition of 'writablestream()' in that specification. living standard initial definition. ...
WritableStream.abort() - Web APIs
reason parameter. exceptions typeerror the stream you are trying to abort is not a writablestream, or it is locked. examples const writablestream = new writablestream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... // abort the stream later on, when required writablestream.abort(); specifications specification status comment streamsthe definition of 'abort()' in that specification. living standard initial definition. ...
WritableStream.getWriter() - Web APIs
living standard initial definition. ...
WritableStream.locked - Web APIs
lean indicating whether or not the writable stream is locked. examples const writablestream = new writablestream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writablestream.getwriter(); writablestream.locked // should return true, as the stream has been locked to a writer specifications specification status comment streamsthe definition of 'locked' in that specification. living standard initial definition. ...
WritableStream - Web APIs
the data source can either write more data (line 9) or call close() (line 24). calling close() too early can prevent data from being written. this is why the example calls defaultwriter.ready twice (lines 9 and 22). the promise returned by the sink's write() method (line 40) tells the writablestream and its writer when to resolve defaultwriter.ready. specifications specification status comment streamsthe definition of 'writablestream' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet ...
WritableStreamDefaultController.error() - Web APIs
stream you are trying to error is not a writablestream. examples const writablestream = new writablestream({ start(controller) { // do stuff with controller // error stream if necessary controller.error('my error is broken'); }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }); specifications specification status comment streamsthe definition of 'error()' in that specification. living standard initial definition. ...
WritableStreamDefaultController - Web APIs
ture interactions with the associated stream to error. examples const writablestream = new writablestream({ start(controller) { // do stuff with controller // error stream if necessary controller.error('my stream is broken'); }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }); specifications specification status comment streamsthe definition of 'writablestreamdefaultcontroller' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
living standard initial definition. ...
WritableStreamDefaultWriter.abort() - Web APIs
to abort is not a writablestream, or it is locked. examples const writablestream = new writablestream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writablestream.getwriter(); ... // abort the stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment streamsthe definition of 'abort()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.close() - Web APIs
living standard initial definition. ...
WritableStreamDefaultWriter.closed - Web APIs
examples const writablestream = new writablestream({ start(controller) { }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writablestream.getwriter(); .. // check if the stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.desiredSize - Web APIs
he stream is closed. exceptions typeerror the writer’s lock is released. examples const writablestream = new writablestream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writablestream.getwriter(); ... // return stream's desired size let size = writer.desiredsize; specifications specification status comment streamsthe definition of 'desiredsize' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.ready - Web APIs
}); // call ready again to ensure that all chunks are written // before closing the writer. defaultwriter.ready .then(function() { defaultwriter.close() .then(function() { console.log("all chunks written"); }) .catch(function(err) { console.log("stream error: " + err); }); }); }); } specifications specification status comment streamsthe definition of 'ready' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorerop...
WritableStreamDefaultWriter.releaseLock() - Web APIs
ultwritere.releaselock() parameters none. return value undefined. examples const writablestream = new writablestream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writablestream.getwriter(); ... // release writer's lock on the stream when desired writer.releaselock(); specifications specification status comment streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.write() - Web APIs
living standard initial definition. ...
WritableStreamDefaultWriter - Web APIs
living standard initial definition. ...
XMLDocument - Web APIs
living standard no changes. dom4the definition of 'xmldocument' in that specification. obsolete initial definition. ...
HTML in XMLHttpRequest - Web APIs
+ "\\s*>))*.?", "i")).exec(ssrc.slice(ssrc.indexof(aexec[0]) + aexec[0].length)) || "" : ""; } var oreq = new xmlhttprequest(); oreq.open("get", "yourpage.html", true); oreq.onload = function () { console.log(gethtml(this, "intro")); }; oreq.send(null); note: this solution is very expensive for the interpreter. use it only when it is really necessary. specifications specification status comment xmlhttprequest living standard initial definition ...
Sending and Receiving Binary Data - Web APIs
browsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller. function load_binary_resource(url) { var req = new xmlhttprequest(); req.open('get', url, false); //xhr binary charset opt by marcus granado 2006 [http://mgran.blogspot.com] req.overridemimetype('text\/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) return ''; return req.responsetext; } the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain text, using a user-defined character set. this tells the browser not to parse it, and to let the bytes pass through unprocessed. var filestream = load_binary_resource(url); var abyte = filestream.charcodeat(x) & 0xff; // throw away high-order byte...
XMLHttpRequest: abort event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: error event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.getAllResponseHeaders() - Web APIs
living standard whatwg living standard ...
XMLHttpRequest.getResponseHeader() - Web APIs
alling abort(). var client = new xmlhttprequest(); client.open("get", "unicorns-are-teh-awesome.txt", true); client.send(); client.onreadystatechange = function() { if(this.readystate == this.headers_received) { var contenttype = client.getresponseheader("content-type"); if (contenttype != my_expected_type) { client.abort(); } } } specifications specification status comment xmlhttprequestthe definition of 'getresponseheader()' in that specification. living standard whatwg living standard ...
XMLHttpRequest: load event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadend event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadstart event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.open() - Web APIs
any browsers have deprecated synchronous xhr support on the main thread entirely. synchronous requests are permitted in workers. user optional the optional user name to use for authentication purposes; by default, this is the null value. password optional the optional password to use for authentication purposes; by default, this is the null value. specifications specification status comment xmlhttprequestthe definition of 'open()' in that specification. living standard whatwg living standard ...
XMLHttpRequest.overrideMimeType() - Web APIs
f the content isn't valid xml, an "xml parsing error: not well-formed" error occurs. you can avoid this by calling overridemimetype() to specify a different type. // interpret the received data as plain text req = new xmlhttprequest(); req.overridemimetype("text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification. living standard whatwg living standard ...
XMLHttpRequest: progress event - Web APIs
istener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.response - Web APIs
ndled as raw text data (since nothing here is overriding the default responsetype). ...
XMLHttpRequest.responseType - Web APIs
s that block the browser's main thread, thereby bogging down the user experience. ...
XMLHttpRequest.responseURL - Web APIs
if the url is returned, any url fragment present in the url will be stripped away. ...
XMLHttpRequest.responseXML - Web APIs
ions invalidstateerror the responsetype isn't either "document" or an empty string. example var xhr = new xmlhttprequest; xhr.open('get', '/server'); // if specified, responsetype must be empty string or "document" xhr.responsetype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification. living standard whatwg living standard ...
XMLHttpRequest.send() - Web APIs
(new int8array()); // xhr.send(document); example: post var xhr = new xmlhttprequest(); xhr.open("post", '/server', true); //send the proper header information along with the request xhr.setrequestheader("content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { // call a function when the state changes. if (this.readystate === xmlhttprequest.done && this.status === 200) { // request finished. do processing here. } } xhr.send("foo=bar&lorem=ipsum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification. living standard whatwg living standard ...
XMLHttpRequest.setRequestHeader() - Web APIs
en you send requests across domains. in this situation, you need to set up the access-control-allow-headers in your response header at server side. syntax xmlhttprequest.setrequestheader(header, value) parameters header the name of the header whose value is to be set. value the value to set as the body of the header. return value undefined. specifications specification status comment xmlhttprequestthe definition of 'setrequestheader()' in that specification. living standard whatwg living standard ...
XMLHttpRequest.timeout - Web APIs
ing the open() method and before calling the send() method. ...
XMLHttpRequest: timeout event - Web APIs
living standard ...
XMLHttpRequest.upload - Web APIs
val specified by the xmlhttprequest.timeout. loadend onloadend the upload finished. ...
XMLHttpRequest.withCredentials - Web APIs
equests. ...
XMLHttpRequestEventTarget.onabort - Web APIs
on to be executed when the transaction is aborted. ...
XMLHttpRequestEventTarget.onerror - Web APIs
equest.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.onload - Web APIs
the value of this (i.e. the context) is the same xmlhttprequest this callback is related to. ...
XMLHttpRequestEventTarget.onloadstart - Web APIs
uest.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
ed. event.total the total amount of data to be transferred. ...
XMLHttpRequestEventTarget - Web APIs
imeout event is received by this object; this only happens if a timeout has been previously established by setting the value of the xmlhttprequest object's timeout attribute. xmlhttprequesteventtarget.onloadend contains the function that is called when the load is completed, even if the request failed, and the loadend event is received by this object. specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestResponseType - Web APIs
progress event returns the data received so far. ...
XMLSerializer.serializeToString() - Web APIs
reviously-specified prefix or default namespace may be dropped or altered. the resulting xml is compatible with the html parser. elements in the html namespace that have no child nodes (thereby representing empty tags) are serialized with both begin and end tags ("<someelement></someelement>") instead of using the empty-element tag ("<someelement/>"). specifications specification status comment dom parsing and serializationthe definition of 'serializetostring()' in that specification. working draft ...
XMLSerializer - Web APIs
working draft ...
XPathEvaluator.createExpression() - Web APIs
recommendation initial definition ...
XPathEvaluator.createNSResolver() - Web APIs
ethod is called, also correctly resolving the implicit xml prefix. syntax xpathnsresolver xpathevaluator.creatensresolver(noderesolver); parameters noderesolver a node to be used as a context for namespace resolution. return value an xpathnsresolver object which resolves namespaces with respect to the definitions in scope for a specified node. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.creatensresolver()' in that specification. recommendation initial definition ...
XPathEvaluator.evaluate() - Web APIs
shows the use of the evaluate() method. html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var evaluator = new xpathevaluator(); var result = evaluator.evaluate("//div", document, null, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.evaluate()' in that specification. recommendation initial definition ...
XPathEvaluator - Web APIs
recommendation initial definition ...
XPathException.code - Web APIs
the code read-only property of the xpathexception interface returns a short that contains one of the error code constants. syntax var exceptioncode = exception.code; value a short number representing the error code. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification. recommendation initial definition ...
XPathException - Web APIs
recommendation initial definition ...
XPathExpression.evaluate() - Web APIs
recommendation initial definition ...
XPathExpression - Web APIs
recommendation initial definition ...
XPathNSResolver.lookupNamespaceURI() - Web APIs
namespace uri associated to the given namespace prefix within an xpath expression evaluated by the xpathevaluator interface. syntax domstring xpathnsresolver.lookupnamespaceuri(prefix); parameters prefix a domstring representing the prefix to look for. return value a domstring representing the associated namespace uri or null if none is found. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver.lookupnamespaceuri()' in that specification. recommendation initial definition ...
XPathNSResolver - Web APIs
s prefix strings in an xpath expression to be properly bound to namespace uri strings. the xpathevaluator interface can construct an implementation of xpathnsresolver from a node, or the interface may be implemented by any application. methods xpathnsresolver.lookupnamespaceuri() looks up the namespace uri associated to the given namespace prefix. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver' in that specification. recommendation initial definition ...
XPathResult.booleanValue - Web APIs
mple shows the use of the booleanvalue property. html <div>xpath example</div> <p>text is 'xpath example': <output></output></p> javascript var xpath = "//div/text() = 'xpath example'"; var result = document.evaluate(xpath, document, null, xpathresult.boolean_type, null); document.queryselector("output").textcontent = result.booleanvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.booleanvalue' in that specification. recommendation initial definition ...
XPathResult.invalidIteratorState - Web APIs
recommendation initial definition ...
XPathResult.iterateNext() - Web APIs
recommendation initial definition ...
XPathResult.numberValue - Web APIs
the following example shows the use of the numbervalue property. html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "count(//div)"; var result = document.evaluate(xpath, document, null, xpathresult.number_type, null); document.queryselector("output").textcontent = result.numbervalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.numbervalue' in that specification. recommendation initial definition ...
XPathResult.resultType - Web APIs
recommendation initial definition ...
XPathResult.singleNodeValue - Web APIs
recommendation initial definition ...
XPathResult.snapshotItem() - Web APIs
recommendation initial definition ...
XPathResult.snapshotLength - Web APIs
example shows the use of the snapshotlength property. html <div>xpath example</div> <div>number of matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotlength' in that specification. recommendation initial definition ...
XPathResult.stringValue - Web APIs
example shows the use of the stringvalue property. html <div>xpath example</div> <div>text content of the &lt;div&gt; above: <output></output></div> javascript var xpath = "//div/text()"; var result = document.evaluate(xpath, document, null, xpathresult.string_type, null); document.queryselector("output").textcontent = result.stringvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.stringvalue' in that specification. recommendation initial definition ...
XPathResult - Web APIs
in the document. any_unordered_node_type 8 a result node-set containing any single node that matches the expression. the node is not necessarily the first node in the document that matches the expression. first_ordered_node_type 9 a result node-set containing the first node in the document that matches the expression. specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult' in that specification. recommendation initial definition ...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
ation, which is not considered an error condition. although some samples render a mesh or other shape to display the bounds to the user, in a real-world application, you shouldn't do this. the browser, however, should provide appropriate warnings to the user about any risks (such as the risk that they might run into a physical wall if they keep moving). specifications specification status comment webxr device apithe definition of 'boundsgeometry' in that specification. working draft initial definition. ...
XRBoundedReferenceSpace - Web APIs
intreadonly objects, each of which defines a vertex in the polygon defining the boundaries within which the user will be required to remain. these vertices must be sorted such that they move clockwise around the viewer's position. methods xrboundedreferencespace inherits the methods of its parent interface, xrreferencespace. it has no further methods. specifications specification status comment webxr device apithe definition of 'xrboundedreferencespace' in that specification. working draft initial definition. ...
XREnvironmentBlendMode - Web APIs
olled. in this mode, the xrsession's renderstate.baselayer property provides relative weights of the artificial layer during the compositing process. pixels whose alpha value is 1.0 are rendered fully opaque, totally obscuring the real world, while pixels with an alpha of 1.0 are totally transparent, leaving the surrounding environment to pass through. specifications specification status comment webxr augmented reality modulethe definition of 'xrenvironmentblendmode' in that specification. editor's draft initial definition. ...
XREye - Web APIs
Web › API › XREye
single eye, the value may be none. values left the xrview represents the point-of-view of the viewer's left eye. right the view represents the viewer's right eye. none the xrview describes a monoscopic view, or the view otherwise doesn't represent a particular eye's point-of-view. usage notes these values are used by the xrview property eye. specifications specification status comment webxr device apithe definition of 'xreye' in that specification. working draft initial definition. ...
XRFrame.getPose() - Web APIs
Web › API › XRFrame › getPose
ce an xrspace specifying the space for which to obtain an xrpose describing the item's position and orientation. basespace an xrspace to use as the base or origin for the purposes of computing the relative position and orientation. return value an xrpose object specifying the position and orientation, relative to the xrspace indicated by basespace. specifications specification status comment webxr device apithe definition of 'xrframe.getpose()' in that specification. working draft initial definition. ...
XRFrame.getViewerPose() - Web APIs
working draft initial definition. ...
XRFrame.session - Web APIs
Web › API › XRFrame › session
an xrframe object's read-only session property returns the xrsession object that generated the frame. syntax var xrsession = xrframe.session; value a xrsession object representing the webxr session for which this xrframe describes the object positions and orientations. specifications specification status comment webxr device apithe definition of 'xrframe.session' in that specification. working draft initial definition. ...
XRFrame - Web APIs
Web › API › XRFrame
cts. the information about a specific object can be obtained by calling one of the methods on the object. methods getpose() returns an xrpose object representing the spatial relationship between the two specified xrspace objects. getviewerpose() returns an xrviewerpose describing the viewer's position and orientation in a given xrreferencespace. specifications specification status comment webxr device apithe definition of 'xrframe' in that specification. working draft initial definition. ...
XRFrameRequestCallback - Web APIs
working draft initial definition. ...
XRHandedness - Web APIs
proceeds to get the pose for the gripspace transformed into the current reference space. assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness. with these values in hand (no pun intended), myrenderhandobject() can draw the appropriate model positioned and formed for the correct hand. specifications specification status comment webxr device apithe definition of 'xrhandedness' in that specification. working draft initial definition. ...
XRInputSource.gripSpace - Web APIs
working draft initial definition. ...
XRInputSource.handedness - Web APIs
proceeds to get the pose for the gripspace transformed into the current reference space. assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness. with these values in hand (no pun intended), myrenderhandobject() can draw the appropriate model positioned and formed for the correct hand. specifications specification status comment webxr device apithe definition of 'xrinputsource.handedness' in that specification. working draft initial definition. ...
XRInputSource.profiles - Web APIs
working draft initial definition. ...
XRInputSource.targetRayMode - Web APIs
working draft initial definition. ...
XRInputSource.targetRaySpace - Web APIs
working draft initial definition. ...
XRInputSource - Web APIs
e gripspace property, which is an xrspace used to map the input's coordinate system into the world coordinate system. the grip space's coordinate system can then be used to render objects so they appear to be held in the user's hand. for more details on the input source's coordinate system, see the article that covers the gripspace property in detail. specifications specification status comment webxr device apithe definition of 'xrinputsource' in that specification. working draft initial definition. ...
XRInputSourceArray.entries() - Web APIs
ut); } else { /* handle other inputs */ } } } for each input in the llist, gamepad inputs are dispatched to a checkgamepad() with the input's gamepad object, taken from its gamepad property, as an input for other devices, we look for tracked-pointer devices in the player's main hand, dispatching those to a handlemainhandinput() method. ...
XRInputSourceArray.forEach() - Web APIs
else { /* handle other inputs */ } } }); for each input in the llist, the callback dispatches gamepad inputs to a checkgamepad() with the input's gamepad object, taken from its gamepad property, as an input for other devices, we look for tracked-pointer devices in the player's main hand, dispatching those to a handlemainhandinput() method. ...
XRInputSourceArray.keys() - Web APIs
device it supports using. for (const inputidx of xrsession.inputsources.keys()) { /* the keys are the indexes into the list of inputs */ checkinput(xrsession.inputsources[inputidx]); } here, for...of is used to iterate over each of the keys. for each key, the input is retrieved using the index with array notation: xrsession.inputsources[inputidx]. ...
XRInputSourceArray.length - Web APIs
working draft initial definition. ...
XRInputSourceArray.values() - Web APIs
h input and calls the function checkinput() with each returned value. for (const source of xrsession.inputsources.values()) { checkinput(source); } here, for...of is used to iterate over the array's contents. each pass through the loop, source is the next xrinputsource in the list. the loop exits once every input has been delivered to checkinput(). ...
XRInputSourceArray - Web APIs
t. in addition to these methods, you may use array notation to access items in the list by index for example, the snippet of code below calls a function handleinput(), passing into it the first item in the input source list, if the list isn't empty. let sources = xrsession.inputsources; if (sources.length > 0) { handleinput(sources[0]); } examples specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification. working draft initial definition. ...
XRInputSourceEvent() - Web APIs
o determine when the user clicks on (shoots at/pokes at/whatever) objects in the scene. xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification. working draft initial definition. ...
XRInputSourceEvent.frame - Web APIs
sed into a function called mycheckandhandlehit() to see if the ray was pointing at anything when the select was triggered. xrsession.onselectstart = event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { checkandhandlehit(targetraypose.transform); } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.frame' in that specification. working draft initial definition. ...
XRInputSourceEvent.inputSource - Web APIs
select event which looks specifically for events which happen on gaze input devices. the device type is identified by looking at the xrinputsource in inputsource and its targetraymode property. xrsession.onselect = event => { let source = event.inputsource; if (source.targetraymode == "gaze") { /* handle selection using a gaze input */ } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.inputsource' in that specification. working draft initial definition. ...
XRInputSourceEvent - Web APIs
o determine when the user clicks on (shoots at/pokes at/whatever) objects in the scene. xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification. working draft initial definition. ...
XRInputSourceEventInit.frame - Web APIs
o the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred. examples this example creates a new select event and sends it to the xrsession. let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.frame' in that specification. working draft initial definition. ...
XRInputSourceEventInit.inputSource - Web APIs
dicating the source of the newly-created xrinputsourceevent to be created. the new object's inputsource will be set to this value. examples this example creates a new select event and sends it to the xrsession. let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.inputsource' in that specification. working draft initial definition. ...
XRInputSourceEventInit - Web APIs
eventinit dictionary. it also offers the following: frame an xrframe object representing the event frame during which the event took place. this event is not associated with the animation process, and has no viewer information contained within it. inputsource an xrinputsource object representing the input device from which the event is being sent. specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit' in that specification. working draft initial definition. ...
XRInputSourcesChangeEvent() - Web APIs
working draft initial definition. ...
XRInputSourcesChangeEvent.added - Web APIs
ces whose targetraymode is tracked-pointer. xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.added' in that specification. working draft initial definition. ...
XRInputSourcesChangeEvent.removed - Web APIs
ces whose targetraymode is tracked-pointer. xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.removed' in that specification. working draft initial definition. ...
XRInputSourcesChangeEvent.session - Web APIs
the xrinputsourceschangeevent property session specifies the xrsession to which the input source list change event applies. syntax let inputssession = xrinputsourceschangeevent.session; value an xrsession indicating the webxr session to which the input source list change applies. specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.session' in that specification. working draft initial definition. ...
XRInputSourcesChangeEvent - Web APIs
working draft initial definition. ...
XRInputSourcesChangeEventInit.added - Web APIs
working draft initial definition. ...
XRInputSourcesChangeEventInit.removed - Web APIs
working draft initial definition. ...
XRInputSourcesChangeEventInit.session - Web APIs
working draft initial definition. ...
XRInputSourcesChangeEventInit - Web APIs
operties added read only an array of zero or more xrinputsource objects, each representing one input device which is newly available to use. removed read only an array of zero or more xrinputsource objects representing the input devices which are no longer available. session read only the xrsession to which the event applies. examples <tbd> specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit' in that specification. working draft initial definition. ...
XRPermissionDescriptor.mode - Web APIs
working draft initial definition. ...
XRPermissionDescriptor.optionalFeatures - Web APIs
working draft initial definition. ...
XRPermissionDescriptor.requiredFeatures - Web APIs
working draft initial definition. ...
XRPose.emulatedPosition - Web APIs
the model representing the user's body), then this value is true. this information is important because devices whose position is emulated are prone to their offset drifting relative to the real world space over time. this is because emulating a position based on accelerometer inputs and models tends to introduce minor errors which accumulate over time. specifications specification status comment webxr device apithe definition of 'xrpose.emulatedposition' in that specification. working draft initial definition. ...
XRPose.transform - Web APIs
Web › API › XRPose › transform
working draft initial definition. ...
XRPose - Web APIs
Web › API › XRPose
the head but also the forward, backward, and side-to-side motion of the viewer). if any component of the transform is computed or created artificially (such as by using mouse or keyboard controls to move through space), this value is instead true, indicating that the transform is in part emulated in software. example <<<--- todo: needs example --->>> specifications specification status comment webxr device apithe definition of 'xrpose' in that specification. working draft initial definition. ...
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
working draft initial definition. ...
XRReferenceSpace.onreset - Web APIs
tion and/or orientation of the origin be significantly altered to compensate. syntax xrreferencespace.onreset = eventhandler; eventhandler = xrreferencespace.onreset; value an event handler function which will be called whenever the reset event is received by the xrreferencespace. usage notes see the reset event documentation for further details. specifications specification status comment webxr device apithe definition of 'onreset' in that specification. working draft initial definition. ...
XRReferenceSpace: reset event - Web APIs
t, you can use either of two approaches. first, you can use the addeventlistener() method: viewerrefspace.addeventlistener("reset", (event) => { /* perform reset related tasks */ }); the second option is to set the xrreferencespace object's onreset event handler property: viewerrefspace.onreset = (event) => { /* perform reset related tasks */ }; specifications specification status comment webxr device apithe definition of 'reset event' in that specification. working draft initial definition. ...
XRReferenceSpace - Web APIs
working draft initial definition. ...
XRReferenceSpaceEvent() - Web APIs
properties of this object are: referencespace the xrreferencespace from which the event originated. transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system. return value a new xrreferencespaceevent object, initialized as defined by the input parameters. specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent()' in that specification. working draft initial definition. ...
XRReferenceSpaceEvent.referenceSpace - Web APIs
the read-only xrreferencespaceevent property referencespace specifies the reference space which is the originator of the event. syntax let refspace = xrreferencespaceevent.referencespace; value an xrreferencespace indicating the source of the event. examples specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.referencespace' in that specification. working draft initial definition. ...
XRReferenceSpaceEvent.transform - Web APIs
ene, updating each object's position by multiplying it with the event's given transform. the scene is represented by a scene object, with all the objects in an array called objects within it. xrreferencespace.addeventlistener("reset", event => { for (let obj of scene.objects) { mat4.multiply(obj.transform, obj.transform, event.transform); } }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.transform' in that specification. working draft initial definition. ...
XRReferenceSpaceEvent - Web APIs
e reset event is sent to a reference space when its native origin is changed due to a discontinuity, recalibration, or device reset. this is an opportunity for your app to update any stored transforms, position/orientation information, or the like—or to dump any cached values based on the reference's space's origin so you can recompute them as needed. specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent' in that specification. working draft initial definition. ...
XRReferenceSpaceEventInit.referenceSpace - Web APIs
espace: xrreferencespace, transform: xrrigidtransform }); value an xrreferencespace indicating the source of the event. examples this simple snippet calls the constructor to create a new reference space event of type reset. let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.referencespace' in that specification. working draft initial definition. ...
XRReferenceSpaceEventInit.transform - Web APIs
transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system. examples this simple snippet calls the constructor to create a new reference space event of type reset. let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.transform' in that specification. working draft initial definition. ...
XRReferenceSpaceEventInit - Web APIs
l of this dictionary's properties must have valid values set on them before calling the xrreferencespaceevent() constructor. examples this simple snippet calls the constructor to create a new reference space event of type reset. let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit' in that specification. working draft initial definition. ...
XRReferenceSpaceType - Web APIs
and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions. it's particularly useful when determining the distance between the viewer and an input, or when working with offset spaces. otherwise, typically, one of the other reference space types will be used more often. xrreferencespace specifications specification status comment webxr device apithe definition of 'xrreferencespacetype' in that specification. working draft initial definition. ...
XRRenderState.inlineVerticalFieldOfView - Web APIs
unknown initial definition. ...
XRRenderState.baseLayer - Web APIs
working draft initial definition. ...
XRRenderState.depthFar - Web APIs
unknown initial definition. ...
XRRenderState.depthNear - Web APIs
unknown initial definition. ...
XRRenderState.inlineVerticalFieldOfView - Web APIs
calfieldofview property of the xrrenderstate interface returns the default vertical field of view for "inline" sessions and null for all immersive sessions. syntax var inlineverticalfieldofview = xrrenderstate.inlineverticalfieldofview; value a number for "inline" sessions, which represents the default field of view, and null for immersive sessions. specifications specification status comment webxr device apithe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification. working draft initial definition. ...
XRRenderState - Web APIs
viewer. the near clip plane is the plane, parallel to the display, at which rendering of the scene begins. any closer to the viewer than this, and no portions of the scene are drawn. inlineverticalfieldofview read only the default vertical field of view, defined in radians, to use when the session is in inline mode. null for all immersive sessions. specifications specification status comment webxr device apithe definition of 'xrrenderstate' in that specification. working draft initial definition. ...
XRRenderStateInit - Web APIs
anvas's aspect ratio. this property must not be specified for immersive sessions, so the value is null by default for immersive sessions. the default value is otherwise π * 0.5 (half of the value of pi). usage notes any properties not specified in the xrrenderstateinit compliant object passed into updaterenderstate() are left at their current values. specifications specification status comment webxr device apithe definition of 'xrrenderstateinit' in that specification. working draft initial definition. ...
XRRigidTransform() - Web APIs
lace in space as the coordinates given by viewerposition, with the orientation also revised in the same fashion. then requestanimationframe() is called to ask for a new animation frame to draw into. the drawframe() callback will be executed when the system is ready to draw the next frame. you can find more examples in movement, orientation, and motion. specifications specification status comment webxr device apithe definition of 'xrrigidtransform()' in that specification. working draft initial definition. ...
XRRigidTransform.inverse - Web APIs
working draft initial definition. ...
XRRigidTransform.matrix - Web APIs
working draft initial definition. ...
XRRigidTransform.orientation - Web APIs
working draft initial definition. ...
XRRigidTransform.position - Web APIs
ure use. however, for inline sesions, we know we're in a space not automatically adjusted for floor level, so we request an offset reference space to shift the viewer's height to 1.5 meters above the presumed floor level of 0 meters. that new reference space is used instead of the one initially received. finally, an animation frame request is submitted. specifications specification status comment webxr device apithe definition of 'xrrigidtransform.position' in that specification. working draft initial definition. ...
XRRigidTransform - Web APIs
alling 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. working draft initial definition. ...
XRSession.cancelAnimationFrame() - Web APIs
working draft initial definition. ...
XRSession.end() - Web APIs
Web › API › XRSession › end
xrsession.end(); parameters none. return value a promise that resolves without a value after any platform-specific steps related to shutting down the session have completed. you can use the promise to do things like update ui elements to reflect the shut down connection, trigger application shut down, or whatever else you might need to do. example specifications specification status comment webxr device apithe definition of 'xrsession.end' in that specification. working draft initial definition. ...
XRSession: end event - Web APIs
working draft initial definition. ...
XRSession.environmentBlendMode - Web APIs
olled. in this mode, the xrsession's renderstate.baselayer property provides relative weights of the artificial layer during the compositing process. pixels whose alpha value is 1.0 are rendered fully opaque, totally obscuring the real world, while pixels with an alpha of 1.0 are totally transparent, leaving the surrounding environment to pass through. specifications specification status comment webxr augmented reality modulethe definition of 'xrsession.environmentblendmode' in that specification. working draft initial definition. ...
XRSession.inputSources - Web APIs
the list's contents update to reflect the changes. usage notes you can add a handler for the xrsession event inputsourceschange to be advised when the contents of the session's connected devices list changes. you can then either get the value of inputsources to examine the list, or you can refer to a reference to the list that you've previously saved. specifications specification status comment webxr device apithe definition of 'xrsession.inputsources' in that specification. working draft initial definition. ...
XRSession: inputsourceschange event - Web APIs
contains a list of any newly added and/or removed input devices. bubbles yes cancelable no interface xrinputsourceschangeevent event handler property oninputsourceschange the event object contains lists of the newly-added and/or removed input devices in its added and removed properties. examples specifications specification status comment webxr device apithe definition of 'inputsourceschange event' in that specification. working draft initial definition. ...
XRSession.onend - Web APIs
Web › API › XRSession › onend
working draft initial definition. ...
XRSession.oninputsourceschange - Web APIs
ithin them are updated in-place. therefore if you wish to compare input states between frames, you should make a copy of the content of the state in question. syntax xrsession.oninputsourceschange = function(event) { ... } example xrsession.oninputsourceschange = function(event) { console.log("the list of active xr input sources has changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.oninputsourceschange' in that specification. working draft initial definition. ...
XRSession.onselect - Web APIs
main hand. xrsession.onselect = event => { let source = event.inputsource; if (source.handedness == user.handedness) { if (source.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose); } } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onselect' in that specification. working draft initial definition. ...
XRSession.onselectend - Web APIs
king a command, or makes a hand gesture. for example, this might include releasing a button or joystick. note: not to be confused with xrsession.onselectstart and xrsession.onselect. syntax xrsession.onselectend = function(event) { ... } example xrsession.onselectend = function(event) { console.log("the user has completed a primary action.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectend' in that specification. working draft initial definition. ...
XRSession.onselectstart - Web APIs
for example, this might include pressing a button or moving a joystick. note: not to be confused with xrsession.onselect and xrsession.onselectend. syntax xrsession.onselectstart = function(event) { ... } example xrsession.onselectstart = function(event) { console.log("the user has started a primary action, but might not have completed it.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectstart' in that specification. working draft initial definition. ...
XRSession.onsqueeze - Web APIs
working draft initial definition. ...
XRSession.onsqueezeend - Web APIs
} } }; this code presumes that if the user actually intentionally completed the drag, user.heldobject will be null here. that's because (in this example, at least) the handler for the squeeze event has already dropped the object into its new location and then cleared the value of heldobject to indicate that the user is no longer holding anything. specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezeend' in that specification. working draft initial definition. ...
XRSession.onsqueezestart - Web APIs
in the user object we're using to represent user information. xrsession.onsqueezestart = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (targetraypose) { user.heldobject = findobjectusingray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezestart' in that specification. working draft initial definition. ...
XRSession.onvisibilitychange - Web APIs
xr session affects the frame loop so callbacks registered via xrsession.requestanimationframe() might not be called. consult xrsession.visibilitystate article for details. syntax xrsession.onvisibilitychange = function(event) { ... } example xrsession.onvisibilitychange = function(event) { console.log("the visibility the xr session changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.onvisibilitychange' in that specification. working draft initial definition. ...
XRSession.renderState - Web APIs
al field of view to use when rendering the in the inline session mode, and the xrwebgllayer to render into for inline composition. while this property is read only, you can call the xrsession method updaterenderstate() to make changes. syntax var xrrenderstate = xrsession.renderstate; value an xrrenderstate object describing how to render the scene. specifications specification status comment webxr device apithe definition of 'xrsession.renderstate' in that specification. working draft initial definition. ...
XRSession.requestAnimationFrame() - Web APIs
working draft initial definition. ...
XRSession.requestReferenceSpace() - Web APIs
ill be used more often. xrreferencespace return value a promise that resolves with an xrreferencespace object. exceptions rather than throwing true exceptions, requestreferencespace() rejects the returned promise with a domexception whose name is found in the list below: notsupportederror the requested reference space is not supported. specifications specification status comment webxr device apithe definition of 'requestreferencespace()' in that specification. working draft initial definition. ...
XRSession: select event - Web APIs
working draft initial definition. ...
XRSession: selectend event - Web APIs
working draft initial definition. ...
XRSession: selectstart event - Web APIs
working draft initial definition. ...
XRSession: squeeze event - Web APIs
working draft initial definition. ...
XRSession: squeezeend event - Web APIs
working draft initial definition. ...
XRSession: squeezestart event - Web APIs
working draft initial definition. ...
XRSession.updateRenderState() - Web APIs
ate an xrwebgllayer. updaterenderstate() is then called to associate the new xrwebgllayer. function onxrsessionstarted(xrsession) { let glcanvas = document.createelement("canvas"); let gl = glcanvas.getcontext("webgl", { xrcompatible: true }); loadwebglresources(); xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); } specifications specification status comment webxr device apithe definition of 'xrsession.updaterenderstate()' in that specification. working draft initial definition. ...
XRSession.visibilityState - Web APIs
of a session's visibilitystate may not necessarily be the same as the owning document's visibilitystate. for instance, if the viewer is using a headset tethered to a computer and the immersive scene is obscured by a configuration ui, the user could peek out from behind the headset and still be able to see the document itself on their computer's monitor. specifications specification status comment webxr device apithe definition of 'xrsession.visibilitystate' in that specification. working draft initial definition. ...
XRSession: visibilitychange event - Web APIs
ved and dispatched to a function mysessionvisible(), with a boolean parameter indicating whether or not the session is presently being displayed to the user. you can also create the event handler by assigning it to the xrsession's onvisibilitychange event handler property, like this: xrsession.onvisibilitychange = (e) => { /* event handled here */ }; specifications specification status comment webxr device apithe definition of 'visibilitychange event' in that specification. working draft initial definition. ...
XRSession - Web APIs
Web › API › XRSession
working draft initial definition. ...
XRSessionEvent() - Web APIs
this function might, for instance, spin up or reconfigure a worker that handles rendering the scene. xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent() constructor' in that specification. working draft initial definition. ...
XRSessionEvent.session - Web APIs
an event is received. xrsession.addeventlistener("visibilitychange", e => { switch(e.session.visibilitystate) { case "hidden": myenablerendering(true); break; case "visible": case "visible-blurred": myenablerendering(false); break; } }); this calls a function that reacts to the session's visibility state change. specifications specification status comment webxr device apithe definition of 'xrsessionevent.session' in that specification. working draft initial definition. ...
XRSessionEvent - Web APIs
this function might, for instance, spin up or reconfigure a worker that handles rendering the scene. xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent' in that specification. working draft initial definition. ...
XRSessionEventInit.session - Web APIs
ifies the xrsession for which the event describes a state change. syntax let sessioneventinit = { session: xrsession }; mysessionevent = new xrsessionevent(type, sessioneventinit); mysessionevent = new xrsessionevent(type, { session: xrsession }); value an xrsession object indicating which webxr session the event is referring to. specifications specification status comment webxr device apithe definition of 'xrsessioneventinit.session' in that specification. working draft initial definition. ...
XRSessionEventInit - Web APIs
the xrsessioneventinit dictionary is used when calling the xrsessionevent() constructor to provide the new event's initial values. you're unlikely to need to create these events yourself, however, as they're created by the xr system. properties session the xrsession to which the event is to be delivered. examples <tbd> specifications specification status comment webxr device apithe definition of 'xrsessioneventinit' in that specification. working draft initial definition. ...
XRSessionMode - Web APIs
ype is supported and available to be used, and by requestsession() to attempt to open a new webxr session. the immersive-ar mode supports all the same features and reference spaces that immersive-vr does, since both are immersive sessions. browsers may support either or both of these modes, but if webxr is available, the inline mode is always supported. specifications specification status comment webxr device apithe definition of 'xrsessionmode' in that specification. working draft initial definition. webxr augmented reality modulethe definition of 'xrsessionmode: immersive-ar' in that specification. editor's draft the immersive-ar value added ...
XRSpace - Web APIs
Web › API › XRSpace
n reconfiguration of the user's headset or other motion-sensitive device. properties the xrspace interface defines no properties of its own; however, it does inherit the properties of its parent interface, eventtarget. methods the xrspace interface provides no methods of its own. however, it inherits the methods of eventtarget, its parent interface. specifications specification status comment webxr device apithe definition of 'xrspace' in that specification. working draft initial definition. ...
XRSystem: devicechange event - Web APIs
ut if there's a device available that can handle immersive vr presentations. if there is, the button to enter xr mode is enabled; otherwise it's disabled. you can also use the ondevicechange event handler property to set a single handler for devicechange events: if (navigator.xr) { navigator.xr.ondevicechange = event => { /* ... etc ... */ }; } specifications specification status comment webxr device apithe definition of 'devicechange event' in that specification. working draft initial definition. ...
XRSystem: isSessionSupported() - Web APIs
working draft initial definition. ...
XRSystem: ondevicechange - Web APIs
ge event whenever availability of an immersive device changes. the event that is fired is a "simple event" that implements the event interface. syntax navigator.xr.ondevicechange = function(event) { ... }; value undefined example navigator.xr.ondevicechange = function(ev) { console.log("the availability of immersive xr devices has changed.") }; specifications specification status comment webxr device apithe definition of 'ondevicechange ' in that specification. working draft initial definition. ...
XRSystem: requestSession() - Web APIs
working draft initial definition. ...
XRSystem - Web APIs
Web › API › XRSystem
set up our session for rendering and so forth. if, on the other hand, there is already an ongoing xr session, we instead call end() to end the current session. when the returned promise resolves, we set xrsession to null to record the fact that we no longer have an ongoing session. that way, if the user clicks the button again, a new session will start. specifications specification status comment webxr device apithe definition of 'xr' in that specification. working draft initial definition. ...
XRTargetRayMode - Web APIs
working draft initial definition. ...
XRView.eye - Web APIs
Web › API › XRView › eye
bit of healing to occur, track the progress of a poison effect, or the like, as appropriate for the game's needs. updateinjury() returns true if the eye is still injured or false if the eye has been restored to health by the function,. if the result is false, indicating that the eye is now healthy, we render the scene for that eye. otherwise, we don't. specifications specification status comment webxr device apithe definition of 'xrview.eye' in that specification. working draft initial definition. ...
XRView.projectionMatrix - Web APIs
ss. syntax let projectionmatrix = xrview.projectionmatrix; value a float32array object representing the projection matrix for the view. the projection matrix for each eye's view is used to ensure that the correct area of the scene is presented to each eye in order to create a believable 3d scene without introducing discomfort for the user. examples specifications specification status comment webxr device apithe definition of 'xrview.projectionmatrix' in that specification. working draft initial definition. ...
XRView.transform - Web APIs
Web › API › XRView › transform
ng the object. we then compute the normals for the model view matrix by inverting it, then transposing it. finally, we call the object's render() routine, passing along the modelviewmatrix and normalmatrix so the renderer can place and light the object properly. note: this example is derived from a larger example... <<<--- finish and add link --->>> specifications specification status comment webxr device apithe definition of 'xrview.transform' in that specification. working draft initial definition. ...
XRView - Web APIs
Web › API › XRView
s returnedto the caller. to use this function, we simply pass the returned reference space into xrframe.getpose() or getviewerpose(), as appropriate for yoru needs. the xrpose returned will then be used to actuall render the scene for the current frame. you can find a more extensive and complete example in our article movement, orientation, and motion. specifications specification status comment webxr device apithe definition of 'xrview' in that specification. working draft initial definition. ...
XRViewerPose.views - Web APIs
working draft initial definition. ...
XRViewerPose - Web APIs
working draft initial definition. ...
XRViewport.height - Web APIs
Web › API › XRViewport › height
t, in pixels, of the viewport onto the drawing surface within which the webxr view is to be rendered. along with width and the origin point given by x and y, this defines the area within which rendered content will be drawn. syntax height = xrviewport.height; value the viewport's height in pixels. examples see the main xrviewport page for examples. specifications specification status comment webxr device apithe definition of 'xrviewport.height' in that specification. working draft initial definition. ...
XRViewport.width - Web APIs
Web › API › XRViewport › width
specifies the width of the viewport, in pixels, onto the drawing surface the 3d scene is to be rendered into. this is defined using this property along with the viewport's height and its origin given by its properties x and y. syntax width = xrviewport.width; value the viewport's width in pixels. examples see the main xrviewport page for examples. specifications specification status comment webxr device apithe definition of 'xrviewport.width' in that specification. working draft initial definition. ...
XRViewport.x - Web APIs
Web › API › XRViewport › x
ce into which webxr content is to be rendered. the viewport's y property identifies the y component of the origin, and its is given by the width and height properties. syntax x = xrviewport.x; value the offset from the left edge of the rendering surface to the left edge of the viewport, in pixels. examples see the main xrviewport page for examples. specifications specification status comment webxr device apithe definition of 'xrviewport.x' in that specification. working draft initial definition. ...
XRViewport.y - Web APIs
Web › API › XRViewport › y
the offset from the bottom edge of the rendering surface to the bottom edge of the viewport, in pixels. note: although other web apis typically consider the y axis to begin at the top and grow larger progressing downward, webgl reverses this, with y growing larger as it goes upward on the screen. examples see the main xrviewport page for examples. specifications specification status comment webxr device apithe definition of 'xrviewport.y' in that specification. working draft initial definition. ...
XRViewport - Web APIs
working draft initial definition. ...
XRVisibilityState - Web APIs
n may currently be visible to the user, it is not the user's primary focus at the moment; it's also possible the session is not currently visible at all. in order to optimize resource utilization, the user agent may be handling the session's requestanimationframe() callbacks at a throttled rate. input controllers are not being processed for the session. specifications specification status comment webxr device apithe definition of 'xrvisibilitystate' in that specification. working draft initial definition. ...
XRWebGLLayer() - Web APIs
e xrsession specified by session has already been stopped. the specified webgl context, context, has been lost for any reason, such as a gpu switch or reset. the specified session is immersive but the context is not webxr compatible. operationerror the resources (including memory buffers) needed for the layer to operate could not be allocated. specifications specification status comment webxr device apithe definition of 'xrwebgllayer()' in that specification. working draft initial definition. ...
XRWebGLLayer.antialias - Web APIs
working draft initial definition. ...
XRWebGLLayer.framebufferHeight - Web APIs
pth, color, and/or stencil buffers, for example) are all this many pixels tall. examples this snippet simply fetches the framebuffer's width and height for later use. let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferheight; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferheight' in that specification. working draft initial definition. ...
XRWebGLLayer.framebufferWidth - Web APIs
epth, color, and/or stencil buffers, for example) are all this many pixels wide. examples this snippet simply fetches the framebuffer's width and height for later use. let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferwidth; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferwidth' in that specification. working draft initial definition. ...
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
working draft initial definition. ...
XRWebGLLayer.getViewport() - Web APIs
working draft initial definition. ...
XRWebGLLayer.ignoreDepthValues - Web APIs
working draft initial definition. ...
XRWebGLLayer - Web APIs
working draft initial definition. ...
XRWebGLLayerInit.alpha - Web APIs
lue 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. example in this example, a new xrwebgllayer is created for a webxr session, xrsession, without an alpha channel. xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.alpha' in that specification. working draft initial definition. ...
XRWebGLLayerInit.antialias - Web APIs
working draft initial definition. ...
XRWebGLLayerInit.depth - Web APIs
, then the depth buffer is either not present or is being ignored. if (gllayer.ignoredepthvalues) { /* not using the depth buffer */ } example in this example, a new xrwebgllayer is created for a webxr session, xrsession, without a depth buffer. xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { depth: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.depth' in that specification. working draft initial definition. ...
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
n of the frame buffer for the xrwebgllayer. example in this example, a new xrwebgllayer is created for a webxr session, xrsession, with a frame buffer whose resolution is half that of the default display resolution of the xr device. xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { framebufferscalefactor: 0.5 }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.framebufferscalefactor' in that specification. working draft initial definition. ...
XRWebGLLayerInit.ignoreDepthValues - Web APIs
le 3d effects. the default is false (depth values are used by default). example in this example, a new xrwebgllayer is created for a webxr session, xrsession. it's configured to ignore depth values or an alpha channel. xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false, ignoredepthvalues: true }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.ignoredepthvalues' in that specification. working draft initial definition. ...
XRWebGLLayerInit.stencil - Web APIs
boolean which can be set to false to specify that the new webgl layer should not include a stencil buffer. the default value is true. example in this example, a new xrwebgllayer is created for a webxr session, xrsession, without a stencil buffer. xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { stencil: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.stencil' in that specification. working draft initial definition. ...
XRWebGLLayerInit - Web APIs
working draft initial definition. ...
Using ARIA: Roles, states, and properties - Accessibility
nt structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selecte...
ARIA: tabpanel role - Accessibility
with using this property, and how to work around them. remove this section if there are none to list. best practices optionally, here list any best practices that exist for this role. remove the section if none exist. added benefits any additional benefits this feature has for non-typical screen reader users, like google or mobile speech recognition. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tabpanel' in that specification. recommendation wai-aria authoring practicesthe definition of 'tabpanel' in that specification. working draft precedence order what are the related properties, and in what order will this attribute or property be read (which property will take precendence over thi...
ARIA: timer role - Accessibility
s it's dependent on the exact timing of these two updates. aria-atomic="true" ensures that each time the live region is updated, the entirety of the content is announced in full (e.g. "time: 17:34"). <div id="clock" role="timer" aria-live="polite" aria-atomic="true"></div> accessibility concerns improperly using the timer role can unintentionally xxx specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'timer' in that specification. recommendation precedence order applying the timer role will cause this and all of the descendant elements of this element to be treated like xxx ...
ARIA: alert role - Accessibility
lertel.addattribute("role", "alert"); } accessibility concerns the alert role should read out content that has changed, or bring the user's attention to it immediately, so it should not be used for static content or used regularly. alerts, by definition, are disruptive. lots of alerts at once or unnecessary alerts willl create a bad user experience. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'alert' in that specification. recommendation wai-aria authoring practicesthe definition of 'alert' in that specification. working draft ...
ARIA: article role - Accessibility
le to the appropriate values, bearing in mind that aria-posinset is 1-based. always use native element if available. instead of a div with the article role, the <article> element should be used. examples the restaurant recommendations feed display along with its separate documentation from the wai-aria 1.1 authoring practices feed design pattern specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'article' in that specification. recommendation wai-aria authoring practicesthe definition of 'feed' in that specification. working draft precedence order this role corresponds to the <article> element in html, and that element should be used instead, if possible. this role does not require any s...
ARIA: banner role - Accessibility
tices while it is best to use the header element and ensure it is not a descendant of any subsection of the page, sometimes you don't have access to the underlying html. if this is the case, you can add the role of banner to the main header of the page with javascript. identifying the page's banner in this way will help improve the site's accessibility. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria: banner role' in that specification. recommendation wai-aria authoring practicesthe definition of 'banner landmark role' in that specification. working draft screen reader support tbd ...
ARIA: cell role - Accessibility
d role="cell" aria-rowindex="24">term</td> <td role="cell" aria-rowindex="24">dt</td> </tr> </tbody> </table> above is the semantic way of writing a table. the aria roles are not necessary if the native semantics of the table, and therefore the table rows, have not been altered, such as through the display property. added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria cell role' in that specification. recommendation wai-aria authoring practicesthe definition of 'aria cell role' in that specification. working draft ...
ARIA: Complementary role - Accessibility
ry" with an of aria-label="sidebar" may be announced redundantly as, "complementary sidebar". added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria: complementary role' in that specification. recommendation wai-aria authoring practicesthe definition of 'complementary landmark role' in that specification. working draft screen reader support tbd ...
ARIA: contentinfo role - Accessibility
element nested within an article, aside, main, nav, or section is not considered contentinfo. added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'contentinfo landmark role' in that specification. recommendation wai-aria authoring practicesthe definition of 'contentinfo landmark role' in that specification. working draft screen reader support ...
ARIA: document role - Accessibility
ke sure an item with the document role is focusable, by setting the tabindex attribute with a value of 0. that will also include it in the tab order. added benefits the document role is an easy way to indirectly control assistive technology behavior by unambiguously stating that this is content the user should read with standard screen reader commands. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'document' in that specification. recommendation screen reader support ...
ARIA: feed role - Accessibility
nding on which value is more helpful to users. if the total number in the feed is not known, set aria-setsize="-1". required javascript features none, except as required by any attributes. for example, setting aria-busy to true during the update operation if needed, and then to false upon completion. examples example implementation of feed pattern specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'feed' in that specification. recommendation screen reader support coming soon ...
ARIA: figure role - Accessibility
recommendation screen reader support tbd ...
ARIA: form role - Accessibility
unicate a section has a role of form. if at all possible, prefer using it instead. added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria form role' in that specification. recommendation wai-aria authoring practicesthe definition of 'role form' in that specification. working draft screen reader support tbd ...
ARIA: grid role - Accessibility
event.preventdefault(); }); more examples data grid examples layout grids examples w3c/wai tutorial: tables accessibility concerns even if the keyboard use is properly implemented, some users might not be aware that they have to use the arrow keys. make sure that the functionality and interaction needed can be best achieved using the grid role. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'role grid' in that specification. recommendation wai-aria authoring practicesthe definition of 'role grid' in that specification. working draft screen reader support tbd ...
ARIA: List role - Accessibility
ave the parent list element. so, the li elements are not exposed to assistive technologies, but elements contained inside of those li elements, including nested lists, are visible to assistive technologies. note: if you are marking up a list of items that will function as a tabbed interface, you should instead use the tab, tabpanel, and tablist roles. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'list' in that specification. recommendation screen reader support tbd ...
ARIA: Listitem role - Accessibility
recommendation screen reader support tbd ...
ARIA: Main role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification. working draft screen reader support tbd ...
ARIA: Navigation Role - Accessibility
-label="primary navigation" may be announced redundantly as, "primary navigation navigation". added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria navigtion role' in that specification. recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification. working draft screen reader support tbd ...
ARIA: Region role - Accessibility
reas of svg along with an aria-label to allow individual sections of the svg to be described. added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria region role' in that specification. recommendation wai-aria authoring practicesthe definition of 'region landmark role' in that specification. working draft screen reader support tbd ...
ARIA: img role - Accessibility
recommendation screen reader support tbd ...
ARIA: rowgroup role - Accessibility
recommendation ...
ARIA: search role - Accessibility
an of aria-label="sitewide search" may be announced redundantly as, "sitewide search search". added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen reader users to also quickly identify and navigate to large sections of the document. landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria search role' in that specification. recommendation wai-aria authoring practicesthe definition of 'aria search role' in that specification. working draft screen reader support tbd ...
ARIA: switch role - Accessibility
aria in html working draft describes how aria's features integrate into html. ...
ARIA: tab role - Accessibility
ractices it is recommended to use a button element with the role tab for their built-in functional and accessible features instead, as opposed to needing to add them yourself. for controlling tab key functionality for elements with the role tab, it is recommended to set all non-active elements to tabindex=-1, and to set the active element to tabindex=0. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tab' in that specification. recommendation wai-aria authoring practicesthe definition of 'tabs' in that specification. working draft precedence order what are the related properties, and in what order will this attribute or property be read (which property will take precendence over this one, an...
ARIA: table role - Accessibility
an add these aria roles to ensure accessibility should the native semantics of the table be removed, such as with css. a relevant use case for the aria table role is when css's display property overrides the native semantics of a table, such as by display: grid. in this case, you can use the aria table roles to re-add the semantics. added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria table role' in that specification. recommendation wai-aria authoring practicesthe definition of 'aria table role' in that specification. working draft ...
ARIA: button role - Accessibility
is recommended to use native html buttons (<button>, <input type="button">, <input type="submit">, <input type="reset"> and <input type="image">) rather than the button role, as native html buttons are supported by all user agents and assistive technology and provide keyboard and focus requirements by default, without need for additional customization. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'button' in that specification. recommendation wai-aria authoring practicesthe definition of 'button' in that specification. working draft notes aria attributes used button aria-pressed aria-expanded aria-haspopup additional resources strong native semantics in html5 notes on using a...
ARIA: checkbox role - Accessibility
html <span role="checkbox" id="chkpref" aria-checked="false" onclick="changecheckbox()" onkeypress="changecheckbox()" tabindex="0" aria-labelledby="chk1-label"></span> <label id="chk1-label" onclick="changecheckbox()" onkeypress="changecheckbox()">remember my preferences</label> css [role="checkbox"] { padding:5px; } [aria-checked="true"]::before { content: "[x]"; ...
ARIA: dialog role - Accessibility
recommendation screen reader support coming soon ...
ARIA: heading role - Accessibility
er/screen reader combinations. best practices the best way to use this role is to not use it at all, and instead use the native heading tags <h1> through <h6> as shown in the example above. the heading role and aria-level attribute should only be used to retrofit accessibility on legacy code that you cannot make major changes to. added benefits none. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'heading' in that specification. recommendation precedence order the heading role overrides the native semantic meaning of the element it is being used for. the aria-level attribute, in addition, determines what level of heading is being exposed. screen reader support tbd ...
ARIA: listbox role - Accessibility
ith a lighter background colour. if the listbox is not part of another widget, it should have the aria-labelledby property set. if one or more entries are not dom children of listbox, additional aria-* properties will need to be set (see aria best practices). if there is a valid reason to expand the listbox, the combobox role may be more appropriate. specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria listbox role' in that specification. recommendation wai-aria authoring practicesthe definition of 'listbox role' in that specification. working draft screen reader support tbd ...
WAI-ARIA Roles - Accessibility
ectory feed gridcell (eric e) group input landmark link - old page listbox log - old page marquee math menu menubar menuitem menuitemcheckbox menuitemradio none note option presentation progressbar - old page radio - old page radiogroup range region roletype rowheader(estelle) scrollbar searchbox section sectionhead select separator slider - old page spinbutton status - old page structure tab tablist (michiel) tabpanel (michiel) term timer toolbar tooltip tree treegrid treeitem widget window ...
An overview of accessible web applications and widgets - Accessibility
l> <input type="text" id="first" name="first" size="20" aria-labelledby="tp1-label" aria-describedby="tp1" aria-required="false" /> <div id="tp1" class="tooltip" role="tooltip" aria-hidden="true">your first name is optional</div> </div> the css for this markup is shown in example 2b. note that there is no custom classname used, only the status of the aria-hidden attribute on line 1. example 2b. attribute-based selector for indicating state div.tooltip[aria-hidden="true"] { display: none; } the javascript to update the aria-hidden property has the form shown in example 2c. note that the script only updates the aria-hidden attribute (line 2); it does not need to also add or remove a custom classname. example 2c. javascript to upda...
Accessibility documentation index - Accessibility
using the radio role needscontent this technique demonstrates how to use the radio role and describes the effect it has on browsers and assistive technology. 37 using the slider role aria, accessibility, needscontent this technique demonstrates how to use the slider role and describes the effect it has on browsers and assistive technology. 38 using the status role aria, accessibility, needscontent this technique demonstrates how to use the status role and describes the effect it has on browsers and assistive technology. 39 using the toolbar role needscontent this technique demonstrates how to use the toolbar role and describes the effect it has on browsers and assistive technology. 40 x-ms-aria-flowfrom ar...
Accessibility Information for Web Authors - Accessibility
nd firefox 3.x. it not only checks and reports possible markup errors and warnings (based on w3c tidy and/or based on true sgml validation) but it can also report accessibility errors and warnings according to selectable accessibility guidelines (section 508, wcag priorities 1, 2 or 3). its accessibility report is viewable in the view source window (view > source code ctrl+u or right-click on the status bar). two panes are added at the bottom of the view source code window: the left pane contains the errors and warnings (with their correspondent line number) and the right pane identifies the checkpoint along with an example and a clickable link to the reference/guideline. just wonderful! the html advanced validator may also be downloaded from firefox add-ons: html validator. color contrast...
Keyboard-navigable JavaScript widgets - Accessibility
nfocus to track the current focus don't assume that all focus changes will come via key and mouse events: assistive technologies such as screen readers can set the focus to any focusable element. track focus using onfocus and onblur instead. onfocus and onblur can now be used with every element. there is no standard dom interface to get the current document focus. if you want to track the focus status, you can use the document.activeelement to get the active element. you can also use document.hasfocus to make sure if the current document focus. technique 2: aria-activedescendant this technique involves binding a single event handler to the container widget and using the aria-activedescendant to track a "virtual" focus. (for more information about aria, see this overview of accessible web ap...
Robust - Accessibility
this criterion should be passed automatically. when scripting custom components, you will need to use wai-aria roles and other features to make sure your controls will be interpreted and are able to be used as intended, e.g. not only by sighted mouse users, but also by screenreader users, keyboard-only users, etc. see html: a good basis for accessibility and wai-aria basics. 4.1.3 status messages (aa) added in 2.1 assistive technology users are made aware of new status messages added to the page. understanding status messages note: also see the wcag description for guideline 4.1: compatible: maximize compatibility with current and future user agents, including assistive technologies. see also wcag perceivable operable understandable ...
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
Web › CSS › --*
candidate recommendation initial definition. ...
-webkit-line-clamp - CSS: Cascading Style Sheets
<p> in this example the <code>-webkit-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines. an ellipsis will be shown at the point where the text is clamped. </p> css p { width: 300px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; } result specifications specification status comment css overflow module level 3the definition of '-webkit-line-clamp' in that specification. working draft initial definition ...
-webkit-text-fill-color - CSS: Cascading Style Sheets
living standard initial standardization safari css reference '-webkit-text-fill-color' in that document. non-standard unofficial documentation initial definition ...
-webkit-text-stroke-color - CSS: Cascading Style Sheets
living standard initial standardization safari css reference '-webkit-text-stroke-color' in that document. non-standard unofficial documentation initial documentation ...
-webkit-text-stroke-width - CSS: Cascading Style Sheets
living standard initial standardization safari css reference '-webkit-text-stroke-width' in that document. non-standard unofficial documentation initial documentation ...
-webkit-text-stroke - CSS: Cascading Style Sheets
living standard initial standardization safari css reference '-webkit-text-stroke' in that document. non-standard unofficial documentation initial definition ...
:-moz-ui-invalid - CSS: Cascading Style Sheets
mit an unchanged valid value. by default, gecko applies a style that creates a red "glow" (using the box-shadow property) around items, which have this pseudo-class applied. see the :invalid pseudo-class for an example that shows how to override the default style. the specification for :user-invalid is still in progress. syntax syntax not found in db! specifications specification status comment selectors level 4the definition of ':user-invalid' in that specification. working draft :user-invalid ...
::after (:after) - CSS: Cascading Style Sheets
Web › CSS › ::after
working draft no significant changes to the previous specification. css animationsthe definition of 'animations on pseudo-element properties' in that specification. working draft allows animations on properties defined on pseudo-elements. selectors level 3the definit...
::backdrop - CSS: Cascading Style Sheets
s to in most browsers. video::backdrop { background-color: #448; } the resulting screen looks like this: note the dark grey-blue letterbox effect above and below where the backdrop is visible. normally that area is black, but its appearance has been altered by the css above. you can see this example in action or view or remix the code on glitch. specifications specification status comment fullscreen apithe definition of '::backdrop' in that specification. living standard initial definition. ...
::before (:before) - CSS: Cascading Style Sheets
Web › CSS › ::before
working draft no significant changes to the previous specification. css animations working draft allows animations on properties defined on pseudo-elements. selectors level 3the definition of '::before' in that specification. recommendation introduces the two-...
::cue-region - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
::cue - CSS: Cascading Style Sheets
Web › CSS › ::cue
candidate recommendation initial definition. ...
::first-letter (:first-letter) - CSS: Cascading Style Sheets
working draft generalizes allowed properties to typesetting, text decoration, inline layout properties, opacity, and box-shadow. css text decoration module level 3the definition of 'text-shadow with ::first-letter' in that specification. candidate recommendation allows...
::first-line (:first-line) - CSS: Cascading Style Sheets
working draft defines more strictly where ::first-letter can occur. generalizes allowed properties to typesetting, text decoration, and inline layout properties and opacity. defines the inheritance of ::first-letter. css text decoration module level 3the definition of ...
::grammar-error - CSS: Cascading Style Sheets
working draft initial definition. ...
::marker - CSS: Cascading Style Sheets
Web › CSS › ::marker
unicode-bidi and direction properties the content property all animation and transition properties the specification states that additional css properties may be supported in future. syntax ::marker examples html <ul> <li>peaches</li> <li>apples</li> <li>plums</li> </ul> css ul li::marker { color: red; font-size: 1.5em; } result specifications specification status comment css pseudo-elements level 4the definition of '::marker' in that specification. working draft no significant change. css lists module level 3the definition of '::marker' in that specification. working draft initial definition. ...
::part() - CSS: Cascading Style Sheets
Web › CSS › ::part
working draft initial definition. ...
::placeholder - CSS: Cascading Style Sheets
working draft initial definition. ...
::selection - CSS: Cascading Style Sheets
sibility guidelines (wcag), text content must have a contrast ratio of 4.5:1, or 3:1 for larger text such as headings. (wcag defines large text as between 18.66px and 24px and bold, or 24px or larger.) webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 specifications specification status comment css pseudo-elements level 4the definition of '::selection' in that specification. working draft initial definition. note: ::selection was in drafts of css selectors level 3, but it was removed in the candidate recommendation phase because its was under-specified (especially with nested elements) and interoperability wasn't achieved (based on discussion in the...
::slotted() - CSS: Cascading Style Sheets
Web › CSS › ::slotted
ive them a different font and color. this allows them to stand out better next to the slots that haven't been successfully filled. the element looks like this when inserted into the page: <person-details> <p slot="person-name">dr. shazaam</p> <span slot="person-age">immortal</span> <span slot="person-occupation">superhero</span> </person-details> specifications specification status comment css scoping module level 1the definition of '::slotted' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgef...
::spelling-error - CSS: Cascading Style Sheets
working draft initial definition. ...
:active - CSS: Cascading Style Sheets
Web › CSS › :active
living standard selectors level 4the definition of ':active' in that specification. working draft no change. selectors level 3the definition of ':active' in that specification. recommendation no change. css level 2 (revision 1)the definition of ':active' in ...
:any-link - CSS: Cascading Style Sheets
Web › CSS › :any-link
working draft initial definition. ...
:blank - CSS: Cascading Style Sheets
Web › CSS › :blank
ea>). syntax :blank examples simple :blank example in eventual supporting browsers, the :blank pseudo-class will enable developers to highlight in some way input controls that are not required, but still have no content filled in, perhaps as a reminder to users. html <textarea></textarea> css textarea:blank { border: 3px solid red; } result specifications specification status comment selectors level 4the definition of ':blank' in that specification. working draft initial definition. ...
:checked - CSS: Cascading Style Sheets
Web › CSS › :checked
cc; } result image gallery you can use the :checked pseudo-class to build an image gallery with full-size images that show only when the user clicks on a thumbnail. see this demo for a possible cue. note: for an analogous effect, but based on the :hover pseudo-class and without hidden radioboxes, see this demo, taken from the :hover reference page. specifications specification status comment html living standardthe definition of ':checked' in that specification. living standard no change. html5the definition of ':checked' in that specification. recommendation defines the semantic regarding html. selectors level 4the definition of ':checked' in that specification. working draft no change. selectors level 3the definit...
:default - CSS: Cascading Style Sheets
Web › CSS › :default
living standard no change. html5the definition of ':default' in that specification. recommendation defines associated html semantics and constraint validation. selectors level 4the definition of ':default' in that specification. working draft no change. ...
:defined - CSS: Cascading Style Sheets
Web › CSS › :defined
living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explorer...
:dir() - CSS: Cascading Style Sheets
Web › CSS › :dir
ers ltr target left-to-right elements. rtl target right-to-left elements. formal syntax :dir( ltr | rtl ) examples html <div dir="rtl"> <span>test1</span> <div dir="ltr">test2 <div dir="auto">עִבְרִית</div> </div> </div> css :dir(ltr) { background-color: yellow; } :dir(rtl) { background-color: powderblue; } result specifications specification status comment html living standardthe definition of ':dir(ltr)' in that specification. living standard no changes. selectors level 4the definition of ':dir()' in that specification. working draft initial definition. ...
:disabled - CSS: Cascading Style Sheets
Web › CSS › :disabled
living standard no change. html5the definition of ':disabled' in that specification. recommendation defines the semantics of html and forms. selectors level 4the definition of ':disabled' in that specification. working draft no change. selectors level 3the ...
:empty - CSS: Cascading Style Sheets
Web › CSS › :empty
screen but keep it parseable by assistive technology. this is commonly used for buttons that rely solely on an icon to convey purpose. what is an accessible name? | the paciello group hidden content for better a11y | go make things mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.4 | w3c understanding wcag 2.0 specifications specification status comment selectors level 4the definition of 'the :empty pseudo-class' in that specification. working draft changed to act like :-moz-only-whitespace. selectors level 3the definition of 'the :empty pseudo-class' in that specification. recommendation initial definition ...
:enabled - CSS: Cascading Style Sheets
Web › CSS › :enabled
living standard no change. html5the definition of ':enabled' in that specification. recommendation defines the semantics for html and forms. selectors level 4the definition of ':enabled' in that specification. working draft no change. selectors level 3the de...
:first-child - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':first-child' in that specification. recommendation no change. css level 2 (revision 1)the definition of ':first-child' in that specification. recommendation initi...
:first-of-type - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':first-of-type' in that specification. recommendation initial definition. ...
:first - CSS: Cascading Style Sheets
Web › CSS › :first
%; margin-top: 50%; } p { page-break-after: always; } javascript document.queryselector("button").addeventlistener('click', () => { window.print(); }); result press the "print!" button to print the example. the words on the first page should be somewhere around the center, while other pages will have their contents at the default position. specifications specification status comment css paged media module level 3the definition of ':first' in that specification. working draft no change. css level 2 (revision 1)the definition of ':first' in that specification. recommendation initial definition. ...
:focus-visible - CSS: Cascading Style Sheets
working draft initial definition. ...
:focus-within - CSS: Cascading Style Sheets
working draft initial definition. ...
:focus - CSS: Cascading Style Sheets
Web › CSS › :focus
t 3 to 1. accessible visual focus indicators: give your site some focus! tips for designing useful and usable focus indicators :focus { outline: none; } never just remove the focus outline (visible focus indicator) without replacing it with a focus outline that will pass wcag 2.1 sc 1.4.11 non-text contrast. quick tip: never remove css outlines specifications specification status comment html living standardthe definition of ':focus' in that specification. living standard defines html-specific semantics. selectors level 4the definition of ':focus' in that specification. working draft no change. selectors level 3the definition of ':focus' in that specification. recommendation no change. css level 2 (revision 1)th...
:fullscreen - CSS: Cascading Style Sheets
se of the :not(:fullscreen), which looks for the element to not have the :fullscreen pseudo-class applied to it. #fs-toggle:not(:fullscreen) { background-color: #afa; } when the document is in full-screen mode, the following css applies instead, setting the background color to a pale shade of red. #fs-toggle:fullscreen { background-color: #faa; } specifications specification status comment fullscreen apithe definition of ':fullscreen' in that specification. living standard initial definition. ...
:has() - CSS: Cascading Style Sheets
Web › CSS › :has
() within stylesheets. examples matching <a> elements that directly contain an <img> the following selector matches only <a> elements that directly contain an <img> child: a:has(> img) matching <h1> elements that are followed by a <p> the following selector matches <h1> elements only if they have a <p> element directly following them: h1:has(+ p) specifications specification status comment selectors level 4the definition of ':has()' in that specification. working draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinterne...
:host() - CSS: Cascading Style Sheets
Web › CSS › :host()
}' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host(.footer) { color : red; } rule styles all instances of the <context-span> element (the shadow host in this instance) in the document that have the footer class set on them — we've used it to give instances of the element inside the <footer> a special color. specifications specification status comment css scoping module level 1the definition of ':host()' in that specification. working draft initial definition. browser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:host()chrome full support ...
:host-context() - CSS: Cascading Style Sheets
,0,0,0.1); padding: 2px 5px; }'; the :host-context(h1) { font-style: italic; } and :host-context(h1):after { content: " - no links in headers!" } rules style the instance of the <context-span> element (the shadow host in this instance) inside the <h1>. we've used it to make it clear that the custom element shouldn't appear inside the <h1> in our design. specifications specification status comment css scoping module level 1the definition of ':host-context()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrom...
:host - CSS: Cascading Style Sheets
Web › CSS › :host
':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host { background: rgba(0,0,0,0.1); padding: 2px 5px; } rule styles all instances of the <context-span> element (the shadow host in this instance) in the document. specifications specification status comment css scoping module level 1the definition of ':host' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
:in-range - CSS: Cascading Style Sheets
Web › CSS › :in-range
living standard defines when :in-range matches elements in html. selectors level 4the definition of ':in-range' in that specification. working draft initial specification. ...
:indeterminate - CSS: Cascading Style Sheets
living standard no change. html5the definition of ':indeterminate' in that specification. recommendation defines the semantics of html and constraint validation. selectors level 4the definition of ':indeterminate' in that specification. working draft no change.
:invalid - CSS: Cascading Style Sheets
Web › CSS › :invalid
buttons in the group is selected. (grouped radio buttons share the same value for their name attribute.) gecko defaults by default, gecko does not apply a style to the :invalid pseudo-class. however, it does apply a style (a red "glow" using the box-shadow property) to the :-moz-ui-invalid pseudo-class, which applies in a subset of cases for :invalid. specifications specification status comment html living standardthe definition of ':invalid' in that specification. living standard no change. html5the definition of ':invalid' in that specification. recommendation defines the semantics of html and constraint validation. selectors level 4the definition of ':invalid' in that specification. working draft initial definition. ...
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
Web › CSS › :is
:unsupported even if they support :valid. difference between :is() and :where() the diffference between the two is that :is() counts towards the specificity of the overall selector (it takes the specificity of its most specific argument), whereas :where() has a specificity value of 0. this is demonstrated by the example on the :where() reference page. specifications specification status comment selectors level 4the definition of ':is()' in that specification. working draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet...
:lang() - CSS: Cascading Style Sheets
Web › CSS › :lang
working draft adds wildcard language matching and comma-separated list of languages. selectors level 3the definition of ':lang()' in that specification. recommendation no significant change. css level 2 (revision 1)the definition of ':lang()' in that specification. recommen...
:last-child - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':last-child' in that specification. recommendation initial definition. ...
:last-of-type - CSS: Cascading Style Sheets
ctor is written. html <article> <div>this `div` is first.</div> <div>this <span>nested `span` is last</span>!</div> <div>this <em>nested `em` is first</em>, but this <em>nested `em` is last</em>!</div> <b>this `b` qualifies!</b> <div>this is the final `div`!</div> </article> css article :last-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':last-of-type' in that specification. working draft matching elements are not required to have a parent. selectors level 3the definition of ':last-of-type' in that specification. recommendation initial definition. ...
:left - CSS: Cascading Style Sheets
Web › CSS › :left
a :left page. note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box. all other properties will be ignored, and only the page box, not the document content on the page, will be affected. syntax :left examples setting a margin for left-hand pages @page :left { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':left' in that specification. working draft no change. css level 2 (revision 1)the definition of ':left' in that specification. recommendation initial definition. ...
:link - CSS: Cascading Style Sheets
Web › CSS › :link
the background-color values are likely to remain, as most browsers do not set that property on visited links by default. html <a href="#ordinary-target">this is an ordinary link.</a><br> <a href="">you've already visited this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification. living standard selectors level 4the definition of ':link' in that specification. working draft no change. selectors level 3the definition of ':link' in that specification. recommendation no change. css level 2 (revision 1)the definition of ':link' in that spe...
:not() - CSS: Cascading Style Sheets
Web › CSS › :not
that are not <p> elements */ body :not(p) { text-decoration: underline; } /* elements that are not <div> and not <span> elements */ body :not(div):not(span) { font-weight: bold; } /* elements that are not `.crazy` or `.fancy` */ /* note that this syntax is not well supported yet. */ body :not(.crazy, .fancy) { font-family: sans-serif; } result specifications specification status comment selectors level 4the definition of ':not()' in that specification. working draft extends its argument to allow some non-simple selectors. selectors level 3the definition of ':not()' in that specification. recommendation initial definition. ...
:nth-child() - CSS: Cascading Style Sheets
working draft adds of <selector> syntax and specifies that matching elements are not required to have a parent. selectors level 3the definition of ':nth-child' in that specification. recommendation initial definition. ...
:nth-last-child() - CSS: Cascading Style Sheets
r. html <h4>a list of four items (styled):</h4> <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> </ol> <h4>a list of two items (unstyled):</h4> <ol> <li>one</li> <li>two</li> </ol> css /* if there are at least three list items, style them all */ li:nth-last-child(n+3), li:nth-last-child(n+3) ~ li { color: red; } result specifications specification status comment selectors level 4the definition of ':nth-last-child' in that specification. working draft matching elements are not required to have a parent. selectors level 3the definition of ':nth-last-child' in that specification. recommendation initial definition. ...
:nth-last-of-type() - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':nth-last-of-type' in that specification. recommendation initial definition. ...
:nth-of-type() - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':nth-of-type' in that specification. recommendation initial definition. ...
:only-child - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent. selectors level 3the definition of ':only-child' in that specification. recommendation initial definition. ...
:only-of-type - CSS: Cascading Style Sheets
ples styling elements with no siblings of the same type html <main> <div>i am `div` #1.</div> <p>i am the only `p` among my siblings.</p> <div>i am `div` #2.</div> <div>i am `div` #3. <i>i am the only `i` child.</i> <em>i am `em` #1.</em> <em>i am `em` #2.</em> </div> </main> css main :only-of-type { color: red; } result specifications specification status comment selectors level 4the definition of ':only-of-type' in that specification. working draft matching elements are not required to have a parent. selectors level 3the definition of ':only-of-type' in that specification. recommendation initial definition. ...
:optional - CSS: Cascading Style Sheets
Web › CSS › :optional
ed valid content to ensure a successful form submission. required inputs should also be indicated visually, using a treatment that does not rely solely on color to convey meaning. typically, descriptive text and/or an icon are used. mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':optional' in that specification. living standard no change. html5the definition of ':optional' in that specification. recommendation defines the semantics of html and constraint validation. selectors level 4the definition of ':optional' in that specification. working draft no change. ...
:out-of-range - CSS: Cascading Style Sheets
living standard defines when :out-of-range matches elements in html. selectors level 4the definition of ':out-of-range' in that specification. working draft initial definition. ...
:placeholder-shown - CSS: Cascading Style Sheets
working draft initial definition. ...
:read-only - CSS: Cascading Style Sheets
it will select any element that cannot be edited by the user. <p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-only' in that specification. living standard no change. html5the definition of ':read-only' in that specification. recommendation defines the semantics regarding html and constraint validation. selectors level 4the definition of ':read-only' in that specification. working draft defines the pse...
:read-write - CSS: Cascading Style Sheets
e user, such as a <p> element with contenteditable set on it. <p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-write' in that specification. living standard no change. html5the definition of ':read-write' in that specification. recommendation defines the semantics regarding html and constraint validation. selectors level 4the definition of ':read-write' in that specification. working draft defines the ...
:required - CSS: Cascading Style Sheets
Web › CSS › :required
essful submission. if the form also contains optional inputs, required inputs should be indicated visually using a treatment that does not rely solely on color to convey meaning. typically, descriptive text and/or an icon are used. mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':required' in that specification. living standard no change. html5the definition of ':required' in that specification. recommendation defines the semantics of html and constraint validation. selectors level 4the definition of ':required' in that specification. working draft no change. ...
:right - CSS: Cascading Style Sheets
Web › CSS › :right
:left page. note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box. all other properties will be ignored, and only the page box, not the document content on the page, will be affected. syntax :right examples setting margins for right-hand pages @page :right { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':right' in that specification. working draft no change. css level 2 (revision 1)the definition of ':right' in that specification. recommendation initial definition. ...
:root - CSS: Cascading Style Sheets
Web › CSS › :root
tical to the selector html, except that its specificity is higher. /* selects the root element of the document: <html> in the case of html */ :root { background: yellow; } syntax :root examples declaring global css variables :root can be useful for declaring global css variables: :root { --main-color: hotpink; --pane-padding: 5px 42px; } specifications specification status comment selectors level 4the definition of ':root' in that specification. working draft no change. selectors level 3the definition of ':root' in that specification. recommendation initial definition. ...
:scope - CSS: Cascading Style Sheets
Web › CSS › :scope
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxintern...
:state() - CSS: Cascading Style Sheets
Web › CSS › :state
unknown initial definition. ...
:target - CSS: Cascading Style Sheets
Web › CSS › :target
living standard defines html-specific semantics. selectors level 4the definition of ':target' in that specification. working draft no changes. selectors level 3the definition of ':target' in that specification. recommendation initial definition. ...
:valid - CSS: Cascading Style Sheets
Web › CSS › :valid
ve certain types of color blindness will be unable to determine the input's state unless it is accompanied by an additional indicator that does not rely on color to convey meaning. typically, descriptive text and/or an icon are used. mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':valid' in that specification. living standard no change. html5the definition of ':valid' in that specification. recommendation defines the semantics of html and constraint validation. selectors level 4the definition of ':valid' in that specification. working draft initial definition. ...
:visited - CSS: Cascading Style Sheets
Web › CSS › :visited
living standard selectors level 4the definition of ':visited' in that specification. working draft no change. selectors level 3the definition of ':visited' in that specification. recommendation no change. css level 2 (revision 1)the definition of ':visited'...
:where() - CSS: Cascading Style Sheets
Web › CSS › :where
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxint...
@charset - CSS: Cascading Style Sheets
Web › CSS › @charset
recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefire...
additive-symbols - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
fallback - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
negative - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
pad - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
prefix - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
range - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
speak-as - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
suffix - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
symbols - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
system - CSS: Cascading Style Sheets
ter the counter representation, and enclose the characters in paranthesis; like (a), (b), etc. html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style alpha-modified { system: extends lower-alpha; prefix: "("; suffix: ") "; } ul { list-style: alpha-modified; } result specifications specification status comment css counter styles level 3the definition of 'system' in that specification. candidate recommendation initial definition. ...
@counter-style - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
font-display - CSS: Cascading Style Sheets
working draft initial definition ...
font-family - CSS: Cascading Style Sheets
alues <family-name> specifies the name of the font family. formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax <family-name>where <family-name> = <string> | <custom-ident>+ examples setting the font family name @font-face { font-family: examplefont; src: url('examplefont.ttf'); } specifications specification status comment css fonts module level 3the definition of 'font-family' in that specification. candidate recommendation initial definition ...
font-stretch - CSS: Cascading Style Sheets
a percentage range for font-stretch the following find a local open sans font or import it, and allow using the font for normal, semi-condensed and semi-expanded states. @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-stretch: 87.5% 112.5%; } specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification. working draft css fonts module level 3the definition of 'font-stretch' in that specification. candidate recommendation ...
font-style - CSS: Cascading Style Sheets
ue italics use different glyphs and are a bit different from their upright counterparts, having some unique features and generally have a rounded and calligraphic quality. these fonts are specially created by font designers and are not artificially sloped. @font-face { font-family: garamond; src: url('garamond-italic.ttf'); font-style: italic; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification. working draft adds oblique keyword with angle value css fonts module level 3the definition of 'font-style' in that specification. candidate recommendation initial definition ...
font-variation-settings - CSS: Cascading Style Sheets
working draft initial definition ...
font-weight - CSS: Cascading Style Sheets
ent">[1,1000]> examples setting normal font weight in a @font-face rule the following finds a local open sans font or import it, and allows using the font for normal font weights. @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-weight: 400; } specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification. working draft css fonts module level 3the definition of 'font-weight' in that specification. candidate recommendation ...
src - CSS: Cascading Style Sheets
Web › CSS › @font-face › src
candidate recommendation initial definition ...
unicode-range - CSS: Cascading Style Sheets
one this by wrapping the ampersand in a <span> and applying a different font just to that, but that is an extra element and rule set. html <div>me & you = us</div> css @font-face { font-family: 'ampersand'; src: local('times new roman'); unicode-range: u+26; } div { font-size: 4em; font-family: ampersand, helvetica, sans-serif; } result specifications specification status comment css fonts module level 3the definition of 'unicode-range' in that specification. candidate recommendation initial definition ...
@font-face - CSS: Cascading Style Sheets
recommendation font format specification with new compression algorithm woff file format 1.0the definition of 'woff font format' in that specification. recommendation font format specification css fonts module level 3the definition of '@font-face' in that specific...
@font-feature-values - CSS: Cascading Style Sheets
working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilec...
@import - CSS: Cascading Style Sheets
Web › CSS › @import
candidate recommendation extended the syntax to support the @supports syntax. css cascading and inheritance level 3the definition of '@import' in that specification. candidate recommendation media queriesthe definition of '@import' in that specifi...
@keyframes - CSS: Cascading Style Sheets
working draft ...
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
living standard initial standardization safari css reference 'media query extensions' in that document. non-standard unofficial documentation initial documentation ...
-webkit-transform-3d - CSS: Cascading Style Sheets
sforms. values true the browser supports the 3d css transforms with the -webkit prefix. false the 3d css transforms prefixed with -webkit are not supported by the browser. examples @media (-webkit-transform-3d) { .foo { transform-style: preserve-3d; } } @media (-webkit-transform-3d: 1) { .foo { transform-style: preserve-3d; } } specifications specification status comment compatibility standardthe definition of '-webkit-transform-3d' in that specification. living standard initial standardization safari css reference 'media query extensions' in that document. non-standard unofficial documentation initial documentation ...
any-hover - CSS: Cascading Style Sheets
Web › CSS › @media › any-hover
able input mechanism(s) can hover conveniently, or there is no pointing input mechanism. hover one or more available input mechanisms can conveniently hover over elements. examples testing whether input methods can hover html <a href="#">try hovering over me!</a> css @media (any-hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'any-hover' in that specification. candidate recommendation initial definition. ...
any-pointer - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
aspect-ratio - CSS: Cascading Style Sheets
candidate recommendation no change. media queriesthe definition of 'aspect-ratio' in that specification. recommendation initial definition. ...
aural - CSS: Cascading Style Sheets
Web › CSS › @media › aural
—was used to specify a block of css that applied only when the content is being presented using a speech synthesis device. @media aural { /* speech-specific styles here */ } updating existing css to use the speech media type should be as simple as replacing aural with speech. examples basic example @media aural { body { voice-family: paul } } specifications specification status comment css level 2 (revision 2)the definition of 'aural' in that specification. deprecated initial definition. ...
color-gamut - CSS: Cascading Style Sheets
s larger than and includes the srgb gamut. rec2020 the output device can support approximately the gamut specified by the itu-r recommendation bt.2020 color space or more. the rec2020 gamut is larger than and includes the p3 gamut. examples html <p>this is a test.</p> css @media (color-gamut: srgb) { p { background: #f4ae8a; } } result specifications specification status comment media queries level 4the definition of 'color-gamut' in that specification. candidate recommendation initial definition. ...
color-index - CSS: Cascading Style Sheets
@media (min-color-index: 15000) { p { color: #1475ef; } } result custom stylesheet this html will apply a special stylesheet for devices that have at least 256 colors. <link rel="stylesheet" href="http://foo.bar.com/base.css" /> <link rel="stylesheet" media="all and (min-color-index: 256)" href="http://foo.bar.com/color-stylesheet.css" /> specifications specification status comment media queries level 4the definition of 'color-index' in that specification. candidate recommendation the value can now be negative, in which case it computes to false. media queriesthe definition of 'color-index' in that specification. recommendation initial definition. the value must be nonnegative. ...
color - CSS: Cascading Style Sheets
Web › CSS › @media › color
candidate recommendation the value can now be negative, in which case it computes to false. media queriesthe definition of 'color' in that specification. recommendation initial definition. the value must be nonnegative. ...
device-aspect-ratio - CSS: Cascading Style Sheets
ect-ratio feature is specified as a <ratio>. it is a range feature, meaning that you can also use the prefixed min-device-aspect-ratio and max-device-aspect-ratio variants to query minimum and maximum values, respectively. examples article { padding: 1rem; } @media screen and (min-device-aspect-ratio: 16/9) { article { padding: 1rem 5vw; } } specifications specification status comment media queries level 4the definition of 'device-aspect-ratio' in that specification. candidate recommendation deprecated in media queries level 4. media queriesthe definition of 'device-aspect-ratio' in that specification. recommendation initial definition. ...
device-height - CSS: Cascading Style Sheets
, meaning that you can also use the prefixed min-device-height and max-device-height variants to query minimum and maximum values, respectively. examples this html applies a special stylesheet for devices that are shorter than 800 pixels. <link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-height' in that specification. candidate recommendation deprecated in media queries level 4. media queriesthe definition of 'device-height' in that specification. recommendation initial definition. ...
device-width - CSS: Cascading Style Sheets
e, meaning that you can also use the prefixed min-device-width and max-device-width variants to query minimum and maximum values, respectively. examples this html applies a special stylesheet for devices that are narrower than 800 pixels. <link rel="stylesheet" media="screen and (max-device-width: 799px)" href="http://foo.bar.com/narrow-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-width' in that specification. candidate recommendation deprecated in media queries level 4. media queriesthe definition of 'device-width' in that specification. recommendation initial definition. ...
forced-colors - CSS: Cascading Style Sheets
k. this example has an annoying color palette by default. this example does not take advantage of the colors provided by the user agent. html <div class="colors">weird color box</div> css .colors { background-color: red; color: grey; } @media (forced-colors: active) { .colors { background-color: white; color: black; } } result specifications specification status comment media queries level 5the definition of 'forced-colors' in that specification. editor's draft initial definition. ...
grid - CSS: Cascading Style Sheets
Web › CSS › @media › grid
candidate recommendation no change. media queriesthe definition of 'grid' in that specification. recommendation initial definition. ...
height - CSS: Cascading Style Sheets
Web › CSS › @media › height
candidate recommendation the value can now be negative, in which case it computes to false. media queriesthe definition of 'height' in that specification. recommendation initial definition. the value must be nonnegative. ...
hover - CSS: Cascading Style Sheets
Web › CSS › @media › hover
r (e.g., many mobile devices emulate hovering when the user performs an inconvenient long tap), or there is no primary pointing input mechanism. hover the primary input mechanism can conveniently hover over elements. examples html <a href="#">try hovering over me!</a> css @media (hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'hover' in that specification. candidate recommendation initial definition. ...
inverted-colors - CSS: Cascading Style Sheets
editor's draft ...
light-level - CSS: Cascading Style Sheets
s code will likely not work on any devices (device compatibility is low). @media (light-level: normal) { p { background: url("texture.jpg"); color: #333; } } @media (light-level: dim) { p { background: #222; color: #ccc; } } @media (light-level: washed) { p { background: white; color: black; font-size: 2em; } } specifications specification status comment media queries level 5the definition of 'light-level' in that specification. editor's draft initial definition. ...
monochrome - CSS: Cascading Style Sheets
Web › CSS › @media › monochrome
candidate recommendation the value can now be negative, in which case it computes to false. media queriesthe definition of 'monochrome' in that specification. recommendation initial definition. the value must be nonnegative. ...
orientation - CSS: Cascading Style Sheets
cape orientation, i.e., the width is greater than the height. examples html <div>box 1</div> <div>box 2</div> <div>box 3</div> css body { display: flex; } div { background: yellow; } @media (orientation: landscape) { body { flex-direction: row; } } @media (orientation: portrait) { body { flex-direction: column; } } result specifications specification status comment media queries level 4the definition of 'orientation' in that specification. candidate recommendation no change. media queriesthe definition of 'orientation' in that specification. recommendation initial definition. ...
overflow-block - CSS: Cascading Style Sheets
icula nibh a justo imperdiet rutrum. nam faucibus pretium orci imperdiet sollicitudin. nunc id facilisis dui. proin elementum et massa et feugiat. integer rutrum ullamcorper eleifend. proin sit amet tincidunt risus. sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css @media (overflow-block: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-block' in that specification. candidate recommendation initial definition. ...
overflow-inline - CSS: Cascading Style Sheets
trum. nam faucibus pretium orci imperdiet sollicitudin. nunc id facilisis dui. proin elementum et massa et feugiat. integer rutrum ullamcorper eleifend. proin sit amet tincidunt risus. sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css p { white-space: nowrap; } @media (overflow-inline: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-inline' in that specification. candidate recommendation initial definition. ...
pointer - CSS: Cascading Style Sheets
Web › CSS › @media › pointer
candidate recommendation initial definition. ...
prefers-color-scheme - CSS: Cascading Style Sheets
editor's draft initial definition. ...
prefers-contrast - CSS: Cascading Style Sheets
ly to rely on the settings provided by the operating system. examples this example has an annoying low contrast by default. html <div class="contrast">low contrast box</div> css .contrast { width: 100px; height: 100px; outline: 2px dashed black; } @media (prefers-contrast: high) { .contrast { outline: 2px solid black; } } result specifications specification status comment media queries level 5the definition of 'prefers-contrast' in that specification. editor's draft initial definition. ...
prefers-reduced-data - CSS: Cascading Style Sheets
editor's draft initial definition. ...
prefers-reduced-motion - CSS: Cascading Style Sheets
editor's draft initial definition. ...
prefers-reduced-transparency - CSS: Cascading Style Sheets
ples note: no browser currently implements this feature so the following example will not work. this example has an annoying transparency effect by default. html <div class="transparency">transparent box</div> css .transparency { opacity: 0.5; } @media (prefers-reduced-transparency: reduce) { .transparency { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-transparency' in that specification. editor's draft initial definition. ...
resolution - CSS: Cascading Style Sheets
Web › CSS › @media › resolution
recommendation initial definition. ...
scan - CSS: Cascading Style Sheets
Web › CSS › @media › scan
html <p>if your screen uses interlaced rendering, this text should be in a sans-serif font. if your screen uses progressive scanning, you should see a serif font.</p> css p { font-family: cursive; } @media (scan: interlace) { p { font-family: sans-serif; } } @media (scan: progressive) { p { font-family: serif; } } result specifications specification status comment media queries level 4the definition of 'scan' in that specification. candidate recommendation no change. media queriesthe definition of 'scan' in that specification. recommendation initial definition. ...
scripting - CSS: Cascading Style Sheets
Web › CSS › @media › scripting
itial page load. weird.</p> <p class="script-enabled">you have scripting enabled! :-)</p> css p { color: lightgray; } @media (scripting: none) { .script-none { color: red; } } @media (scripting: initial-only) { .script-initial-only { color: red; } } @media (scripting: enabled) { .script-enabled { color: red; } } result specifications specification status comment media queries level 5the definition of 'scripting' in that specification. editor's draft initial definition ...
shape - CSS: Cascading Style Sheets
Web › CSS › @media › shape
working draft ...
update - CSS: Cascading Style Sheets
ations can be used. example: computer screens. examples html <p>if this text animates for you, you are using a fast-updating device.</p> css @keyframes jiggle { from { transform: translatey(0); } to { transform: translatey(25px); } } @media (update: fast) { p { animation: 1s jiggle linear alternate infinite; } } result specifications specification status comment media queries level 4the definition of 'update' in that specification. candidate recommendation initial definition. ...
width - CSS: Cascading Style Sheets
Web › CSS › @media › width
vely. examples html <div>watch this element as you resize your viewport's width.</div> css /* exact width */ @media (width: 360px) { div { color: red; } } /* minimum width */ @media (min-width: 35rem) { div { background: yellow; } } /* maximum width */ @media (max-width: 50rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the definition of 'width' in that specification. candidate recommendation the value can now be negative, in which case it computes to false. media queriesthe definition of 'width' in that specification. recommendation initial definition. the value must be nonnegative. ...
@namespace - CSS: Cascading Style Sheets
recommendation initial definition ...
bleed - CSS: Cascading Style Sheets
Web › CSS › @page › bleed
<length> specifies by how far outward, in each direction, the bleed area extends past the page box. values may be negative, but there may be implementation-specific limits. formal definition related at-rule@pageinitial valueautocomputed valueas specified formal syntax auto | <length> examples setting a page bleed of 1cm @page { bleed: 1cm; } specifications specification status comment css paged media module level 3the definition of 'bleed' in that specification. working draft initial definition ...
marks - CSS: Cascading Style Sheets
Web › CSS › @page › marks
rop; marks: cross; marks: crop cross; values crop crop marks will be displayed. cross cross marks will be displayed. none no marks will be displayed. formal definition related at-rule@pageinitial valuenonecomputed valueas specified formal syntax none | [ crop | cross ] examples adding crop and cross marks @page { marks: crop cross; } specifications specification status comment css paged media module level 3the definition of 'marks' in that specification. working draft initial definition this css property was initially proposed in css level 2, but was dropped from css level 2 (revision 1). ...
size - CSS: Cascading Style Sheets
Web › CSS › @page › size
working draft initial definition ...
@page - CSS: Cascading Style Sheets
Web › CSS › @page
top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom examples @page pseudo-class examples please refer to the various pseudo-classes of @page for examples. :blank :first :left :right :recto :verso specifications specification status comment css logical properties and values level 1the definition of ':recto and :verso' in that specification. editor's draft adds the :recto and :verso page selectors css paged media module level 3the definition of '@page' in that specification. working draft no change from css level 2 (revision 1), though more css at-rules can be used inside a @page. ...
@supports - CSS: Cascading Style Sheets
Web › CSS › @supports
editor's draft adds the selector() function. css conditional rules module level 3the definition of '@supports' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from s...
height - CSS: Cascading Style Sheets
Web › CSS › @viewport › height
working draft initial definition ...
max-height - CSS: Cascading Style Sheets
working draft initial definition ...
max-width - CSS: Cascading Style Sheets
working draft initial definition ...
max-zoom - CSS: Cascading Style Sheets
tage> a non-negative percentage limiting the maximum value of the zoom factor. formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification. working draft initial definition ...
min-height - CSS: Cascading Style Sheets
working draft initial definition ...
min-width - CSS: Cascading Style Sheets
working draft initial definition ...
min-zoom - CSS: Cascading Style Sheets
> a non-negative percentage limiting the minimum value of the zoom factor. formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specification. working draft initial definition ...
orientation - CSS: Cascading Style Sheets
d into portrait orientation. landscape the document should be locked into landscape orientation. formal definition related at-rule@viewportinitial valueautopercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax auto | portrait | landscape examples setting viewport orientation @viewport { orientation: landscape; } specifications specification status comment css device adaptationthe definition of '"orientation" descriptor' in that specification. working draft initial definition ...
user-zoom - CSS: Cascading Style Sheets
content. mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition related at-rule@viewportinitial valuezoompercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax zoom | fixed examples disabling user zoom @viewport { user-zoom: fixed; } specifications specification status comment css device adaptationthe definition of '"user-zoom" descriptor' in that specification. working draft initial definition ...
viewport-fit - CSS: Cascading Style Sheets
scriptor, one must keep in mind that not all device displays are rectangular, and should therefore make use of the safe area inset variables. formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descriptor' in that specification. working draft initial definition. ...
width - CSS: Cascading Style Sheets
Web › CSS › @viewport › width
working draft initial definition ...
zoom - CSS: Cascading Style Sheets
Web › CSS › @viewport › zoom
. <percentage> a non-negative percentage value used as the zoom factor. formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specification. working draft initial specification ...
@viewport - CSS: Cascading Style Sheets
Web › CSS › @viewport
entation. viewport-fit controls the display of the document on non-rectangular displays. formal syntax @viewport { <group-rule-body> } examples setting viewport size, zoom, and orientation @viewport { min-width: 640px; max-width: 800px; } @viewport { zoom: 0.75; min-zoom: 0.5; max-zoom: 0.9; } @viewport { orientation: landscape; } specifications specification status comment css round display level 1the definition of '@viewport' in that specification. working draft defined the viewport-fit descriptor. css device adaptationthe definition of '@viewport' in that specification. working draft initial definition ...
Adjacent sibling combinator - CSS: Cascading Style Sheets
ws the first element, and both are children of the same parent element. /* paragraphs that come immediately after any image */ img + p { font-weight: bold; } syntax former_element + target_element { style properties } examples css li:first-of-type + li { color: red; } html <ul> <li>one</li> <li>two!</li> <li>three</li> </ul> result specifications specification status comment selectors level 4the definition of 'next-sibling combinator' in that specification. working draft renames it the "next-sibling" combinator. selectors level 3the definition of 'adjacent sibling combinator' in that specification. recommendation css level 2 (revision 1)the definition of 'adjacent sibling selectors' in that specification. reco...
Alternative style sheets - CSS: Cascading Style Sheets
yle sheets linked without a title attribute are always applied. use rel="stylesheet" to link to the default style, and rel="alternate stylesheet" to link to alternative style sheets. this tells the browser which style sheet title should be selected by default, and makes that default selection apply in browsers that do not support alternate style sheets. specifications specification status comment html living standardthe definition of 'link type "alternate"' in that specification. living standard html living standardthe definition of 'alternative stylesheet' in that specification. living standard html living standardthe definition of 'the "title" attribute for the style element' in that specification. living standard h...
At-rules - CSS: Cascading Style Sheets
Web › CSS › At-rule
. if the condition evaluates to true, then all of the statements within the group will be applied. conditional group rules are defined in css conditionals level 3 and are: @media, @supports, @document. (deferred to level 4 of css spec) since each conditional group may also contain nested statements, there may be an unspecified amount of nesting. specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition compatibility standardthe definition of 'css at-rules' in that specification. living standard standardizes @-webkit-keyframes. ...
Attribute selectors - CSS: Cascading Style Sheets
re the case sensitive flag due to a quirk in how html treats the type attribute. */ ol[type="a"] { list-style-type: lower-alpha; background: red; } ol[type="a" s] { list-style-type: lower-alpha; background: lime; } ol[type="a" s] { list-style-type: upper-alpha; background: lime; } html <ol type="a"> <li>example list</li> </ol> result specifications specification status comment selectors level 4the definition of 'attribute selectors' in that specification. working draft adds modifier for ascii case-sensitive and case-insensitive attribute value selection. selectors level 3the definition of 'attribute selectors' in that specification. recommendation css level 2 (revision 1)the definition of 'attribute selectors' in t...
CSSOM View - CSS: Cascading Style Sheets
of a document, in particular its scrolling behavior. reference properties scroll-behavior guides coordinate systems a guide to the coordinate systems used to specify the position of a location in a display context, whether that context is a window on a monitor, a viewport on a mobile device, or a position on a sheet of paper when printing. specifications specification status comment css object model (cssom) view module working draft initial definition. ...
CSS Animations - CSS: Cascading Style Sheets
css. this article describes each relevant css property and at-rule and explains how they interact with each other. css animations tips and tricks tips and tricks to help you get the most out of css animations. currently offers a technique for replaying an animation which has already run through to completion, which the api doesn't support inherently. specifications specification status comment css animations working draft initial definition. ...
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
border-image generator this interactive tool lets you visually create border images (the border-image property). ...
CSS Basic User Interface - CSS: Cascading Style Sheets
...
Mastering margin collapsing - CSS: Cascading Style Sheets
recommendation initial definition. ...
CSS Basic Box Model - CSS: Cascading Style Sheets
del. this model defines how css lays out elements, including their content, padding, border, and margin areas. mastering margin collapsing sometimes, two adjacent margins are collapsed into one. this article describes the rules that govern when and why this happens, and how to control it. visual formatting model explains the visual formatting model. specifications specification status comment css basic box model working draft added margin-trim css level 2 (revision 1) recommendation css level 1 recommendation initial definition. ...
CSS Charsets - CSS: Cascading Style Sheets
css charsets is a module of css that lets you specify the character set used in the style sheet. reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification. recommendation initial definition ...
CSS Color - CSS: Cascading Style Sheets
Web › CSS › CSS Color
properties color color-adjust opacity data types <color> guides applying color to html elements using css a guide to using css to apply color to a variety of types of content. all color-related css properties are touched upon. ...
CSS Multi-column Layout - CSS: Cascading Style Sheets
an across all columns and controlling the way columns are filled. ...
CSS Conditional Rules - CSS: Cascading Style Sheets
css conditional rules is a css module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to. reference at-rules @document @media @supports @import specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition ...
CSS Counter Styles - CSS: Cascading Style Sheets
ets you define your own counter styles. reference properties counter-increment counter-reset at-rules @counter-style system additive-symbols negative prefix suffix range pad speak-as fallback guides using css counters describes how to use counters to number any html element or to perform complex counting. specifications specification status comment css counter styles level 3 candidate recommendation initial definition. ...
CSS Device Adaptation - CSS: Cascading Style Sheets
css device adaptation is a module of css that lets you define the size, zoom factor, and orientation of the viewport. reference at-rules @viewport specifications specification status comment css device adaptation working draft initial definition ...
CSS Display - CSS: Cascading Style Sheets
candidate recommendation added run-in, flow, flow-root, contents and multi-keyword values. css level 2 (revision 1)the definition of 'display' in that specification. recommendation added the table model values and inline-block. css level 1the definition of 'display' i...
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
ex container. browser support for the up-to-date version of the specification is excellent from this point forward. there are a few old articles in existence that refer to the older versions of flexbox, which are pretty easy to identify due to the change in the way that a flex container is created. if you find something referring to display: box or display: flexbox this is outdated information. status in browsers browser support for flexbox is excellent, and the majority of browsers do not need a prefix at this point. safari was the last of the major browsers to remove prefixes, with the release of safari 9 in 2015. the two browsers you should still keep in mind for cross-browser compatibility are: internet explorer 10, which implemented the display: flexbox version of the specification wi...
CSS Flexible Box Layout - CSS: Cascading Style Sheets
ng so. controlling ratios of flex items along the main axis explaining the flex-grow, flex-shrink and flex-basis properties. mastering wrapping of flex items how to create flex containers with multiple lines and control the display of the items in those lines. typical use cases of flexbox common design patterns that are typical flexbox use cases. backwards compatibility of flexbox browser status of flexbox, interoperability issues and supporting older browsers and versions of the spec specifications specification status comment css flexible box layout module candidate recommendation initial definition. ...
CSS Fonts - CSS: Cascading Style Sheets
Web › CSS › CSS Fonts
s in css. variable fonts guide variable fonts are an evolution of the opentype font specification that enables many different variations of a typeface to be incorporated into a single file, rather than having a separate font file for every width, weight, or style. this article will give you all you need to know to get you started using variable fonts. specifications specification status comment css fonts module level 4 working draft adds font-variation-settings (and related higher-level properties) and font-optical-sizing. css fonts module level 3 candidate recommendation adds font-feature-settings (and related higher-level properties) css level 2 (revision 1) recommendation css level 1 recommendation initial de...
CSS Fragmentation - CSS: Cascading Style Sheets
. fragmentation occurs when an inline box wraps onto multiple lines. it also occurs when a block spans more than one column inside a column layout container, or spans a page break when printed. each piece of the rendering for the element is called a fragment. reference box-decoration-break break-after break-before break-inside orphans widows specifications specification status comment css fragmentation module level 3 candidate recommendation initial definition. ...
CSS Generated Content - CSS: Cascading Style Sheets
to an element. ...
Subgrid - CSS: Cascading Style Sheets
ent in the subgrid. as the subgrid value acts in much the same way as a regular nested grid, it is easy to switch between the two. for example, if you realise that you need an implicit grid for rows, all you would need to do is remove the subgrid value of grid-template-rows and perhaps give a value for grid-auto-rows to control the implicit track sizing. specification specification status comment css grid layout module level 2 working draft initial definition of subgrids. see also on the mozilla developer youtube channel, see the videos laying out forms using subgrid and don't wait to use subgrid for better card layouts hello subgrid! a presentation from cssconf.eu ...
CSS Grid Layout - CSS: Cascading Style Sheets
css grid layout candidate recommendation initial definition. ...
CSS Images - CSS: Cascading Style Sheets
ge() cross-fade() data types <gradient> <image> guides using css gradients presents a specific type of css images, gradients, and how to create and use these. 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. specifications specification status comment css images module level 4 working draft added image-resolution, conic-gradient(), and image() css images module level 3 candidate recommendation added image-orientation, image-rendering, object-fit and object-position compatibility standardthe definition of 'css gradients' in that specification. living standard standardizes the -webkit p...
Using CSS counters - CSS: Cascading Style Sheets
working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification. recommendation initial definition ...
CSS Lists - CSS: Cascading Style Sheets
defines how lists can be laid out and styled. ...
CSS Logical Properties and Values - CSS: Cascading Style Sheets
...
CSS Masking - CSS: Cascading Style Sheets
ially or fully hiding portions of visual elements. reference properties clip clip-path clip-rule mask mask-border mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type specifications specification status comment css masking module level 1 candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification. recommendation initial definition ...
CSS Motion Path - CSS: Cascading Style Sheets
...
CSS Namespaces - CSS: Cascading Style Sheets
css namespaces is a css module that allows authors to specify xml namespaces in css. ...
CSS Overflow - CSS: Cascading Style Sheets
contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. reference css properties overflow overflow-block overflow-inline overflow-x overflow-y text-overflow block-overflow line-clamp max-lines continue non-standard properties -webkit-line-clamp specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification. working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification. recommendation initial definition. ...
CSS Paged Media - CSS: Cascading Style Sheets
Web › CSS › CSS Pages
css paged media is a module of css that defines how page switches are handled. ...
CSS Positioned Layout - CSS: Cascading Style Sheets
css positioned layout is a module of css that defines how to position elements on the page. ...
CSS Ruby Layout - CSS: Cascading Style Sheets
Web › CSS › CSS Ruby
rendering model and formatting controls related to the display of ruby annotation. ...
CSS Scroll Snap - CSS: Cascading Style Sheets
dren scroll-snap-align scroll-margin scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left scroll-margin-inline scroll-margin-inline-start scroll-margin-inline-end scroll-margin-block scroll-margin-block-start scroll-margin-block-end guides basic concepts of css scroll snap browser compatibility and scroll snap specification specification status comment css scroll snap module level 1 candidate recommendation initial definition ...
CSS Scrollbars - CSS: Cascading Style Sheets
welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. gumbo beet greens corn soko endive gumbo gourd. parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. dandelion cucumber earthnut pea peanut soko zucchini. </div> result reference css properties scrollbar-width scrollbar-color specifications specification status comment css scrollbars level 1 working draft initial definition. accessibility concerns when you customize scrollbars, consider they have enough contrast and that their hit area is large enough for people who use touch input. baseline rules for scrollbar usability | adrian roselli browser compatibility the compatibility table in this page is generated from stru...
CSS selectors - CSS: Cascading Style Sheets
s the : pseudo allow the selection of elements based on state information that is not contained in the document tree. example: a:visited will match all <a> elements that have been visited by the user. pseudo elements the :: pseudo represent entities that are not included in html. example: p::first-line will match the first line of all <p> elements. specifications specification status comment selectors level 4 working draft added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and ui pseudo-classes, modifier for ascii case-sensitive and case-insensitive attribute value selection. selectors level 3 recommendation added the ~ general sibling combinator and tree-s...
CSS Shapes - CSS: Cascading Style Sheets
edit shape paths in css — firefox developer tools external resources a list of css shapes resources css shapes 101 creating non-rectangular layouts with css shapes how to use css shapes in your web design how to get started with css shapes what i learned in one weekend with css shapes css vs. svg: shapes and arbitrarily-shaped ui components specifications specification status comment css shapes module level 1 candidate recommendation initial definition ...
CSS Table - CSS: Cascading Style Sheets
Web › CSS › CSS Table
css table is a css module that defines how to lay out table data. ...
CSS Text - CSS: Cascading Style Sheets
Web › CSS › CSS Text
m text manipulation, like line breaking, justification and alignment, white space handling, and text transformation. reference properties hanging-punctuation hyphens letter-spacing line-break overflow-wrap tab-size text-align text-align-last text-indent text-justify text-size-adjust text-transform white-space word-break word-spacing specifications specification status comment css logical properties and values level 1 editor's draft updates some properties to be independent of the directionality of the text. css text module level 3 working draft css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Text Decoration - CSS: Cascading Style Sheets
text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Transforms - CSS: Cascading Style Sheets
two-dimensional or three-dimensional space. reference properties backface-visibility perspective perspective-origin rotate scale transform transform-box transform-origin transform-style translate data types <transform-function> guides using css transforms step-by-step tutorial about how to transform elements styled with css. specifications specification status comment css transforms level 1 working draft initial definition. css transforms level 2 editor's draft adds individual transforms. ...
Using CSS transitions - CSS: Cascading Style Sheets
delay), in the same kind of fashion: el.addeventlistener("transitionrun", signalstart, true); el.addeventlistener("transitionstart", signalstart, true); note: the transitionend event doesn't fire if the transition is aborted before the transition is completed because either the element is made display: none or the animating property's value is changed. specifications specification status comment css transitions working draft initial definition ...
CSS Transitions - CSS: Cascading Style Sheets
uration, and other attributes. reference properties transition transition-delay transition-duration transition-property transition-timing-function guides using css transitions step-by-step tutorial about how to create transitions using css. this article describes each relevant css property and explains how they interact with each other. specifications specification status comment css transitions working draft initial definition. ...
CSS data types - CSS: Cascading Style Sheets
Web › CSS › CSS Types
see also css units and values introduction to css: values and units ...
CSS values and units - CSS: Cascading Style Sheets
s allowed, but optional inside the parentheses. (but see notes regarding whitespace within pages for min(), max() and clamp() functions.) some legacy functional notations such as rgba() use commas, but generally commas are only used to separate items in a list. if a comma is used to separate arguments, white space is optional before and after the comma. specifications specification status comment css values and units module level 4 editor's draft adds the vi, vb, ic, cap, lh and rlh units. adds the min(), max() and clamp() functional notation adds toggle() css values and units module level 3 candidate recommendation adds calc(), ch, rem, vw, vw, vmin, vmax, q css color module level 4 working draft adds commaless syntaxes ...
CSS Custom Properties for Cascading Variables - CSS: Cascading Style Sheets
css custom properties for cascading variables is a css module that allows for the creation of custom properties that can be used over and over. ...
CSS Writing Modes - CSS: Cascading Style Sheets
ght (e.g. used by latin and indic scripts), right-to-left (e.g. used by hebrew or arabic scripts), bidirectional (used when mixing left-to-right and right-to-left scripts) and vertical (e.g. used by some asian scripts). ...
Introducing the CSS Cascade - CSS: Cascading Style Sheets
Web › CSS › Cascade
px the last one is ignored (on a screen), and the first two have the same selector, hence the same specificity. therefore, it is the last one that is then selected: margin-left: 3px note that the declaration defined in the user css, though having a greater specificity, is not chosen as the cascade algorithm is applied before the specificity algorithm. specifications specification status comment css cascading and inheritance level 4 candidate recommendation added the revert keyword, which allows rolling a property back a cascade level. css cascading and inheritance level 3 candidate recommendation removed the override cascade origin, as it was never used in a w3c standard. css level 2 (revision 1)the definition of 'the cascade' in tha...
Child combinator - CSS: Cascading Style Sheets
e number of "hops" up the dom. syntax selector1 > selector2 { style properties } examples css span { background-color: white; } div > span { background-color: dodgerblue; } html <div> <span>span #1, in the div. <span>span #2, in the span that's in the div.</span> </span> </div> <span>span #3, not in the div at all.</span> result specifications specification status comment selectors level 4the definition of 'child combinator' in that specification. working draft selectors level 3the definition of 'child combinators' in that specification. recommendation no change. css level 2 (revision 1)the definition of 'child selectors' in that specification. recommendation initial definition. ...
Class selectors - CSS: Cascading Style Sheets
working draft no changes selectors level 3the definition of 'class selectors' in that specification. recommendation css level 2 (revision 1)the definition of 'child selectors' in that specification. recommendation css level 1the definition of 'child se...
Column combinator - CSS: Cascading Style Sheets
working draft initial definition. ...
Compositing and Blending - CSS: Cascading Style Sheets
compositing and blending is a css module that defines how shapes of different elements are combined into a single image. ...
Descendant combinator - CSS: Cascading Style Sheets
working draft selectors level 3the definition of 'descendant combinator' in that specification. recommendation css level 2 (revision 1)the definition of 'descendant selectors' in that specification. recommendation css level 1the definition of 'c...
Filter Effects - CSS: Cascading Style Sheets
filter effects is a module of css that defines a way of processing an element’s rendering before it is displayed in the document. reference properties backdrop-filter filter data types <filter-function> specifications specification status comment filter effects module level 1the definition of 'filter' in that specification. working draft initial definition. ...
General sibling combinator - CSS: Cascading Style Sheets
working draft renames it the "subsequent-sibling" combinator. selectors level 3the definition of 'general sibling combinator' in that specification. recommendation initial definition. ...
ID selectors - CSS: Cascading Style Sheets
working draft selectors level 3the definition of 'id selectors' in that specification. recommendation css level 2 (revision 1)the definition of 'id selectors' in that specification. recommendation css level 1the definition of 'id selectors' in that speci...
Testing media queries programmatically - CSS: Cascading Style Sheets
rt is not currently in portrait orientation, therefore landscape */ } receiving query notifications if you need to be aware of changes to the evaluated result of the query on an ongoing basis, it's more efficient to register a listener than to poll the query's result. to do this, call the addlistener() method on the mediaquerylist object, with a callback function to invoke when the media query status changes (e.g., the media query test goes from true to false): // create the query list. const mediaquerylist = window.matchmedia("(orientation: portrait)"); // define a callback function for the event listener. function handleorientationchange(mql) { // ... } // run the orientation change handler once. handleorientationchange(mediaquerylist); // add the callback function as a listener to th...
Media queries - CSS: Cascading Style Sheets
ribes how to use media queries in your javascript code to determine the state of a device, and to set up listeners that notify your code when the results of media queries change (such as when the user rotates the screen or resizes the browser). ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
adiomenuitem resizer resizerpanel scale-horizontal scalethumb-horizontal scalethumb-vertical scale-vertical scrollbarbutton-down scrollbarbutton-left scrollbarbutton-right scrollbarbutton-up scrollbar-small scrollbarthumb-horizontal scrollbarthumb-vertical scrollbartrack-horizontal scrollbartrack-vertical separator spinner spinner-downbutton spinner-textfield spinner-upbutton statusbar statusbarpanel tab tabpanels tab-scroll-arrow-back tab-scroll-arrow-forward textfield textfield-multiline toolbar toolbarbutton-dropdown toolbox tooltip treeheadercell treeheadersortarrow treeitem treetwisty treetwistyopen treeview window background-image gradients -moz-linear-gradient -moz-radial-gradient elements -moz-element ...
Pseudo-elements - CSS: Cascading Style Sheets
...
Selector list - CSS: Cascading Style Sheets
e :is() selector, which simply ignores invalid selectors in its arguments, but at the cost of all selectors having the same specificity, because of how :is() calculates specificity. h1 { font-family: sans-serif } h2:maybe-unsupported { font-family: sans-serif } h3 { font-family: sans-serif } :is(h1, h2:maybe-unsupported, h3) { font-family: sans-serif } specifications specification status comment selectors level 4the definition of 'selector lists' in that specification. working draft renamed to "selector list" css level 1the definition of 'grouping' in that specification. recommendation initial definition ...
Specificity - CSS: Cascading Style Sheets
ty of the inherited rule. this css ... #parent { color: green; } h1 { color: purple; } ... with the following html ... <html> <body id="parent"> <h1>here is a title!</h1> </body> </html> ... will also render as: this is because the h1 selector targets the element specifically, but the green selector is only inherited from its parent. specifications specification status comment selectors level 4the definition of 'calculating a selector's specificity' in that specification. working draft add the specificity adjustment selector :where(). selectors level 3the definition of 'calculating a selector's specificity' in that specification. recommendation add pseudo-elements. css level 2 (revision 1)the definition of 'calculat...
Type selectors - CSS: Cascading Style Sheets
e. in other words, it selects all elements of the given type within a document. /* all <a> elements. */ a { color: red; } syntax element { style properties } examples css span { background-color: skyblue; } html <span>here's a span with some text.</span> <p>here's a p with some text.</p> <span>here's a span with more text.</span> result specifications specification status comment selectors level 4the definition of 'type (tag name) selector' in that specification. working draft no changes selectors level 3the definition of 'type selectors' in that specification. recommendation no changes css level 2 (revision 1)the definition of 'type selectors' in that specification. recommendation css level 1the defini...
Universal selectors - CSS: Cascading Style Sheets
1px solid blue; } .floating { float: left } /* automatically clear the next sibling after a floating element */ .floating + * { clear: left; } html <p class="warning"> <span lang="en-us">a green span</span> in a red paragraph. </p> <p id="maincontent" lang="en-gb"> <span class="warning">a red span</span> in a green paragraph. </p> result specifications specification status comment selectors level 4the definition of 'universal selector' in that specification. working draft no changes selectors level 3the definition of 'universal selector' in that specification. recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-elements css level 2 (revision 1)the defini...
Value definition syntax - CSS: Cascading Style Sheets
candidate recommendation adds the hash mark multiplier. css level 2 (revision 1)the definition of 'value definition syntax' in that specification. recommendation adds the double ampersand combinator. css level 1the definition of 'value definition ...
Actual value - CSS: Cascading Style Sheets
alue. next, the computed value is calculated according to the specification (for example, a span with position: absolute will have its computed display changed to block). then, layout is calculated, resulting in the used value. finally, the used value is transformed according to the limitations of the local environment, resulting in the actual value. specifications specification status comment css level 2 (revision 1)the definition of 'actual value' in that specification. recommendation initial definition. ...
align-content - CSS: Cascading Style Sheets
working draft adds the [ first | last ]? baseline, start, end, left, right, unsafe | safe values. css flexible box layout modulethe definition of 'align-content' in that specification. candidate recommendation initial definition initial valuenormalapplies to...
align-items - CSS: Cascading Style Sheets
working draft update to latest syntax definitions. css flexible box layout modulethe definition of 'align-items' in that specification. candidate recommendation initial definition ...
align-self - CSS: Cascading Style Sheets
working draft update to latest syntax definitions. css flexible box layout modulethe definition of 'align-self' in that specification. candidate recommendation initial definition. ...
all - CSS: Cascading Style Sheets
Web › CSS › all
candidate recommendation added the revert value. css cascading and inheritance level 3the definition of 'all' in that specification. candidate recommendation initial definition. ...
<alpha-value> - CSS: Cascading Style Sheets
working draft no significant change. css color module level 3the definition of '<alpha-value>' in that specification. recommendation introduces <alpha-value> along with rgba() and hsla() functional notations. ...
<angle-percentage> - CSS: Cascading Style Sheets
e that can be either a <angle> or a <percentage>. syntax refer to the documentation for <angle> and <percentage> for details of the individual syntaxes allowed by this type. use in calc() where an <angle-percentage> is specified as an allowable type, this means that the percentage resolves to an angle and therefore can be used in a calc() expression. specifications specification status comment css values and units module level 4the definition of '<angle-percentage>' in that specification. editor's draft css values and units module level 3the definition of '<angle-percentage>' in that specification. candidate recommendation defines <angle-percentage>. adds calc() ...
<angle> - CSS: Cascading Style Sheets
Web › CSS › angle
editor's draft css values and units module level 3the definition of '<angle>' in that specification. candidate recommendation initial definition. ...
animation-delay - CSS: Cascading Style Sheets
me property in different ways depending on how many there are. for more information, see setting multiple animation property values. formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-delay' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefox...
animation-direction - CSS: Cascading Style Sheets
tion property values. formal definition initial valuenormalapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-direction>#where <single-animation-direction> = normal | reverse | alternate | alternate-reverse examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-direction' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefi...
animation-duration - CSS: Cascading Style Sheets
me property in different ways depending on how many there are. for more information, see setting multiple animation property values. formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-duration' in that specification. working draft initial definition. ...
animation-fill-mode - CSS: Cascading Style Sheets
working draft initial definition. ...
animation-iteration-count - CSS: Cascading Style Sheets
setting multiple animation property values. formal definition initial value1applies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-iteration-count>#where <single-animation-iteration-count> = infinite | <number> examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-iteration-count' in that specification. working draft initial definition. ...
animation-name - CSS: Cascading Style Sheets
nformation, see setting multiple animation property values. formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | <keyframes-name> ]#where <keyframes-name> = <custom-ident> | <string> examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-name' in that specification. working draft initial definition. ...
animation-play-state - CSS: Cascading Style Sheets
n, see setting multiple animation property values. formal definition initial valuerunningapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-play-state>#where <single-animation-play-state> = running | paused examples see css animations for examples. specifications specification status comment css animationsthe definition of 'animation-play-state' in that specification. working draft initial definition. ...
animation-timing-function - CSS: Cascading Style Sheets
working draft initial definition. ...
animation - CSS: Cascading Style Sheets
Web › CSS › animation
working draft initial definition. ...
aspect-ratio - CSS: Cascading Style Sheets
eplaced elements and other related elements that accept width and height attributes. this appears in the browser's internal ua stylesheet. chrome is also shipping this feature. in firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } specifications specification status comment css box sizing module level 4the definition of 'aspect-ratio' in that specification. editor's draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechrom...
attr() - CSS: Cascading Style Sheets
Web › CSS › attr
editor's draft changed it to work like var(). property values involving attr() are valid at parse time, and the validation of the attribute value is deferred to computed value time. css values and units module level 3the definition of 'attr()' in that specification. candi...
backdrop-filter - CSS: Cascading Style Sheets
editor's draft initial definition. ...
backface-visibility - CSS: Cascading Style Sheets
editor's draft initial definition. ...
background-attachment - CSS: Cascading Style Sheets
candidate recommendation the shorthand property has been extended to support multiple backgrounds and the local value. css level 2 (revision 1)the definition of 'background-attachment' in that specification. recommendation no significant change. ...
background-blend-mode - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
background-clip - CSS: Cascading Style Sheets
candidate recommendation initial definition. css backgrounds and borders module level 4the definition of 'background-clip' in that specification. editor's draft add text value. ...
background-image - CSS: Cascading Style Sheets
candidate recommendation from css2 revision 1, the property has been extended to support multiple backgrounds and any <image> css data type. css level 2 (revision 1)the definition of 'background-image' in that specification. recommendation from css1, t...
background-origin - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
background-position-x - CSS: Cascading Style Sheets
s separately. html <div></div> css div { width: 300px; height: 300px; background-color: skyblue; background-image: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png); background-repeat: no-repeat; background-position-x: center; background-position-y: bottom 10px; } result specifications specification status comment css backgrounds and borders module level 4the definition of 'background-position-x' in that specification. editor's draft initial specification of longhand sub-properties of background-position to match longstanding implementations. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the...
background-position-y - CSS: Cascading Style Sheets
s separately. html <div></div> css div { width: 300px; height: 300px; background-color: skyblue; background-image: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png); background-repeat: no-repeat; background-position-x: center; background-position-y: bottom 10px; } result specifications specification status comment css backgrounds and borders module level 4the definition of 'background-position-y' in that specification. editor's draft initial specification of longhand sub-properties of background-position to match longstanding implementations. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the...
background-position - CSS: Cascading Style Sheets
atched with the corresponding position, from first specified to last. */ .examplethree { background-image: url("https://mdn.mozillademos.org/files/11987/startransparent.gif"), url("https://mdn.mozillademos.org/files/7693/catfront.png"); background-position: 0px 0px, right 3em bottom 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-position' in that specification. candidate recommendation adds support for multiple backgrounds and the four-value syntax. modifies the percentage definition to match implementations. css level 2 (revision 1)the definition of 'background-position' in that specification. recommendation...
background-repeat - CSS: Cascading Style Sheets
background-image: url(https://mdn.mozillademos.org/files/12005/starsolid.gif), url(https://developer.cdn.mozilla.net/media/redesign/img/favicon32.png); background-repeat: repeat-x, repeat-y; height: 144px; } result in this example, each list item is matched with a different value of background-repeat. specifications specification status comment css backgrounds and borders module level 3the definition of 'background-repeat' in that specification. candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline-level elements by precisely defin...
background-size - CSS: Cascading Style Sheets
s specified, but with relative lengths converted into absolute lengthsanimation typerepeatable list of simple list of length, percentage, or calc formal syntax <bg-size>#where <bg-size> = [ <length-percentage> | auto ]{1,2} | cover | containwhere <length-percentage> = <length> | <percentage> examples please see scaling background images for examples. specifications specification status comment css backgrounds and borders module level 3the definition of 'background-size' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull ...
background - CSS: Cascading Style Sheets
candidate recommendation the shorthand property has been extended to support multiple backgrounds and the new background-size, background-origin and background-clip properties. css level 2 (revision 1)the definition of 'background' in that specification. recomm...
<basic-shape> - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
<blend-mode> - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
block-size - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-end-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-end-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-end-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-start-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-start-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-start-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-block - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-bottom-color - CSS: Cascading Style Sheets
syntax <'border-top-color'> examples a simple div with a border html <div class="mybox"> <p>this is a box with a border around it. note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-bottom-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-color' in that specification. candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed. css level 2 (revision 1)the definition of 'border-bottom-color' in that specification. recommen...
border-bottom-left-radius - CSS: Cascading Style Sheets
the box is not a square: an arc of ellipse is used as the border div { border-bottom-left-radius: 40%; } . the background color is clipped at the border div { border-bottom-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-left-radius' in that specification. candidate recommendation initial definition ...
border-bottom-right-radius - CSS: Cascading Style Sheets
the box is not a square: an arc of ellipse is used as the border div { border-bottom-right-radius: 40%; } . the background color is clipped at the border div { border-bottom-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-right-radius' in that specification. candidate recommendation initial definition ...
border-bottom-style - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-bottom-style' in that specification. recommendation initial definition. ...
border-bottom-width - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-bottom-width' in that specification. recommendation no significant change. css level 1the definition of 'border-bottom-width' in that specific...
border-bottom - CSS: Cascading Style Sheets
tage>, <alpha-value>? )where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a bottom border html <div> this box has a border on the bottom side. </div> css div { border-bottom: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom' in that specification. candidate recommendation no direct changes, though the modification of values for the border-bottom-color do apply to it. css level 2 (revision 1)the definition of 'border-bottom' in that specification. recommendation no significant changes. css ...
border-collapse - CSS: Cascading Style Sheets
recommendation initial definition ...
border-color - CSS: Cascading Style Sheets
css backgrounds and borders module level 3the definition of 'border-color' in that specification. candidate recommendation the transparent keyword has been removed as it is now a part of the <color> data type. css level 2 (revision 1)the definition of 'border-c...
border-end-end-radius - CSS: Cascading Style Sheets
editor's draft initial definition. ...
border-end-start-radius - CSS: Cascading Style Sheets
editor's draft initial definition. ...
border-image-outset - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
border-image-repeat - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
border-image-slice - CSS: Cascading Style Sheets
candidate recommendation initial defintion ...
border-image-source - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
border-image-width - CSS: Cascading Style Sheets
vero eos et accusam et justo duo dolores et ea rebum. stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> css p { border: 20px solid; border-image: url("/static/external/21/214842819586a8dd293c17b38d0fd0e26430146a86dd04294a53ecaeeea7d0e2.png") 30 round; border-image-width: 16px; padding: 40px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-width' in that specification. candidate recommendation initial definition ...
border-image - CSS: Cascading Style Sheets
candidate recommendation initial definition initial valueas each of the properties of the shorthand:border-image-source: noneborder-image-slice: 100%border-image-width: 1border-image-outset: 0border-image-repeat: stretchapplies toall elements, except internal tabl...
border-inline-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-end-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-end-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-end-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-start-color - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-start-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-start-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-style - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline-width - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-inline - CSS: Cascading Style Sheets
editor's draft initial definition ...
border-left-color - CSS: Cascading Style Sheets
age><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>this is a box with a border around it. note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-left-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-color' in that specification. candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed. css level 2 (revision 1)the definition of 'border-left-color' in that specification. recommendati...
border-left-style - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-left-style' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated fro...
border-left-width - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-left-width' in that specification. recommendation no significant change. css level 1the definition of 'border-left-width' in that specification.
border-left - CSS: Cascading Style Sheets
percentage>, <alpha-value>? )where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a left border html <div> this box has a border on the left side. </div> css div { border-left: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left' in that specification. candidate recommendation no direct changes, though the modification of values for the border-left-color do apply to it. css level 2 (revision 1)the definition of 'border-left' in that specification. recommendation no significant changes. css level ...
border-radius - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
border-right-color - CSS: Cascading Style Sheets
ge><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>this is a box with a border around it. note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-right-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-color' in that specification. candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed. css level 2 (revision 1)the definition of 'border-right-color' in that specification. recommenda...
border-right-style - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-right-style' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated f...
border-right-width - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-right-width' in that specification. recommendation no significant change. css level 1the definition of 'border-right-width' in that specificati...
border-right - CSS: Cascading Style Sheets
<alpha-value>? )where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a right border to a div html <div> this box has a border on the right side. </div> css div { border-right: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right' in that specification. candidate recommendation no direct changes, though the modification of values for the border-right-color do apply to it. css level 2 (revision 1)the definition of 'border-right' in that specification. recommendation no significant changes. css lev...
border-spacing - CSS: Cascading Style Sheets
recommendation initial definition. ...
border-start-end-radius - CSS: Cascading Style Sheets
editor's draft initial definition. ...
border-start-start-radius - CSS: Cascading Style Sheets
editor's draft initial definition. ...
border-style - CSS: Cascading Style Sheets
candidate recommendation no change. css level 2 (revision 1)the definition of 'border-style' in that specification. recommendation adds hidden keyword value. css level 1the definition of 'border-style' in that specification. recommendation i...
border-top-color - CSS: Cascading Style Sheets
percentage><hue> = <number> | <angle> examples a simple div with a border html <div class="mybox"> <p>this is a box with a border around it. note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-top-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-color' in that specification. candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed. css level 2 (revision 1)the definition of 'border-top-color' in that specification. recommendation...
border-top-left-radius - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
border-top-right-radius - CSS: Cascading Style Sheets
. the box is not a square: an arc of ellipse is used as the border div { border-top-right-radius: 40%; } the background color is clipped at the border div { border-top-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-right-radius' in that specification. candidate recommendation initial definition ...
border-top-style - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-top-style' in that specification. recommendation initial definition. initial valuenoneapplies toall elements. it also applies to ::first-letter.inh...
border-top-width - CSS: Cascading Style Sheets
candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-top-width' in that specification. recommendation no significant change. css level 1the definition of 'border-top-width' in that specification. ...
border-top - CSS: Cascading Style Sheets
, <percentage>, <alpha-value>? )where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples applying a top border html <div> this box has a border on the top side. </div> css div { border-top: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top' in that specification. candidate recommendation no direct changes, though the modification of values for the border-top-color do apply to it. css level 2 (revision 1)the definition of 'border-top' in that specification. recommendation no significant changes. css level 1th...
border-width - CSS: Cascading Style Sheets
candidate recommendation no direct change; the <length> css data type extension has an effect on this property. css level 2 (revision 1)the definition of 'border-width' in that specification. recommendation added the constraint that values' meaning must be...
border - CSS: Cascading Style Sheets
Web › CSS › border
candidate recommendation removes specific support for transparent, as it is now a valid <color>; this has no practical impact. though it cannot be set to a custom value using the shorthand, border now resets border-image to its initial value (none). css level 2 (r...
bottom - CSS: Cascading Style Sheets
Web › CSS › bottom
working draft adds behavior for sticky positioning. css level 2 (revision 1)the definition of 'bottom' in that specification. recommendation initial definition. ...
box-decoration-break - CSS: Cascading Style Sheets
lock into three columns results in: note that stacking these pieces vertically will result in the non-fragmented rendering. now, the same example but styled with box-decoration-break: clone results in: note here that each fragment has an identical replicated border, box-shadow, and background. you can try the block examples above in your browser. specifications specification status comment css fragmentation module level 3the definition of 'box-decoration-break' in that specification. candidate recommendation initial definition. ...
box-shadow - CSS: Cascading Style Sheets
dded a margin the size of the widest box-shadow to ensure the shadow doesn't overlap adjacent elements or go beyond the border of the containing box. a box-shadow does not impact box model dimensions. html <div><p>hello world</p></div> css p { box-shadow: 0 0 0 2em #f4aab9, 0 0 0 4em #66ccff; margin: 4em; padding:1em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'box-shadow' in that specification. candidate recommendation initial definition ...
box-sizing - CSS: Cascading Style Sheets
recommendation initial definition. ...
break-after - CSS: Cascading Style Sheets
candidate recommendation adds the recto and verso keywords. changes the media type of this property from paged to visual. defines the breaking algorithm with different kinds of breaks. css regions module level 1the definition of 'break-after' in that specification. work...
break-before - CSS: Cascading Style Sheets
candidate recommendation adds the recto and verso keywords. changes the media type of this property from paged to visual. defines the breaking algorithm with different kinds of breaks. css regions module level 1the definition of 'break-before' in that specification. wo...
break-inside - CSS: Cascading Style Sheets
candidate recommendation no change. css regions module level 1the definition of 'break-inside' in that specification. working draft extends the property to handle region breaks. css multi-column layout modulethe definition of 'break-inside' in that specific...
calc() - CSS: Cascading Style Sheets
Web › CSS › calc
candidate recommendation initial definition ...
caption-side - CSS: Cascading Style Sheets
editor's draft defines the top and bottom values as relative to the writing-mode value. css level 2 (revision 1)the definition of 'caption-side' in that specification. recommendation initial definition. browser compatibility the compatibility table...
caret-color - CSS: Cascading Style Sheets
recommendation initial definition. ...
clamp() - CSS: Cascading Style Sheets
Web › CSS › clamp
eptos himenaeos. nam non felis quis sem lobortis sodales vel id libero. phasellus sit amet placerat lorem. </p> css html { font-family: sans-serif; } body { margin: 0 auto; width: min(1000px, calc(70% + 100px)); } h1 { letter-spacing: 2px; font-size: clamp(1.8rem, 2.5vw, 2.8rem); } p { line-height: 1.5; font-size: max(1.2rem, 1.2vw); } specifications specification status comment css values and units module level 4the definition of 'clamp()' in that specification. editor's draft initial definition. ...
clear - CSS: Cascading Style Sheets
Web › CSS › clear
editor's draft adds the values inline-start and inline-end css level 2 (revision 1)the definition of 'clear' in that specification. recommendation no significant changes, though details are clarified. css level 1the definition of 'clear' in that...
clip-path - CSS: Cascading Style Sheets
Web › CSS › clip-path
candidate recommendation extends its application to html elements. the clip-path property replaces the deprecated clip property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'clip-path' in that specification. recommendation initial definition (applies...
clip - CSS: Cascading Style Sheets
Web › CSS › clip
candidate recommendation deprecates clip property, suggests clip-path as replacement. css level 2 (revision 1)the definition of 'clip' in that specification. recommendation initial definition. ...
color-adjust - CSS: Cascading Style Sheets
editor's draft initial definition. ...
color - CSS: Cascading Style Sheets
Web › CSS › color
working draft adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functions. allows alpha values in rgb() and hsl(), turning rgba() and hsla() into (deprecated) aliases for them. adds color keyword rebeccapurple. adds 4- and 8-digit hex color values, where the last digit(s) ...
<color> - CSS: Cascading Style Sheets
css...
column-count - CSS: Cascading Style Sheets
as specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-box"> this is a bunch of text split into three columns using the css `column-count` property. the text is equally distributed over the columns. </p> css .content-box { column-count: 3; } result specifications specification status comment css multi-column layout modulethe definition of 'column-count' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechr...
column-fill - CSS: Cascading Style Sheets
ance-all examples splitting text evenly across columns html <p class="content-box"> this is a bunch of text split into multiple columns. the css `column-fill` property is used to spread the contents evenly across all the columns. </p> css .content-box { column-count: 4; column-rule: 1px solid black; column-fill: balance; } result specifications specification status comment css multi-column layout modulethe definition of 'column-fill' in that specification. working draft initial definition. ...
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
v { border: 1px solid green; background-color: lime; } result multi-column layout html <p class="content-box"> this is some multi-column text with a 40px column gap created with the css `column-gap` property. don't you think that's fun and exciting? i sure do! </p> css .content-box { column-count: 3; column-gap: 40px; } result specifications specification status comment css box alignment module level 3the definition of 'column-gap' in that specification. working draft applies to grid and flexbox css grid layoutthe definition of 'column-gap' in that specification. candidate recommendation specifies how this property affects grid layouts css multi-column layout modulethe definition of 'column-gap' in that speci...
column-rule-color - CSS: Cascading Style Sheets
| <angle> examples setting a blue column rule html <p>this is a bunch of text split into three columns. the `column-rule-color` property is used to change the color of the line that is drawn between columns. don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-color: blue; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-color' in that specification. working draft initial definition. ...
column-rule-style - CSS: Cascading Style Sheets
te formal syntax <'border-style'> examples setting a dashed column rule html <p>this is a bunch of text split into three columns. the `column-rule-style` property is used to change the style of the line that is drawn between columns. don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: dashed; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-style' in that specification. working draft initial definition. ...
column-rule-width - CSS: Cascading Style Sheets
-width'> examples setting a thick column rule html <p>this is a bunch of text split into three columns. the `column-rule-width` property is used to change the width of the line that is drawn between columns. don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-width: thick; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-width' in that specification. working draft initial definition. ...
column-rule - CSS: Cascading Style Sheets
e 2 html <p class="content-box"> this is a bunch of text split into three columns. take note of how the `column-rule` property is used to adjust the style, width, and color of the rule that appears between the columns. </p> css .content-box { padding: 0.3em; background: #ff7; column-count: 3; column-rule: inset 2px #33f; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule' in that specification. working draft initial definition. ...
column-span - CSS: Cascading Style Sheets
is a bunch of text split into three columns using the css `columns` property. the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property. the text is equally distributed over the columns.</p> </article> css article { columns: 3; } h2 { column-span: all; } result specifications specification status comment css multi-column layout modulethe definition of 'column-span' in that specification. working draft initial definition. ...
column-width - CSS: Cascading Style Sheets
class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </p> css .content-box { column-width: 100px; } result specifications specification status comment css writing modes level 4the definition of 'column-width' in that specification. candidate recommendation adds intrinsic sizes via the keywords min-content, max-content, fill-available, and fit-content. css multi-column layout modulethe definition of 'column-width' in that specification. working draft initial definition. ...
columns - CSS: Cascading Style Sheets
Web › CSS › columns
working draft initial definition. ...
Computed value - CSS: Cascading Style Sheets
y, unitless numbers specified on the line-height property become the computed value, as specified. the relative values that remain in the computed value become absolute when the used value is determined. note: the getcomputedstyle() dom api returns the resolved value, which may either be the computed value or the used value, depending on the property. specifications specification status comment css level 2 (revision 2)the definition of 'computed-value' in that specification. working draft no change. css level 2 (revision 1)the definition of 'computed value' in that specification. recommendation initial definition. ...
conic-gradient() - CSS: Cascading Style Sheets
working draft ...
contain - CSS: Cascading Style Sheets
Web › CSS › contain
recommendation initial definition ...
content - CSS: Cascading Style Sheets
Web › CSS › content
tent added with ::before or ::after will not be generated as the contents of the element have been replaced. html <div id="replaced">mozilla</div> css #replaced { content: url("https://mdn.mozillademos.org/files/12668/mdn.svg"); } #replaced::after { /* will not show if element replacement is supported */ content: " (" attr(id) ")"; } result specifications specification status comment css generated content module level 3the definition of 'content' in that specification. working draft adds support for alt-text css level 2 (revision 1)the definition of 'content' in that specification. recommendation initial definition ...
counter-increment - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'counter-increment' in that specification. recommendation initial definition. ...
counter-reset - CSS: Cascading Style Sheets
specific rule. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>? ]+ | none examples resetting named counters h1 { counter-reset: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-reset' in that specification. working draft no change. css level 2 (revision 1)the definition of 'counter-reset' in that specification. recommendation initial definition. ...
counter-set - CSS: Cascading Style Sheets
ss specific rule. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>? ]+ | none examples setting named counters h1 { counter-set: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-set' in that specification. working draft initial definition. ...
counter() - CSS: Cascading Style Sheets
Web › CSS › counter
working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification. recommendation initial definition ...
counters() - CSS: Cascading Style Sheets
Web › CSS › counters
working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification. recommendation initial definition ...
cross-fade() - CSS: Cascading Style Sheets
working draft initial definition ...
<custom-ident> - CSS: Cascading Style Sheets
start with a decimal digit. -12rad it must not start with a dash followed by a decimal digit. bili.bob only alphanumeric characters, _, and - needn't be escaped. --toto it must not start with two dashes. this would be a custom property. 'bilibob' this would be a <string>. "bilibob" this would be a <string>. specifications specification status comment css values and units module level 4the definition of '<custom-ident>' in that specification. editor's draft css will change module level 1the definition of '<custom-ident> for will-change' in that specification. candidate recommendation defines which values are excluded for will-change. css counter styles level 3the definition of '<custom-ide...
<dimension> - CSS: Cascading Style Sheets
Web › CSS › dimension
1rem 1 rem 1.2pt 1.2 points 2200ms 2200 milliseconds 5s 5 seconds 200hz 200 hertz 200hz 200 hertz (values are case insensitive) invalid dimensions 12 px the unit must come immediately after the number. 12"px" units are identifiers and therefore unquoted. 3sec the seconds unit is abbreviated "s" not "sec". specifications specification status comment css values and units module level 4the definition of '<dimension>' in that specification. editor's draft adds cap, ic, lh, rlh, vi, vb css values and units module level 3the definition of '<dimension>' in that specification. candidate recommendation adds ch, rem, vw, vw, vmin, vmax, q css level 2 (revision 1)the definition of '<dimension>' in ...
direction - CSS: Cascading Style Sheets
Web › CSS › direction
for the direction property to have any effect on inline-level elements, the unicode-bidi property's value must be embed or override. formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | rtl examples setting right-to-left direction blockquote { direction: rtl; } specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification. proposed recommendation no change. css level 2 (revision 1)the definition of 'direction' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to c...
<display-box> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-inside> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-internal> - CSS: Cascading Style Sheets
able layout. html <main> <div> <label for="name">name</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">age</label> <input type="text" id="age" name="age"> </div> </main> css main { display: table; } div { display: table-row; } label, input { display: table-cell; margin: 5px; } result specifications specification status css display module level 3the definition of 'display-internal' in that specification. candidate recommendation ...
<display-legacy> - CSS: Cascading Style Sheets
ex. html <div class="container"> <div>flex item</div> <div>flex item</div> </div> not a flex item css .container { display: inline-flex; } result in the new syntax the inline flex container would be created using two values, inline for the outer display type, and flex for the inner display type. .container { display: inline flex; } specifications specification status css display module level 3the definition of 'display-legacy' in that specification. candidate recommendation ...
<display-listitem> - CSS: Cascading Style Sheets
browsers that support the two-value syntax, if no inner value is specified it will default to flow. if no outer value is specified, the principal box will have an outer display type of block. examples html <div class="fake-list">i will display as a list item</div> css .fake-list { display: list-item; list-style-position: inside; } result specifications specification status css display module level 3the definition of 'display-listitem' in that specification. candidate recommendation ...
<display-outside> - CSS: Cascading Style Sheets
e normal flow layout. examples in the following example, span elements (normally displayed as inline elements) are set to display: block and so break onto new lines and expand to fill their container in the inline dimension. html <span>span 1</span> <span>span 2</span> css span { display: block; border: 1px solid rebeccapurple; } result specifications specification status css display module level 3the definition of 'display-outside' in that specification. candidate recommendation ...
display - CSS: Cascading Style Sheets
Web › CSS › display
l('.container'); const select = document.queryselector('select'); function updatedisplay() { articles.foreach((article) => { article.style.display = select.value; }); } select.addeventlistener('change', updatedisplay); updatedisplay(); result note: you can find more examples in the pages for each separate display data type, linked above. specifications specification status comment css display module level 3the definition of 'display' in that specification. candidate recommendation added run-in, flow, flow-root, contents, and multi-keyword values. css ruby layout module level 1the definition of 'display' in that specification. working draft added ruby, ruby-base, ruby-text, ruby-base-container, and ruby-text-container. c...
<easing-function> - CSS: Cascading Style Sheets
steps(2, start) /* the second parameter is optional. */ steps(2) these easing function are invalid: /* the first parameter must be an <integer> and cannot be a real value, even if it is equal to one. */ steps(2.0, jump-end) /* the amount of steps must be non-negative. */ steps(-3, start) /* there must be at least one step.*/ steps(0, jump-none) specifications specification status comment css animationsthe definition of '<timing-function>' in that specification. working draft defines <single-timing-function> as a synonym for <single-transition-timing-function> of the css transitions module. css timing functions level 1the definition of '<easing-function>' in that specification. working draft initial definition. ...
element() - CSS: Cascading Style Sheets
Web › CSS › element
rn as its background. this demonstrates that you can use arbitrary elements as background, but doesn't necessarily demonstrate good design practices. <div style="width:400px; height:100px; background:-moz-element(#mybackground2);"> </div> <div style="overflow:hidden; height:0;"> <button id="mybackground2" type="button">evil button!</button> </div> specifications specification status comment css images module level 4the definition of 'using elements as images: the element() notation' in that specification. working draft deferred from css3 images. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send...
empty-cells - CSS: Cascading Style Sheets
recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedge...
env() - CSS: Cascading Style Sheets
Web › CSS › env
editor's draft initial definition. ...
blur() - CSS: Cascading Style Sheets
i.e., how many pixels on the screen blend into each other; thus, a larger value will create more blur. a value of 0 leaves the input unchanged. the lacuna value for interpolation is 0. examples setting a blur with pixels and with rem blur(0) /* no effect */ blur(8px) /* blur with 8px radius */ blur(1.17rem) /* blur with 1.17rem radius */ specifications specification status filter effects module level 1the definition of 'blur()' in that specification. working draft ...
brightness() - CSS: Cascading Style Sheets
f 0% will create an image that is completely black, while a value of 100% leaves the input unchanged. the lacuna value for interpolation is 1. examples setting brightness using numbers and percentages brightness(0%) /* completely black */ brightness(0.4) /* 40% brightness */ brightness(1) /* no effect */ brightness(200%) /* double brightness */ specifications specification status filter effects module level 1the definition of 'brightness()' in that specification. working draft ...
contrast() - CSS: Cascading Style Sheets
t. a value of 0% will create an image that is completely gray, while a value of 100% leaves the input unchanged. the lacuna value for interpolation is 1. examples setting contrast using numbers and percentages contrast(0) /* completely gray */ contrast(65%) /* 65% contrast */ contrast(1) /* no effect */ contrast(200%) /* double contrast */ specifications specification status filter effects module level 1the definition of 'contrast()' in that specification. working draft ...
drop-shadow() - CSS: Cascading Style Sheets
hadow, specified as a <color>. if unspecified, the value of the color property is used. examples setting a drop shadow using pixel offsets and blur radius /* black shadow with 10px blur */ drop-shadow(16px 16px 10px black) setting a drop shadow using rem offsets and blur radius /* reddish shadow with 1rem blur */ drop-shadow(.5rem .5rem 1rem #e23) specifications specification status filter effects module level 1the definition of 'drop-shadow()' in that specification. working draft ...
grayscale() - CSS: Cascading Style Sheets
. a value of 100% is completely grayscale, while a value of 0% leaves the input unchanged. values between 0% and 100% are linear multipliers on the effect. default value when omitted is 1. the initial value for interpolation is 0. examples grayscale(0) /* no effect */ grayscale(.7) /* 70% grayscale */ grayscale(100%) /* completely grayscale */ specifications specification status filter effects module level 1the definition of 'grayscale()' in that specification. working draft ...
hue-rotate() - CSS: Cascading Style Sheets
e. the lacuna value for interpolation is 0. there is no minimum or maximum value; hue-rotate(ndeg) evaluates to n modulo 360. examples hue-rotate(-90deg) /* same as 270deg rotation */ hue-rotate(0deg) /* no effect */ hue-rotate(90deg) /* 90deg rotation */ hue-rotate(.5turn) /* 180deg rotation */ hue-rotate(405deg) /* same as 45deg rotation */ specifications specification status filter effects module level 1the definition of 'hue-rotate()' in that specification. working draft ...
invert() - CSS: Cascading Style Sheets
on, specified as a <number> or a <percentage>. a value of 100% is completely inverted, while a value of 0% leaves the input unchanged. values between 0% and 100% are linear multipliers on the effect. the lacuna value for interpolation is 0. examples invert(0) /* no effect */ invert(.6) /* 60% inversion */ invert(100%) /* completely inverted */ specifications specification status filter effects module level 1the definition of 'invert()' in that specification. working draft ...
opacity() - CSS: Cascading Style Sheets
ified as a <number> or a <percentage>. a value of 0% is completely transparent, while a value of 100% leaves the input unchanged. values between 0% and 100% are linear multipliers on the effect. the lacuna value for interpolation is 1. examples opacity(0%) /* completely transparent */ opacity(50%) /* 50% transparent */ opacity(1) /* no effect */ specifications specification status filter effects module level 1the definition of 'opacity()' in that specification. working draft ...
saturate() - CSS: Cascading Style Sheets
ates the image, while a value over 100% super-saturates it. a value of 0% is completely unsaturated, while a value of 100% leaves the input unchanged. the lacuna value for interpolation is 1. examples saturate(0) /* completely unsaturated */ saturate(.4) /* 40% saturated */ saturate(100%) /* no effect */ saturate(200%) /* double saturation */ specifications specification status filter effects module level 1the definition of 'saturate()' in that specification. working draft ...
sepia() - CSS: Cascading Style Sheets
the conversion, specified as a <number> or a <percentage>. a value of 100% is completely sepia, while a value of 0% leaves the input unchanged. values between 0% and 100% are linear multipliers on the effect. the lacuna value for interpolation is 0. examples sepia(0) /* no effect */ sepia(.65) /* 65% sepia */ sepia(100%) /* completely sepia */ specifications specification status filter effects module level 1the definition of 'sepia()' in that specification. working draft ...
<filter-function> - CSS: Cascading Style Sheets
working draft ...
filter - CSS: Cascading Style Sheets
Web › CSS › filter
ee each function for a specific example. .mydiv { filter: grayscale(50%); } /* gray all images by 50% and blur by 10px */ img { filter: grayscale(0.5) blur(10px); } applying svg filters examples of using the url function with an svg resource are as follows: .target { filter: url(#c1); } .mydiv { filter: url(commonfilters.xml#large-blur); } specifications specification status comment filter effects module level 1the definition of 'filter' in that specification. working draft initial definition. ...
fit-content() - CSS: Cascading Style Sheets
pixels. </div> <div>flexible item</div> </div> css #container { display: grid; grid-template-columns: fit-content(300px) fit-content(300px) 1fr; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css box sizing module level 3the definition of 'fit-content()' in that specification. working draft defines the function as laid out box size for width, height, min-width, min-height, max-width and max-height. css grid layoutthe definition of 'fit-content()' in that specification. candidate recommendation defines the function when used as a track size.
flex-basis - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
flex-direction - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
flex-flow - CSS: Cascading Style Sheets
Web › CSS › flex-flow
candidate recommendation initial definition ...
flex-grow - CSS: Cascading Style Sheets
Web › CSS › flex-grow
candidate recommendation initial definition ...
flex-shrink - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
flex-wrap - CSS: Cascading Style Sheets
Web › CSS › flex-wrap
candidate recommendation ...
flex - CSS: Cascading Style Sheets
Web › CSS › flex
candidate recommendation initial definition ...
<flex> - CSS: Cascading Style Sheets
-rows and other related properties. syntax the <flex> data type is specified as a <number> followed by the unit fr. the fr unit represents a fraction of the leftover space in the grid container. as with all css dimensions, there is no space between the unit and the number. examples 1fr /* using an integer value */ 2.5fr /* using a float value */ specifications specification status comment css grid layoutthe definition of '<flex>' in that specification. candidate recommendation initial definition. ...
float - CSS: Cascading Style Sheets
Web › CSS › float
px; height: 150px; } .left { float: left; background: pink; } .right { float: right; background: cyan; } result clearing floats sometimes you may want to force an item to move below any floated elements. for instance, you may want paragraphs to remain adjacent to floats, but force headings to be on their own line. see clear for examples. specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification. editor's draft adds the values inline-start and inline-end. css level 2 (revision 1)the definition of 'float' in that specification. recommendation no change css level 1the definition of 'float' in that specification. recommendation initia...
font-family - CSS: Cascading Style Sheets
nt. </div> <div class="cursive"> this is an example of a cursive font. </div> <div class="fantasy"> this is an example of a fantasy font. </div> <div class="math"> this is an example of a math font. </div> <div class="emoji"> this is an example of an emoji font. </div> <div class="fangsong"> this is an example of a fangsong font. </div> specifications specification status comment css fonts module level 4the definition of 'generic font families' in that specification. working draft adds new generic font families, specifically: system-ui, ui-serif, ui-sans-serif, ui-monospace, ui-rounded, emoji, math, and fangsong. css fonts module level 3the definition of 'font-family' in that specification. candidate recommendation no significa...
font-feature-settings - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
font-kerning - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
font-language-override - CSS: Cascading Style Sheets
working draft initial definition. ...
font-optical-sizing - CSS: Cascading Style Sheets
working draft ...
font-size-adjust - CSS: Cascading Style Sheets
candidate recommendation initial definition the css property font-size-adjust was initially defined in css 2, but dropped in css 2.1. it has been newly defined in css 3. browser compatibility the compatibility table on this page is generated from structured data. if you'd l...
font-size - CSS: Cascading Style Sheets
Web › CSS › font-size
working draft adds xxx-large keyword. css fonts module level 3the definition of 'font-size' in that specification. candidate recommendation no change. css level 2 (revision 1)the definition of 'font-size' in that specification. recommendation no change. ...
font-stretch - CSS: Cascading Style Sheets
working draft adds the <percentage> syntax for variable fonts. css fonts module level 3the definition of 'font-stretch' in that specification. candidate recommendation initial definition. note: the font-stretch property was initially defined in css 2, but dropped in...
font-style - CSS: Cascading Style Sheets
working draft adds the ability to specify an angle after oblique css fonts module level 3the definition of 'font-style' in that specification. candidate recommendation no change css level 2 (revision 1)the definition of 'font-style' in that specification. recommen...
font-synthesis - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
font-variant-caps - CSS: Cascading Style Sheets
candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktop...
font-variant-east-asian - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
font-variant-ligatures - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
font-variant-numeric - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
font-variant-position - CSS: Cascading Style Sheets
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. des...
font-variant - CSS: Cascading Style Sheets
candidate recommendation made it a shorthand of the new font-variant-* properties. css level 2 (revision 1)the definition of 'font-variant' in that specification. recommendation no change css level 1the definition of 'font-variant' in that specification. recomme...
font-variation-settings - CSS: Cascading Style Sheets
examples you can find a number of other variable fonts examples at our variable fonts guide, v-fonts.com, and axis-praxis.org. weight (wght) the following live example's css can be edited to allow you to play with font weight values. slant (slnt) the following live example's css can be edited to allow you to play with font slant/oblique values. specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification. working draft initial definition ...
font-weight - CSS: Cascading Style Sheets
ns?" </p> <div>i'm heavy<br/> <span>i'm lighter</span> </div> css /* set paragraph text to be bold. */ p { font-weight: bold; } /* set div text to two steps heavier than normal but less than a standard bold. */ div { font-weight: 600; } /* set span text to be one step lighter than its parent. */ span { font-weight: lighter; } result specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification. working draft defines font-weight to accept any numbers between 1 and 1000. css fonts module level 3the definition of 'font-weight' in that specification. candidate recommendation no change. css level 2 (revision 1)the definition of 'font-weight' in that specificati...
<frequency-percentage> - CSS: Cascading Style Sheets
ot recommended. +0hz zero, with a leading + and a unit -0khz zero, with a leading - and a unit invalid frequency values 12.0 this is a <number>, not an <frequency>, because it is missing a unit. 7 hz no space is allowed between the number and the unit. 0 although unitless zero is an allowable <length>, it's an invalid <frequency>. specifications specification status comment css values and units module level 4the definition of '<frequency-percentage>' in that specification. editor's draft css values and units module level 3the definition of '<frequency-percentage>' in that specification. candidate recommendation defines <frequency-percentage>. adds calc() ...
<frequency> - CSS: Cascading Style Sheets
Web › CSS › frequency
ot recommended. +0hz zero, with a leading + and a unit -0khz zero, with a leading - and a unit invalid frequency values 12.0 this is a <number>, not an <frequency>, because it is missing a unit. 7 hz no space is allowed between the number and the unit. 0 although unitless zero is an allowable <length>, it's an invalid <frequency>. specifications specification status comment css values and units module level 3the definition of '<frequency>' in that specification. candidate recommendation initial definition. note: this data type was initially introduced in css level 2 for the now-obsolete aural media type, where it was used to define the pitch of the voice. however, the <frequency> data type has been reintroduced in css3, though n...
gap (grid-gap) - CSS: Cascading Style Sheets
Web › CSS › gap
working draft initial definition ...
<gradient> - CSS: Cascading Style Sheets
Web › CSS › gradient
powderblue, powderblue 8px, white 8px, white 16px); } conic gradient example a simple conic gradient example. note that this isn't supported widely across browser as of yet. <div class="conic-gradient">conic gradient</div> div { width: 200px; height: 200px; } .conic-gradient { background: conic-gradient(lightpink, white, powderblue); } specifications specification status comment css images module level 4the definition of '<gradient>' in that specification. working draft adds conic-gradient css images module level 3the definition of '<gradient>' in that specification. candidate recommendation initial definition. ...
grid-area - CSS: Cascading Style Sheets
Web › CSS › grid-area
candidate recommendation initial definition ...
grid-auto-columns - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-auto-flow - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-auto-rows - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-column-end - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-column-start - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-column - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-row-end - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-row-start - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-row - CSS: Cascading Style Sheets
Web › CSS › grid-row
candidate recommendation initial definition ...
grid-template-areas - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid-template-columns - CSS: Cascading Style Sheets
candidate recommendation initial definition css grid layout module level 2the definition of 'subgrid' in that specification. working draft adds subgrid ...
grid-template-rows - CSS: Cascading Style Sheets
candidate recommendation initial definition css grid layout module level 2the definition of 'subgrid' in that specification. working draft adds subgrid ...
grid-template - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
grid - CSS: Cascading Style Sheets
Web › CSS › grid
candidate recommendation initial definition ...
hanging-punctuation - CSS: Cascading Style Sheets
d ] | last ] examples setting opening and closing quotes to hang html <p>“lorem ipsum dolor sit amet, consectetur adipiscing elit. curabitur dignissim nunc mauris, et sollicitudin est scelerisque sed. praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”</p> css p { hanging-punctuation: first last; margin: .5rem; } result specifications specification status comment css text module level 3the definition of 'hanging-punctuation' in that specification. working draft initial definition ...
height - CSS: Cascading Style Sheets
Web › CSS › height
> <div id="shorter">i'm 25 pixels tall.</div> <div id="parent"> <div id="child"> i'm half the height of my parent. </div> </div> css div { width: 250px; margin-bottom: 5px; border: 2px solid blue; } #taller { height: 50px; } #shorter { height: 25px; } #parent { height: 100px; } #child { height: 50%; width: 75%; } result specifications specification status comment css box sizing module level 4the definition of 'height' in that specification. editor's draft css box sizing module level 3the definition of 'height' in that specification. working draft added the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'height' in that specification. recommendation adds...
hyphens - CSS: Cascading Style Sheets
Web › CSS › hyphens
working draft initial definition ...
ident - CSS: Cascading Style Sheets
Web › CSS › ident
sequence of alphanumeric characters bili\.bob a correctly escaped period invalid identifiers 34rem it must not start with a decimal digit. -12rad it must not start with a dash followed by a decimal digit. bili.bob only alphanumeric characters, _, and - needn't be escaped. 'bilibob' this would be a <string>. "bilibob" this would be a <string>. specifications specification status comment css values and units module level 4the definition of '<ident>' in that specification. editor's draft css values and units module level 3the definition of '<ident>' in that specification. candidate recommendation ...
image-orientation - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
image-rendering - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
image-set() - CSS: Cascading Style Sheets
Web › CSS › image-set
screen reader will not announce its presence and therefore convey nothing to its users. if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document. mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 specifications specification status comment css images module level 4the definition of 'the image-set() notation' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefo...
<image> - CSS: Cascading Style Sheets
Web › CSS › image
port.pdf) /* a file pointed to by the url() function must be an image. */ element(#fakeid) /* an element id must be an existing id on the page. */ image(z.jpg#xy=0,0) /* the spatial fragment must be written in the format of xywh=#,#,#,# */ image-set('cat.jpg' 1x, 'dog.jpg' 1x) /* every image in an image set must have a different resolutions */ specifications specification status comment css images module level 4the definition of '<image>' in that specification. working draft adds element(), image(), image-set(), conic-gradient(), repeating-conic-gradient(), and image-resolution. css images module level 3the definition of '<image>' in that specification. candidate recommendation initial definition. before this, there was no explicitly ...
image() - CSS: Cascading Style Sheets
he color would have appeared behind the logo image instead of on top of it. additionally, the entire container would have had the same background color. because we used image() along with the background-size property (and prevented the image from repeating with the background-repeat property, the color swatch will only cover a quarter of the container. specifications specification status comment css images module level 4the definition of 'image()' in that specification. working draft initial definition ...
ime-mode - CSS: Cascading Style Sheets
Web › CSS › ime-mode
t entered data into databases which didn't support extended character sets. <input type="text" name="name" value="initial value" style="ime-mode: disabled"> note: you shouldn't rely on disabling ime to prevent extended characters from passing through your form. even with ime disabled, users can still paste extended characters into your form's fields. specifications specification status comment css basic user interface module level 3the definition of 'ime-mode' in that specification. recommendation initial definition. makes ime-mode officially obsolete. ...
inherit - CSS: Cascading Style Sheets
Web › CSS › inherit
ders green */ h2 { color: green; } /* ...but leave those in the sidebar alone so they use their parent's color */ #sidebar h2 { color: inherit; } in this example the h2 elements inside the sidebar might be different colors. for example, if one of them were the child of a div matched by the rule ... div#current { color: blue; } ... it would be blue. specifications specification status comment css cascading and inheritance level 4the definition of 'inherit' in that specification. candidate recommendation no changes from level 3. css values and units module level 3the definition of 'inherit' in that specification. candidate recommendation no significant change from css level 2 (revision 1). css level 2 (revision 1)the definition of '...
initial-letter-align - CSS: Cascading Style Sheets
working draft initial definition ...
initial-letter - CSS: Cascading Style Sheets
working draft initial definition ...
initial - CSS: Cascading Style Sheets
Web › CSS › initial
ay be unexpected. you should consider using the inherit, unset, or revert keywords instead. examples using initial to reset color for an element html <p> <span>this text is red.</span> <em>this text is in the initial color (typically black).</em> <span>this is red again.</span> </p> css p { color: red; } em { color: initial; } result specifications specification status comment css cascading and inheritance level 4the definition of 'initial' in that specification. candidate recommendation no changes from level 3. css cascading and inheritance level 3the definition of 'initial' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated fro...
Initial value - CSS: Cascading Style Sheets
element only, as long as no specified value is supplied. for non-inherited properties, the initial value is used on all elements, as long as no specified value is supplied. you can explicitly specify the initial value by using the initial keyword. note: the initial value should not be confused with the value specified by the browser's style sheet. specifications specification status comment css cascade 4 formal definition. css level 2 (revision 1)the definition of 'initial value' in that specification. recommendation implicit definition. ...
inline-size - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-block-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-block-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-block - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-inline-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-inline-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset-inline - CSS: Cascading Style Sheets
editor's draft initial definition ...
inset - CSS: Cascading Style Sheets
Web › CSS › inset
editor's draft initial definition ...
<integer> - CSS: Cascading Style Sheets
Web › CSS › integer
nly one leading +/- is allowed. ten letters are not allowed. _5 special characters are not allowed. \35 escaped unicode characters are not allowed, even if they are an integer (here: 5). \4e94 non-arabic numerals are not allowed, even when escaped (here: the japanese 5, 五). 3e4 scientific notation is not allowed. specifications specification status comment css values and units module level 4the definition of '<integer>' in that specification. editor's draft no significant change. css values and units module level 3the definition of '<integer>' in that specification. candidate recommendation no significant change. css level 2 (revision 1)the definition of '<integer>' in that specification. rec...
isolation - CSS: Cascading Style Sheets
Web › CSS › isolation
candidate recommendation initial definition ...
justify-content - CSS: Cascading Style Sheets
working draft adds the [ first | last ]? baseline, self-start, self-end, start, end, left, right, unsafe | safe values. css flexible box layout modulethe definition of 'justify-content' in that specification. candidate recommendation initial definition ...
justify-items - CSS: Cascading Style Sheets
working draft initial definition ...
justify-self - CSS: Cascading Style Sheets
working draft initial definition ...
left - CSS: Cascading Style Sheets
Web › CSS › left
working draft adds behavior for sticky positioning. css level 2 (revision 1)the definition of 'left' in that specification. recommendation initial definition. ...
<length-percentage> - CSS: Cascading Style Sheets
centage example */ text-size-adjust: 20%; } result use in calc() where a <length-percentage> is specified as an allowable type, this means that the percentage resolves to a length and therefore can be used in a calc() expression. therefore, all of the following values are acceptable for width: width: 200px; width: 20%; width: calc(100% - 200px); specifications specification status comment css values and units module level 4the definition of '<length-percentage>' in that specification. editor's draft css values and units module level 3the definition of '<length-percentage>' in that specification. candidate recommendation defines <length-percentage>. adds calc() ...
<length> - CSS: Cascading Style Sheets
Web › CSS › length
editor's draft adds the vi, vb, ic, lh, and rlh units. css values and units module level 3the definition of '<length>' in that specification. candidate recommendation adds the ch, rem, vw, vh, vmin, vmax, and q units. css level 2 (revision 1)the definition o...
letter-spacing - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'letter-spacing' in that specification. recommendation no change. scalable vector graphics (svg) 1.1 (second edition)the definition of 'letter-spacing' in that specification. recommendation i...
line-break - CSS: Cascading Style Sheets
working draft initial definition ...
line-height-step - CSS: Cascading Style Sheets
unit. the line box in <h1> does not fit into one step unit and thus occupies two, but it is still centered within the two step unit. :root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } the result of these rules is shown below in the following screenshot: specifications specification status comment css rhythmic sizingthe definition of 'line-height-step' in that specification. working draft initial definition. ...
line-height - CSS: Cascading Style Sheets
recommendation no change. css level 1the definition of 'line-height' in that specification. recommendation initial definition. ...
linear-gradient() - CSS: Cascading Style Sheets
i-position color stops, with adjacent colors having the same color stop value, creating a striped effect. body { width: 100vw; height: 100vh; } body { background: linear-gradient(to right, red 20%, orange 20% 40%, yellow 40% 60%, green 60% 80%, blue 80%); } more linear-gradient examples please see using css gradients for more examples. specifications specification status comment css images module level 4the definition of 'gradient color-stops' in that specification. working draft adds interpolation hints. css images module level 3the definition of 'linear-gradient()' in that specification. candidate recommendation initial definition. ...
list-style-image - CSS: Cascading Style Sheets
working draft extends support to any <image> data type. css level 2 (revision 1)the definition of 'list-style-image' in that specification. recommendation initial definition ...
list-style-position - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'list-style-position' in that specification. recommendation initial definition. ...
list-style-type - CSS: Cascading Style Sheets
candidate recommendation redefines css2.1 counters. extends the syntax to support @counter-style rules. defines using @counter-style the usual style types: hebrew, cjk-ideographic, hiragana, hiragana-iroha, katakana, katakana-iroha, japanese-formal, japanese-informal, simp-ch...
list-style - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'list-style' in that specification. recommendation initial definition. ...
margin-block-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
margin-block-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
margin-block - CSS: Cascading Style Sheets
editor's draft initial definition. ...
margin-bottom - CSS: Cascading Style Sheets
working draft no significant change css level 2 (revision 1)the definition of 'margin-bottom' in that specification. recommendation removes its effect on inline elements. css level 1the definition of 'margin-bottom' in that specification. recommendation initial d...
margin-inline-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
margin-inline-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
margin-inline - CSS: Cascading Style Sheets
editor's draft initial definition. initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanima...
margin-left - CSS: Cascading Style Sheets
working draft no significant change from css 2.1. css flexible box layout modulethe definition of 'margin-left' in that specification. candidate recommendation defines the behavior of margin-left on flex items. css level 2 (revision 1)the definition of 'margin-left' in t...
margin-right - CSS: Cascading Style Sheets
working draft no significant change css flexible box layout modulethe definition of 'margin-right' in that specification. candidate recommendation defines the behavior of margin-right on flex items. css level 2 (revision 1)the definition of 'margin-right' in that specif...
margin-top - CSS: Cascading Style Sheets
working draft no significant change css level 2 (revision 1)the definition of 'margin-top' in that specification. recommendation removes its effect on inline elements. css level 1the definition of 'margin-top' in that specification. recommendation initial definition...
margin-trim - CSS: Cascading Style Sheets
editor's draft ...
margin - CSS: Cascading Style Sheets
Web › CSS › margin
browsers like ie8-9 that do not support flexible box layout, these are not available. in order to center an element inside its parent, use margin: 0 auto;. margin collapsing elements' top and bottom margins are sometimes collapsed into a single margin that is equal to the larger of the two margins. see mastering margin collapsing for more information. specifications specification status comment css basic box modelthe definition of 'margin' in that specification. working draft no significant change. css level 2 (revision 1)the definition of 'margin' in that specification. recommendation removes the effect of top and bottom margins on inline elements. css level 1the definition of 'margin' in that specification. recommendation ini...
mask-border-mode - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-border-outset - CSS: Cascading Style Sheets
t. mask-border-outset: 1rem; chromium-based browsers support an outdated version of this property — mask-box-image-outset — with a prefix: -webkit-mask-box-image-outset: 1rem; note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect. specifications specification status comment css masking module level 1the definition of 'mask-border-outset' in that specification. candidate recommendation initial definition ...
mask-border-repeat - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-border-slice - CSS: Cascading Style Sheets
candidate recommendation initial defintion ...
mask-border-source - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-border-width - CSS: Cascading Style Sheets
k. mask-border-width: 30 fill; chromium-based browsers support an outdated version of this property — mask-box-image-width — with a prefix: -webkit-mask-box-image-width: 20px; note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect. specifications specification status comment css masking module level 1the definition of 'mask-border-width' in that specification. candidate recommendation initial definition ...
mask-border - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-clip - CSS: Cascading Style Sheets
Web › CSS › mask-clip
candidate recommendation initial definition ...
mask-composite - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-image - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-mode - CSS: Cascading Style Sheets
Web › CSS › mask-mode
candidate recommendation initial definition ...
mask-origin - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-position - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-repeat - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
mask-size - CSS: Cascading Style Sheets
Web › CSS › mask-size
candidate recommendation initial definition ...
mask-type - CSS: Cascading Style Sheets
Web › CSS › mask-type
candidate recommendation initial definition. ...
mask - CSS: Cascading Style Sheets
Web › CSS › mask
candidate recommendation extends its usage to html elements. extends its syntax by making it a shorthand for the new mask-* properties defined in that specification. scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification. recommendation ...
max-block-size - CSS: Cascading Style Sheets
o horizontal-tb or vertical-rl depending on which class is used. .standard-box { padding: 4px; background-color: #abcdef; color: #000; font: 16px "open sans", "helvetica", "arial", sans-serif; max-block-size: 160px; min-block-size: 100px; } .horizontal { writing-mode: horizontal-tb; } .vertical { writing-mode: vertical-rl; } result specifications specification status comment css logical properties and values level 1the definition of 'max-block-size' in that specification. editor's draft initial definition ...
max-height - CSS: Cascading Style Sheets
editor's draft css box sizing module level 3the definition of 'max-height' in that specification. working draft adds the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'max-height' in that specification. recommendat...
max-inline-size - CSS: Cascading Style Sheets
editor's draft initial definition ...
max-width - CSS: Cascading Style Sheets
Web › CSS › max-width
"child" will be either 150 pixels wide or the width of the "parent," whichever is smaller. html <div id="parent"> <div id="child"> fusce pulvinar vestibulum eros, sed luctus ex lobortis quis. </div> </div> css #parent { background: lightblue; width: 300px; } #child { background: gold; width: 100%; max-width: 150px; } result specifications specification status comment css box sizing module level 4the definition of 'max-width' in that specification. editor's draft css box sizing module level 3the definition of 'max-width' in that specification. working draft adds the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'max-width' in that specification. recommendation...
max() - CSS: Cascading Style Sheets
Web › CSS › max
its second value a relative length unit that is always large enough to read. for example: small { font-size: max(min(0.5vw, 0.5em), 1rem); } this ensures a minimum size of 1rem, with a text size that scales if the page is zoomed. mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 specifications specification status comment css values and units module level 4the definition of 'max()' in that specification. editor's draft initial definition ...
min-block-size - CSS: Cascading Style Sheets
editor's draft initial definition ...
min-height - CSS: Cascading Style Sheets
editor's draft css box sizing module level 3the definition of 'min-height' in that specification. working draft adds the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'min-height' in that specification. recommendat...
min-inline-size - CSS: Cascading Style Sheets
editor's draft initial definition ...
min-width - CSS: Cascading Style Sheets
Web › CSS › min-width
editor's draft css box sizing module level 3the definition of 'min-width' in that specification. working draft adds the max-content, min-content, fit-content keywords. css flexible box layout modulethe definition of 'min-width' in that specification. candidat...
min() - CSS: Cascading Style Sheets
Web › CSS › min
nput and label to be the lesser of 40% of the form width up to the padding or 400px wide, whichever is smaller. in other words, the widest that the label and input can be is 400px. the narrowest they will be is 40% of the form's width, which on a smartwatch's screen is very small. <form> <label>type something:</label> <input type="text"> </form> specifications specification status comment css values and units module level 4the definition of 'min()' in that specification. editor's draft initial definition. ...
minmax() - CSS: Cascading Style Sheets
Web › CSS › minmax
candidate recommendation initial definition ...
mix-blend-mode - CSS: Cascading Style Sheets
candidate recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. des...
<number> - CSS: Cascading Style Sheets
Web › CSS › number
h a leading + -0.0 zero, with a leading - .60 fractional number without a leading zero 10e3 scientific notation -3.4e-2 complicated scientific notation invalid numbers 12. decimal points must be followed by at least one digit. +-12.2 only one leading +/- is allowed. 12.1.1 only one decimal point is allowed. specifications specification status comment css values and units module level 4the definition of '<number>' in that specification. editor's draft no significant change. css values and units module level 3the definition of '<number>' in that specification. candidate recommendation no significant change. css level 2 (revision 1)the definition of '<number>' in that specification. recomm...
object-fit - CSS: Cascading Style Sheets
working draft css images module level 3the definition of 'object-fit' in that specification. candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the ...
object-position - CSS: Cascading Style Sheets
osition: 10px; } #object-position-2 { object-position: 100% 10%; } the first image is positioned with its left edge inset 10 pixels from the left edge of the element's box. the second image is positioned with its right edge flush against the right edge of the element's box and is located 10% of the way down the height of the element's box. result specifications specification status comment css images module level 3the definition of 'object-position' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktop...
offset-anchor - CSS: Cascading Style Sheets
working draft initial definition ...
offset-distance - CSS: Cascading Style Sheets
et-distance from 0% to 100%. html <div id="motion-demo"></div> css #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-distance' in that specification. working draft initial definition ...
offset-path - CSS: Cascading Style Sheets
working draft initial definition ...
offset-position - CSS: Cascading Style Sheets
working draft initial definition ...
offset-rotate - CSS: Cascading Style Sheets
working draft initial definition ...
offset - CSS: Cascading Style Sheets
Web › CSS › offset
working draft initial definition ...
opacity - CSS: Cascading Style Sheets
Web › CSS › opacity
working draft defines percentage opacity values. css color module level 3the definition of 'opacity' in that specification. recommendation initial definition ...
order - CSS: Cascading Style Sheets
Web › CSS › order
horizontal space as available. html <header>...</header> <main> <article>article</article> <nav>nav</nav> <aside>aside</aside> </main> <footer>...</footer> css main { display: flex; text-align:center; } main > article { flex:1; order: 2; } main > nav { width: 200px; order: 1; } main > aside { width: 200px; order: 3; } result specifications specification status comment css flexible box layout modulethe definition of 'order' in that specification. candidate recommendation initial definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer ...
orphans - CSS: Cascading Style Sheets
Web › CSS › orphans
aining some more text than the first one. it is used to demonstrate how orphans work.</p> <p>this is the third paragraph. it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; height: 150px; columns: 3; orphans: 3; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'orphans' in that specification. candidate recommendation extends orphans to apply to any type of fragment, including pages, regions, or columns. css level 2 (revision 1)the definition of 'orphans' in that specification. recommendation initial definition. browser compatibility the compatibility...
outline-color - CSS: Cascading Style Sheets
recommendation no change. css level 2 (revision 1)the definition of 'outline-color' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like...
outline-offset - CSS: Cascading Style Sheets
recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. deskto...
outline-style - CSS: Cascading Style Sheets
recommendation added auto value. css level 2 (revision 1)the definition of 'outline-style' in that specification. recommendation initial definition. ...
outline-width - CSS: Cascading Style Sheets
recommendation no change. css level 2 (revision 1)the definition of 'outline-width' in that specification. recommendation initial definition. ...
outline - CSS: Cascading Style Sheets
Web › CSS › outline
recommendation no change. css level 2 (revision 1)the definition of 'outline' in that specification. recommendation initial definition. ...
overflow-anchor - CSS: Cascading Style Sheets
e the element won't be selected as a potential anchor. formal definition initial valueautoapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | none examples prevent scroll anchoring to prevent scroll anchoring in a document, use the overflow-anchor property. body { overflow-anchor: none; } specifications specification status comment css scroll anchoring module level 1the definition of 'overflow-anchor' in that specification. editor's draft initial definition. ...
overflow-block - CSS: Cascading Style Sheets
working draft initial valueautoapplies toblock-containers, flex containers, and grid containersinheritednocomputed valueas specified, except with visible/clip computing to auto/hidden respectively if one of overflow-x or overflow-y is neither visible nor clipanimation typedis...
overflow-inline - CSS: Cascading Style Sheets
working draft ...
overflow-wrap - CSS: Cascading Style Sheets
goggchaubunagungamaugg</em>, though i've never been there myself. (<code>hyphens</code>, german rules)</p> css p { width: 13em; margin: 2px; background: gold; } .ow-anywhere { overflow-wrap: anywhere; } .ow-break-word { overflow-wrap: break-word; } .word-break { word-break: break-all; } .hyphens { hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'overflow-wrap' in that specification. working draft initial definition initial valuenormalapplies tonon-replaced inline elementsinheritedyescomputed valueas specifiedanimation typediscrete ...
overflow-x - CSS: Cascading Style Sheets
working draft ...
overflow-y - CSS: Cascading Style Sheets
nulla pariatur. </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; height: 100px; } #div1 { overflow-y: hidden; margin-bottom: 12px;} #div2 { overflow-y: scroll; margin-bottom: 12px;} #div3 { overflow-y: visible; margin-bottom: 120px;} #div4 { overflow-y: auto; margin-bottom: 120px;} result specifications specification status comment css overflow module level 3the definition of 'overflow-y' in that specification. working draft ...
overflow - CSS: Cascading Style Sheets
Web › CSS › overflow
dantium. p { overflow: scroll; /* always show scrollbars */ } overflow: scroll sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. p { overflow: auto; /* append scrollbars if necessary */ } overflow: auto sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification. working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification. recommendation initial definition. ...
overscroll-behavior-block - CSS: Cascading Style Sheets
working draft ...
overscroll-behavior-inline - CSS: Cascading Style Sheets
working draft ...
overscroll-behavior-x - CSS: Cascading Style Sheets
inner box is scrolled and a scroll boundary is reached, the whole page will begin to scroll, which is probably not what we want. to avoid this, you can set overscroll-behavior-x: contain on the inner box: main > div { height: 300px; width: 500px; overflow: auto; position: relative; top: 100px; left: 100px; overscroll-behavior-x: contain; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-x' in that specification. working draft ...
overscroll-behavior-y - CSS: Cascading Style Sheets
working draft ...
overscroll-behavior - CSS: Cascading Style Sheets
l-behavior-y: contain; } we also wanted to get rid of the standard overscroll effects when the contacts are scrolled to the top or bottom (e.g. chrome on android refreshes the page when you scroll past the top boundary). this can be prevented by setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior' in that specification. working draft ...
padding-block-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-block-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-block - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-bottom - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'padding-bottom' in that specification. recommendation no change. css level 1the definition of 'padding-bottom' in that specification. recommendation initial definition. ...
padding-inline-end - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-inline-start - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-inline - CSS: Cascading Style Sheets
editor's draft initial definition ...
padding-left - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'padding-left' in that specification. recommendation no change. css level 1the definition of 'padding-left' in that specification. recommendation initial definition. ...
padding-right - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'padding-right' in that specification. recommendation no change. css level 1the definition of 'padding-right' in that specification. recommendation initial definition. ...
padding-top - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'padding-top' in that specification. recommendation no change. css level 1the definition of 'padding-top' in that specification. recommendation initial definition. ...
padding - CSS: Cascading Style Sheets
Web › CSS › padding
working draft no change. css level 2 (revision 1)the definition of 'padding' in that specification. recommendation no change. css level 1the definition of 'padding' in that specification. recommendation initial definition. ...
page-break-after - CSS: Cascading Style Sheets
the root element. user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification. editor's draft adds the values recto and verso. css paged media module level 3the definition of 'page-break-after' in that specification. working draft extends the element that this property applies to table rows and table row groups. css level ...
page-break-before - CSS: Cascading Style Sheets
l flow of the root element. user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples avoid a page break before the dic /* avoid page break before the div */ div.note { page-break-before: avoid; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification. editor's draft adds the values recto and verso. css paged media module level 3the definition of 'page-break-before' in that specification. working draft extends the element that this property applies to table rows and table row groups. css level...
page-break-inside - CSS: Cascading Style Sheets
working draft allows this property on more elements. css level 2 (revision 1)the definition of 'page-break-inside' in that specification. recommendation initial definition. ...
paint-order - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
paint() - CSS: Cascading Style Sheets
Web › CSS › paint
boxcolor: hsla(155, 90%, 60%, 1.0); background-image: paint(hollowhighlights, filled, 3px); } li:nth-of-type(3n+1) { --boxcolor: hsla(255, 90%, 60%, 1.0); background-image: paint(hollowhighlights, stroke, 1px); } we've included a custom property in the selector block defining a boxcolor. custom properties are accessible to the paintworklet. specifications specification status comment css painting api level 1the definition of 'paint notation' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeed...
<percentage> - CSS: Cascading Style Sheets
editor's draft no significant change. css values and units module level 3the definition of '<percentage>' in that specification. candidate recommendation no significant change from css level 2 (revision 1). css level 2 (revision 1)the definition of '<per...
perspective-origin - CSS: Cascading Style Sheets
editor's draft initial definition. ...
perspective - CSS: Cascading Style Sheets
editor's draft initial definition ...
place-content - CSS: Cascading Style Sheets
working draft initial definition ...
place-items - CSS: Cascading Style Sheets
working draft initial definition ...
place-self - CSS: Cascading Style Sheets
working draft initial definition ...
pointer-events - CSS: Cascading Style Sheets
. img { pointer-events: none; } disabling pointer events on a single link this example disables pointer events on the link to http://example.com. html <ul> <li><a href="https://developer.mozilla.org">mdn</a></li> <li><a href="http://example.com">example.com</a></li> </ul> css a[href="http://example.com"] { pointer-events: none; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'pointer-events' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointer-events' in that specification. recommendation initial definition its extension to html elements, though present in early drafts of css basic user interfa...
position - CSS: Cascading Style Sheets
Web › CSS › position
recommendation css positioned layout module level 3the definition of 'position' in that specification. working draft adds sticky property value. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to...
<position> - CSS: Cascading Style Sheets
s are interpolated independently. however, because the speed of the interpolation is determined by a single timing function for both coordinates, the point will move in a straight line. examples valid positions center left center top right 8.5% bottom 12vmin right -6px 10% 20% 8rem 14px invalid positions left right bottom top 10px 15px 20px 15px specifications specification status comment css values and units module level 3the definition of '<position>' in that specification. candidate recommendation relists links to both definitions: if css backgrounds and borders module level 3 is supported, its definition of <position> must also be used. css backgrounds and borders module level 3the definition of '<bg-position>' in that specification. c...
quotes - CSS: Cascading Style Sheets
Web › CSS › quotes
s without it being explicitly being set. html <div lang="fr"> <q>ceci est une citation française.</q> <div> <hr> <div lang="ru"> <q>Это русская цитата</q> <div> <hr> <div lang="de"> <q>dies ist ein deutsches zitat</q> <div> <hr> <div lang="en"> <q>this is an english quote.</q> <div> css /*q { quotes: auto; }*/ result specifications specification status comment css generated content module level 3the definition of 'quotes' in that specification. working draft css level 2 (revision 1)the definition of 'quotes' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, p...
radial-gradient() - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
<ratio> - CSS: Cascading Style Sheets
Web › CSS › ratio
(min-aspect-ratio: 16/9) { ... } common aspect ratios ratio usage 4/3 traditional tv format in the 20th century. 16/9 modern "widescreen" tv format. 185/100 = 91/50 the most common movie format since the 1960s. 239/100 "widescreen," anamorphic movie format. specifications specification status comment media queries level 4the definition of '<ratio>' in that specification. candidate recommendation media queriesthe definition of '<ratio>' in that specification. recommendation initial definition. ...
repeat() - CSS: Cascading Style Sheets
Web › CSS › repeat
v> <div> inflexible item of 100 pixels width. </div> </div> css #container { display: grid; grid-template-columns: repeat(2, 50px 1fr) 100px; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css grid layoutthe definition of 'repeat()' in that specification. candidate recommendation initial definition ...
repeating-conic-gradient() - CSS: Cascading Style Sheets
ut since we only see the right half, we only see 9 repeats. div { width: 200px; height: 200px; } <div></div> div { background: repeating-conic-gradient( from 3deg at 25% 25%, green, blue 2deg 5deg, green, yellow 15deg 18deg, green 20deg); } more repeating-conic-gradient examples please see using css gradients for more examples. specifications specification status comment css images module level 4the definition of 'repeating-conic-gradient()' in that specification. working draft ...
repeating-linear-gradient() - CSS: Cascading Style Sheets
candidate recommendation initial definition. ...
repeating-radial-gradient() - CSS: Cascading Style Sheets
ll repeat 10 times between the center and the farthest corner (the bottom right corner). browsers supporting multi position color stops will display a red and green striped ellipse. browsers not supporting the syntax yet will see a gradient that goes from red to black and then from blue to green. note: please see using css gradients for more examples. specifications specification status comment css images module level 3the definition of 'repeating-radial-gradient()' in that specification. candidate recommendation initial definition. ...
resize - CSS: Cascading Style Sheets
Web › CSS › resize
lass="resizable"> <p class="resizable"> this paragraph is resizable in all directions, because the css `resize` property is set to `both` on this element. </p> </div> css .resizable { resize: both; overflow: scroll; border: 1px solid black; } div { height: 300px; width: 300px; } p { height: 200px; width: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'resize' in that specification. editor's draft adds the values block and inline. css basic user interface module level 3the definition of 'resize' in that specification. recommendation initial definition. ...
<resolution> - CSS: Cascading Style Sheets
ds, 0 is invalid and does not represent 0dpi, 0dpcm, or 0dppx. examples use in a media query @media print and (min-resolution: 300dpi) { ... } valid resolutions 96dpi 50.82dpcm 3dppx invalid resolutions 72 dpi spaces are not allowed between the number and the unit. ten dpi the number must use digits only. 0 the unit is required. specifications specification status comment css values and units module level 4the definition of '<resolution>' in that specification. editor's draft adds the x unit. css values and units module level 3the definition of '<resolution>' in that specification. candidate recommendation adds the dppx unit. media queriesthe definition of '<resolution>' in that specification. recommendation...
Resolved value - CSS: Cascading Style Sheets
the resolved value of a css property is the value returned by getcomputedstyle(). for most properties, it is the computed value, but for a few legacy properties (including width and height), it is instead the used value. see the specification link below for more per-property details. specifications specification status comment css object model (cssom)the definition of 'resolved value' in that specification. working draft initial definition. ...
revert - CSS: Cascading Style Sheets
Web › CSS › revert
e black</h3> <p>text in paragraph will be red.</p> this will also be black. </section> notice how paragraph still has a red color even though a color property for the section was reverted. also note that both the header and plain text node is black. this is exactly the same as if section { color: darkgreen } would not exist for the second section. specifications specification status comment css cascading and inheritance level 4the definition of 'revert' in that specification. candidate recommendation initial definition. ...
right - CSS: Cascading Style Sheets
Web › CSS › right
working draft adds behavior for sticky positioning. css level 2 (revision 1)the definition of 'right' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'...
rotate - CSS: Cascading Style Sheets
Web › CSS › rotate
editor's draft initial definition. ...
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
Web › CSS › row-gap
working draft initial definition ...
ruby-align - CSS: Cascading Style Sheets
working draft initial definition ...
ruby-position - CSS: Cascading Style Sheets
working draft initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechro...
scale - CSS: Cascading Style Sheets
Web › CSS › scale
editor's draft initial definition. ...
scroll-behavior - CSS: Cascading Style Sheets
working draft initial specification ...
scroll-margin-block-end - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-block-start - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-block - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-bottom - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-inline-end - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-inline-start - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-inline - CSS: Cascading Style Sheets
ge of the third <div>. note: here we are setting scroll-margin on the start and end of the inline axis (x in our case), but only the end edge is really relevant. it would work just as well here to only set a scroll margin on that one edge, for example with scroll-margin-inline: 0 1rem, or scroll-margin-inline-end: 1rem. result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline' in that specification. candidate recommendation initial definition ...
scroll-margin-left - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-right - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin-top - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scroll-margin - CSS: Cascading Style Sheets
iv>, and 2rems outside the left edge of the third <div>. note: here we are setting scroll-margin on all sides at once, but only the start edge is really relevant. it would work just as well here to only set a scroll margin on that one edge, for example with scroll-margin-inline-start: 1rem, or scroll-margin: 0 0 0 1rem. result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin' in that specification. candidate recommendation initial definition ...
scroll-padding-block-end - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-end' in that specification. candidate recommendation initial definition ...
scroll-padding-block-start - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-start' in that specification. candidate recommendation initial definition ...
scroll-padding-block - CSS: Cascading Style Sheets
do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block' in that specification. candidate recommendation initial definition ...
scroll-padding-bottom - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-bottom' in that specification. candidate recommendation initial definition ...
scroll-padding-inline-end - CSS: Cascading Style Sheets
etect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-end' in that specification. candidate recommendation initial definition ...
scroll-padding-inline-start - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-start' in that specification. candidate recommendation initial definition ...
scroll-padding-inline - CSS: Cascading Style Sheets
do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline' in that specification. candidate recommendation initial definition ...
scroll-padding-left - CSS: Cascading Style Sheets
etect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-left' in that specification. candidate recommendation initial definition ...
scroll-padding-right - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-right' in that specification. candidate recommendation initial definition ...
scroll-padding-top - CSS: Cascading Style Sheets
tect and do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-top' in that specification. candidate recommendation initial definition ...
scroll-padding - CSS: Cascading Style Sheets
do something else if a non-zero value is more appropriate. formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,4}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding' in that specification. candidate recommendation initial definition ...
scroll-snap-align - CSS: Cascading Style Sheets
ll container's snapport is a snap position in this axis. safari currently has the two value syntax in the wrong order, the first value being inline the second block. see bug #191865. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | start | end | center ]{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-align' in that specification. candidate recommendation initial definition ...
scroll-snap-stop - CSS: Cascading Style Sheets
<div>4</div> <div>5</div> </div> <div class="container y mandatory-scroll-snapping" dir="rtl"> <div>y mand. rtl</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> <div class="container y proximity-scroll-snapping" dir="rtl"> <div>y prox. rtl</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> result specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-stop' in that specification. candidate recommendation initial definition ...
scroll-snap-type - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
scrollbar-color - CSS: Cascading Style Sheets
er">veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. gumbo beet greens corn soko endive gumbo gourd. parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-color' in that specification. working draft initial definition. ...
scrollbar-width - CSS: Cascading Style Sheets
er">veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. gumbo beet greens corn soko endive gumbo gourd. parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-width' in that specification. working draft initial definition ...
shape-image-threshold - CSS: Cascading Style Sheets
d-image with a linear gradient rather than an image file. the same gradient is also used as the image from which the shape is derived for establishing the float area, using the shape-outside property. the 20% opacity threshold for treating gradient pixels as part of the shape is then established using shape-image-threshold with a value of 0.2. result specifications specification status comment css shapes module level 1the definition of 'shape-image-threshold' in that specification. candidate recommendation initial definition ...
shape-margin - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
shape-outside - CSS: Cascading Style Sheets
candidate recommendation initial definition. css shapes module level 2the definition of 'shape-outside' in that specification. editor's draft adds the path() value ...
<shape> - CSS: Cascading Style Sheets
Web › CSS › shape
lement's box. interpolation when animated, values of the <shape> data type are interpolated over their top, right, bottom, and left components, each treated as a real, floating-point number. the speed of the interpolation is determined by the timing function associated with the animation. example img.clip04 { clip: rect(10px, 20px, 20px, 10px); } specifications specification status comment css level 2 (revision 1)the definition of '<shape>' in that specification. recommendation defines with the clip property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilech...
Specified value - CSS: Cascading Style Sheets
because none of them are given in the css.</div> <div class="fun"> <p>the specified value of my font family is not given explicitly in the css, so it is inherited from my parent. however, the border is not an inheriting property.</p> </div> css .fun { border: 1px dotted pink; font-family: fantasy; } p { color: green; } result specifications specification status comment css level 2 (revision 2)the definition of 'cascaded value' in that specification. working draft css level 2 (revision 1)the definition of 'cascaded value' in that specification. recommendation initial definition. ...
<string> - CSS: Cascading Style Sheets
Web › CSS › string
candidate recommendation no significant change from css level 2 (revision 1). css level 2 (revision 1)the definition of '<string>' in that specification. recommendation explicit definition; allows 6-digit unicode escaped characters. css level 1the definition...
symbols() - CSS: Cascading Style Sheets
Web › CSS › symbols
time at each cycle (one time for the first cycle, two times for the second, etc.). fixed: the system cycles through the given values once, then falls back to arabic numerals. examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css counter styles level 3the definition of 'symbols()' in that specification. candidate recommendation initial defintion. ...
tab-size - CSS: Cascading Style Sheets
Web › CSS › tab-size
-space is set to pre to prevent the tabs from collapsing. html <p>no tab</p> <p>&#0009;default tab size of 8 characters wide</p> <p class="custom">&#0009;custom tab size of 3 characters wide</p> <p>&nbsp;&nbsp;&nbsp;3 spaces, equivalent to the custom tab size</p> css p { white-space: pre; } .custom { tab-size: 3; -moz-tab-size: 3; } result specifications specification status comment css text module level 3the definition of 'tab-size' in that specification. working draft initial definition ...
table-layout - CSS: Cascading Style Sheets
recommendation initial definition. ...
text-align-last - CSS: Cascading Style Sheets
amples justifying the last line <p>integer elementum massa at nulla placerat varius. suspendisse in libero risus, in interdum massa. vestibulum ac leo vitae metus faucibus gravida ac in neque. nullam est eros, suscipit sed dictum quis, accumsan a ligula.</p> css p { font-size: 1.4em; text-align: justify; text-align-last: center; } results specifications specification status comment css text module level 3the definition of 'text-align-last' in that specification. working draft initial definition ...
text-align - CSS: Cascading Style Sheets
ula. </p> css .example { text-align: justify; border: solid; } result notes the standard-compatible way to center a block itself without centering its inline content is setting the left and right margin to auto, e.g.: .something { margin: auto; } .something { margin: 0 auto; } .something { margin-left: auto; margin-right: auto; } specifications specification status comment css logical properties and values level 1the definition of 'text-align' in that specification. editor's draft no changes css text module level 4the definition of 'text-align' in that specification. editor's draft added the <string> value. css text module level 3the definition of 'text-align' in that specification. working draft added the...
text-combine-upright - CSS: Cascading Style Sheets
very piece of horizontal text, but it is currently supported by more browsers than the digits value. html <p lang="zh-hant">民國<span class="num">105</span >年<span class="num">4</span >月<span class="num">29</span>日</p> css html { writing-mode: vertical-rl; font: 24px serif } .num { text-combine-upright: all } results screenshotlive sample specifications specification status comment css writing modes level 4the definition of 'text-combine-upright' in that specification. candidate recommendation add digits value css writing modes module level 3the definition of 'text-combine-upright' in that specification. proposed recommendation initial definition ...
text-decoration-color - CSS: Cascading Style Sheets
candidate recommendation initial definition. the text-decoration property is now a shorthand to define multiple related properties. ...
text-decoration-line - CSS: Cascading Style Sheets
candidate recommendation initial definition. the text-decoration property is now a shorthand to define multiple related properties. ...
text-decoration-skip-ink - CSS: Cascading Style Sheets
working draft initial definition ...
text-decoration-skip - CSS: Cascading Style Sheets
working draft initial definition ...
text-decoration-style - CSS: Cascading Style Sheets
candidate recommendation initial definition. the text-decoration property is now a shorthand to define multiple related properties. ...
text-decoration-thickness - CSS: Cascading Style Sheets
working draft initial definition. note: the property used to be called text-decoration-width, but was updated in 2019 to text-decoration-thickness. ...
text-decoration - CSS: Cascading Style Sheets
css text decoration module level 3the definition of 'text-decoration' in that specification. candidate recommendation transformed into a shorthand property. added support for the valu...
text-emphasis-color - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
text-emphasis-position - CSS: Cascading Style Sheets
ng style rule: ruby { text-emphasis: none; } preferring emphasis marks over ruby some other editors prefer to hide ruby when they conflict with emphasis marks. in html, this can be done with the following pattern: em { text-emphasis: dot; /* set text-emphasis for <em> elements */ } em rt { display: none; /* hide ruby inside <em> elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification. candidate recommendation initial definition ...
text-emphasis-style - CSS: Cascading Style Sheets
ay truncate or ignore strings consisting of more than one grapheme cluster. formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ [ filled | open ] | [ dot | circle | double-circle | triangle | sesame ] ] | <string> examples h2 { text-emphasis-style: sesame; } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification. candidate recommendation initial definition ...
text-emphasis - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
text-indent - CSS: Cascading Style Sheets
working draft adds the hanging and each-line keywords. css level 2 (revision 1)the definition of 'text-indent' in that specification. recommendation the behavior with display: inline-block and anonymous block boxes is explicitly defined. css level 1the definition of ...
text-justify - CSS: Cascading Style Sheets
giat leo. cras eu elementum dui.</p> p { font-size: 1.5em; border: 1px solid black; padding: 10px; width: 95%; margin: 10px auto; text-align: justify; } .none { text-justify: none; } .auto { text-justify: auto; } .dist { text-justify: distribute; } .word { text-justify: inter-word; } .char { text-justify: inter-character; } specifications specification status comment css text module level 3the definition of 'text-justify' in that specification. working draft ...
text-orientation - CSS: Cascading Style Sheets
proposed recommendation initial definition. ...
text-overflow - CSS: Cascading Style Sheets
1234567890 …43. 1234567890 text-overflow: ',' clip ,3456 1234567890 ,4321 1234567890 text-overflow: ',' ellipsis ,34… 1234567890 ,43… 1234567890 text-overflow: ',' '.' ,34. 1234567890 ,43. 1234567890 specifications specification status comment css overflow module level 4 added the values <string> and fade and the fade() function css overflow module level 3the definition of 'text-overflow' in that specification. working draft initial definition a previous version of this interface reached the candidate recommendation status. as some not-listed-at-risk features needed to be removed, th...
text-rendering - CSS: Cascading Style Sheets
timizelegibility (in your browser; other browsers may vary). html <p class="speed">lyowat - ff fi fl ffl</p> <p class="legibility">lyowat - ff fi fl ffl</p> css p { font: 1.5em "constantia", "times new roman", "georgia", "palatino", serif } .speed { text-rendering: optimizespeed; } .legibility { text-rendering: optimizelegibility; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification. recommendation initial definition ...
text-shadow - CSS: Cascading Style Sheets
candidate recommendation the css property text-shadow was improperly defined in css2 and dropped in css2 (level 1). the css text module level 3 spec refined the syntax. later it was moved to css text decoration module level 3. ...
text-size-adjust - CSS: Cascading Style Sheets
editor's draft initial definition ...
text-transform - CSS: Cascading Style Sheets
ese into a single code point when converting these characters into full-width. full-size-kana <p>ァィゥェ ォヵㇰヶ ㇱㇲッㇳ ㇴㇵㇶㇷ ㇸㇹㇺャ ュョㇻㇼ ㇽㇾㇿヮ</p> <p>ァィゥェ ォヵㇰヶ ㇱㇲッㇳ ㇴㇵㇶㇷ ㇸㇹㇺャ ュョㇻㇼ ㇽㇾㇿヮ</p> </p> p:nth-of-type(2) { text-transform: full-size-kana; } specifications specification status comment css text module level 3the definition of 'text-transform' in that specification. working draft from css level 2 (revision 1)the definition of 'text-transform' in that specification., extends letters to any unicode character in the number or letter general category. modifies the behavior of capitalize to apply to the first letter of the word, ignoring initial punctuat...
text-underline-offset - CSS: Cascading Style Sheets
mples <p class="oneline">here's some text with an offset wavy red underline!</p> <br> <p class="twolines">this text has lines both above and below it. only the bottom one is offset.</p> p { text-decoration: underline wavy red; text-underline-offset: 1em; } .twolines { text-decoration-color: purple; text-decoration-line: underline overline; } specifications specification status comment css text decoration module level 4the definition of 'text-underline-offset' in that specification. working draft initial definition. ...
text-underline-position - CSS: Cascading Style Sheets
e text-underline-position property inherits and is not reset by the text-decoration shorthand property, it may be appropriate to set its value at a global level. for example, the under value may be appropriate for a document with lots of chemical and mathematical formulas, which make a large use of subscripts. :root { text-underline-position: under; } specifications specification status comment css text decoration module level 3the definition of 'text-underline-position' in that specification. candidate recommendation initial definition ...
<time-percentage> - CSS: Cascading Style Sheets
are not recommended. +0s zero with a leading + and a unit -0ms zero with a leading - and a unit invalid times 0 although unitless zero is allowed for <length>s, it's invalid for <time>s. 12.0 this is a <number>, not a <time>, because it's missing a unit. 7 ms no space is allowed between the number and the unit. specifications specification status comment css values and units module level 4the definition of '<time-percentage>' in that specification. editor's draft css values and units module level 3the definition of '<time-percentage>' in that specification. candidate recommendation defines <time-percentage>. adds calc() ...
<time> - CSS: Cascading Style Sheets
Web › CSS › time
are not recommended. +0s zero with a leading + and a unit -0ms zero with a leading - and a unit invalid times 0 although unitless zero is allowed for <length>s, it's invalid for <time>s. 12.0 this is a <number>, not a <time>, because it's missing a unit. 7 ms no space is allowed between the number and the unit. specifications specification status comment css values and units module level 4the definition of '<time>' in that specification. editor's draft css values and units module level 3the definition of '<time>' in that specification. candidate recommendation normative definition of s and ms. css level 2 (revision 1)the definition of '<time>' in that specification. recommendation infor...
top - CSS: Cascading Style Sheets
Web › CSS › top
working draft adds behavior for sticky positioning. css level 2 (revision 1)the definition of 'top' in that specification. recommendation initial definition. ...
touch-action - CSS: Cascading Style Sheets
tion examples disabling all gestures the most common usage is to disable all gestures on an element (and its non-scrollable descendants) that provides its own dragging and zooming behavior – such as a map or game surface. html <div id="map"></div> css #map { height: 400px; width: 400px; background: blue; touch-action: none; } result specifications specification status comment compatibility standardthe definition of 'touch-action' in that specification. living standard added pinch-zoom property value. pointer events – level 3the definition of 'touch-action' in that specification. editor's draft added pan-left, pan-right, pan-up, pan-down property values. pointer events – level 2the definition of 'touch-action' i...
transform-box - CSS: Cascading Style Sheets
working draft initial definition ...
matrix() - CSS: Cascading Style Sheets
working draft initial definition ...
matrix3d() - CSS: Cascading Style Sheets
editor's draft initial definition ...
perspective() - CSS: Cascading Style Sheets
editor's draft initial definition ...
rotate() - CSS: Cascading Style Sheets
working draft initial definition ...
rotate3d() - CSS: Cascading Style Sheets
editor's draft initial definition ...
rotateX() - CSS: Cascading Style Sheets
d space and can't be represented on the plane. 1000cos(a)-sin(a)0sin(a)cos(a) 10000cos(a)-sin(a)00sin(a)cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatex(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatex()' in that specification. editor's draft initial definition ...
rotateY() - CSS: Cascading Style Sheets
d space and can't be represented on the plane. cos(a)0sin(a)010-sin(a)0cos(a) cos(a)0sin(a)00100-sin(a)0cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatey(60deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatey()' in that specification. editor's draft initial definition ...
rotateZ() - CSS: Cascading Style Sheets
and can't be represented on the plane. cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)00 sin(a)cos(a)00 0010 0001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatez(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatez()' in that specification. editor's draft initial definition ...
scale() - CSS: Cascading Style Sheets
working draft initial definition ...
scale3d() - CSS: Cascading Style Sheets
editor's draft initial definition ...
scaleX() - CSS: Cascading Style Sheets
working draft initial definition ...
scaleY() - CSS: Cascading Style Sheets
working draft initial definition ...
scaleZ() - CSS: Cascading Style Sheets
editor's draft initial definition ...
skew() - CSS: Cascading Style Sheets
working draft initial definition ...
skewX() - CSS: Cascading Style Sheets
working draft initial definition ...
skewY() - CSS: Cascading Style Sheets
working draft initial definition ...
translate() - CSS: Cascading Style Sheets
working draft initial definition ...
translate3d() - CSS: Cascading Style Sheets
editor's draft initial definition ...
translateX() - CSS: Cascading Style Sheets
working draft initial definition ...
translateY() - CSS: Cascading Style Sheets
working draft initial definition ...
translateZ() - CSS: Cascading Style Sheets
value is less than the translatez() value, such as transform: perspective(200px) translatez(300px); the transformed element will not be visible as it is further than the user's viewport. the smaller the difference between the perspective and transform values, the closer the user is to the element and the larger the translated element will seem. result specifications specification status comment css transforms level 2the definition of 'transform' in that specification. editor's draft adds 3d transform functions to the css transforms standard. ...
<transform-function> - CSS: Cascading Style Sheets
editor's draft added 3d transform functions. css transforms level 1the definition of '<transform-function>' in that specification. working draft initial definition ...
transform-origin - CSS: Cascading Style Sheets
working draft ...
transform-style - CSS: Cascading Style Sheets
editor's draft initial definition. ...
transform - CSS: Cascading Style Sheets
Web › CSS › transform
editor's draft adds 3d transform functions. css transforms level 1the definition of 'transform' in that specification. working draft initial definition. ...
transition-delay - CSS: Cascading Style Sheets
working draft initial definition ...
transition-duration - CSS: Cascading Style Sheets
working draft initial definition ...
transition-property - CSS: Cascading Style Sheets
working draft initial definition ...
transition-timing-function - CSS: Cascading Style Sheets
working draft initial definition ...
transition - CSS: Cascading Style Sheets
working draft initial definition ...
translate - CSS: Cascading Style Sheets
Web › CSS › translate
editor's draft initial definition. initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextye...
unicode-bidi - CSS: Cascading Style Sheets
proposed recommendation added plaintext, isolate, and isolate-override keywords. css level 2 (revision 1)the definition of 'unicode-bidi' in that specification. recommendation initial definition. ...
unset - CSS: Cascading Style Sheets
Web › CSS › unset
candidate recommendation no changes from level 3. css cascading and inheritance level 3the definition of 'unset' in that specification. candidate recommendation initial definition. ...
url() - CSS: Cascading Style Sheets
Web › CSS › url()
editor's draft css values and units module level 3the definition of 'url()' in that specification. candidate recommendation no significant change from css level 2 (revision 1). css level 2 (revision 1)the definition of 'uri()' in that specification. recomme...
<url> - CSS: Cascading Style Sheets
Web › CSS › url
the url. <a_css_property>: url("http://mysite.example.com/mycursor.png") <a_css_property>: url('http://mysite.example.com/mycursor.png') <a_css_property>: url(http://mysite.example.com/mycursor.png) examples .topbanner { background: url("topbanner.png") #00d no-repeat fixed; } ul { list-style: square url(http://www.example.com/redball.png); } specifications specification status comment css values and units module level 4the definition of '<url>' in that specification. editor's draft css values and units module level 3the definition of '<url>' in that specification. candidate recommendation no significant change from css level 2 (revision 1). css level 2 (revision 1)the definition of '<uri>' in that specification. recomme...
Used value - CSS: Cascading Style Sheets
working draft no change. css level 2 (revision 1)the definition of 'used value' in that specification. recommendation initial definition. ...
user-select - CSS: Cascading Style Sheets
working draft initial definition. also defines -webkit-user-select as a deprecated alias of user-select. ...
var() - CSS: Cascading Style Sheets
Web › CSS › var
candidate recommendation initial definition ...
vertical-align - CSS: Cascading Style Sheets
recommendation adds the <length> value and allows it to be applied to elements with a display type of table-cell. css level 1the definition of 'vertical-align' in that specification. recommendation initial definition. ...
visibility - CSS: Cascading Style Sheets
candidate recommendation defines the collapse value as it applies to flex items. css level 2 (revision 1)the definition of 'visibility' in that specification. recommendation initial definition. ...
white-space - CSS: Cascading Style Sheets
olore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> result specifications specification status comment css text module level 3the definition of 'white-space' in that specification. working draft precisely defines the breaking algorithms. css level 2 (revision 1)the definition of 'white-space' in that specification. recommendation initial definition. ...
widows - CSS: Cascading Style Sheets
Web › CSS › widows
cond paragraph containing some more text than the first one. it is used to demonstrate how widows work.</p> <p>this is the third paragraph. it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; columns: 3; widows: 2; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'widows' in that specification. candidate recommendation extends widows to apply to any type of fragment, including pages, regions, or columns. css multi-column layout modulethe definition of 'widows' in that specification. working draft recommendations to consider widows in relation to columns. ...
width - CSS: Cascading Style Sheets
Web › CSS › width
editor's draft css box sizing module level 3the definition of 'width' in that specification. working draft added the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'width' in that specification. recommendation precise...
will-change - CSS: Cascading Style Sheets
candidate recommendation initial definition ...
word-break - CSS: Cascading Style Sheets
working draft initial definition ...
word-spacing - CSS: Cascading Style Sheets
working draft replaces the previous values with a <spacing-limit> value that defines the same thing, plus the <percentage> value. allows up to three values describing the optimum, minimum, and maximum value. css level 2 (revision 1)the definition of 'word-spacing' in that specific...
writing-mode - CSS: Cascading Style Sheets
candidate recommendation add sideways-lr and sideways-rl css writing modes module level 3the definition of 'writing-mode' in that specification. proposed recommendation initial definition ...
z-index - CSS: Cascading Style Sheets
Web › CSS › z-index
recommendation initial definition ...
touchstart - Event reference
the touchstart event is fired when one or more touch points are placed on the touch surface. two types of object can be the target of this event. element: touchstart document: touchstart bubbles yes cancelable yes interface touchevent event handler property ontouchstart specifications specification status touch events recommendation ...
Block formatting context - Developer guides
ss. margin collapsing creating a new bfc to avoid the margin collapsing between two neighbor div: html <div class="blue"></div> <div class="red-outer"> <div class="red-inner">red inner</div> </div> css .blue, .red-inner { height: 50px; margin: 10px 0; } .blue { background: blue; } .red-outer { overflow: hidden; background: red; } specifications specification status comment css display module level 3the definition of 'block formatting context' in that specification. candidate recommendation define bfc(abbr) etc. css level 2 (revision 1)the definition of 'block formatting context' in that specification. recommendation initial definition. see also float, clear css key concepts: css syntax, at-rule, comments, ...
DOM onevent handlers - Developer guides
tes in html or properties in web apis, such as <button onclick="alert(this)"> or window.onload = function() { … }. when discussing the various methods of listening to events: event listener refers to a function or object registered via eventtarget.addeventlistener() event handler refers to a function registered via on… attributes or properties specifications specification status comment html living standardthe definition of 'event handlers' in that specification. living standard html5the definition of 'event handlers' in that specification. recommendation browser compatibility detecting the presence of event handler properties you can detect the presence of an event handler property with the javascript in operator. for exam...
HTML5 - Developer guides
Web › Guide › HTML › HTML5
ui displayed. pointer lock api allows locking the pointer to the content, so games and similar applications don't lose focus when the pointer reaches the window limit. online and offline events in order to build a good offline-capable web application, you need to know when your application is actually offline. incidentally, you also need to know when your application has returned to an online status again. device access touch events handlers to react to events created by a user pressing touch screens. using geolocation let browsers locate the position of the user using geolocation. detecting device orientation get the information when the device on which the browser runs changes orientation. this can be used as an input device (e.g., to make games that react to the position of the ...
Printing - Developer guides
a popup window (for example, the printer-friendly version of a document) after the user prints its contents, you can use code like this: <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>javascript window close example </title> <script type="text/javascript"> function popuponclick() { my_window = window.open('', 'mywindow', 'status=1,width=350,height=150'); my_window.document.write('<html><head><title>print me</title></head>'); my_window.document.write('<body onafterprint="self.close()">'); my_window.document.write('<p>when you print this window, it will close afterward.</p>'); my_window.document.write('</body></html>'); } </script> </head> <body> <p>to try out the <code>afterprint</code> event...
The Web Open Font Format (WOFF) - Developer guides
Web › Guide › WOFF
erty to use woff fonts for text in web content. it works exactly like opentype and truetype format fonts do, except it will likely let your content download more efficiently due to the addition of compression. tools for working with woff fonts tools for working with woff fonts are available. sfnt2woff and woff2sfnt convert between woff and opentype. specifications specification status comment woff file format 2.0 recommendation new compression algorithm woff file format 1.0 recommendation initial specification. ...
HTML attribute: accept - HTML: Hypertext Markup Language
. let's look at a more complete example: <form method="post" enctype="multipart/form-data"> <div> <label for="profile_pic">choose file to upload</label> <input type="file" id="profile_pic" name="profile_pic" accept=".jpg, .jpeg, .png"> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } specifications specification status html living standardthe definition of 'accept attribute' in that specification. living standard html 5.1the definition of 'accept attribute' in that specification. recommendation ...
The HTML autocomplete attribute - HTML: Hypertext Markup Language
and following seven digits shows the postal code. ...
HTML attribute: capture - HTML: Hypertext Markup Language
recommendation ...
HTML attribute: crossorigin - HTML: Hypertext Markup Language
ser-credentials. <script src="https://example.com/example-framework.js" crossorigin="anonymous"></script> example: webmanifest with credentials the use-credentials value must be used when fetching a manifest that requires credentials, even if the file is from the same origin. <link rel="manifest" href="/app.webmanifest" crossorigin="use-credentials"> specifications specification status comment html living standardthe definition of 'cors settings attributes' in that specification. living standard html living standardthe definition of 'crossorigin' in that specification. living standard ...
disabled - HTML: Hypertext Markup Language
living standard html5the definition of 'disabled attribute' in that specification. recommendation html 5.1the definition of 'disabled attribute' in that specification. recommendation ...
HTML attribute: maxlength - HTML: Hypertext Markup Language
pplied when the value is changed by the user. constraint validation while the browser will generally prevent user from entering more text than the maxlength attribute allows, should the length be longer than the maxlength allows, the read-only toolong property of a validitystate object will be true. examples <input type="password" maxlength="4"/> specifications specification status html living standardthe definition of 'maxlength attribute' in that specification. living standard html 5.1the definition of 'maxlength attribute' in that specification. recommendation ...
HTML attribute: minlength - HTML: Hypertext Markup Language
s to style the element based on whether the value is valid. the value will be valid as long as it is either null (empty) or five or more characters long. lime is invalid, lemon is valid. input { border: 2px solid currentcolor; } input:invalid { border: 2px dashed red; } input:invalid:focus { background-image: linear-gradient(pink, lightgreen); } specifications specification status html living standardthe definition of 'minlength attribute' in that specification. living standard html 5.1the definition of 'minlength attribute' in that specification. recommendation ...
HTML attribute: multiple - HTML: Hypertext Markup Language
contiguous items by focusing on the <select> element, selecting an item at the top or bottom of the range they want to select using the up and down cursor keys to go up and down the options. the selection of non-contiguous is not as well supported: items should be able to be selected and deselected by pressing space , but support varies between browsers. specifications specification status comment html living standardthe definition of 'multiple attribute' in that specification. living standard html5the definition of 'multiple attribute' in that specification. recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls. indicate any required and optional i...
HTML attribute: pattern - HTML: Hypertext Markup Language
eral reasons you must include information informing users how to fill out the the control to match the requirements. while titles are used by some browsers to populate error messaging, because browsers sometimes also show the title as text on hover, it therefore shows in non-error situations, so be careful not to word titles as if an error has occurred. specifications specification status comment html living standardthe definition of 'pattern' in that specification. living standard html 5.1the definition of 'pattern' in that specification. recommendation html5the definition of 'pattern' in that specification. recommendation ...
HTML attribute: readonly - HTML: Hypertext Markup Language
living standard html5the definition of 'readonly attribute' in that specification. recommendation html 5.1the definition of 'readonly attribute' in that specification. recommendation ...
HTML attribute: required - HTML: Hypertext Markup Language
based on the required attribute, but adding aria-required="true" doesn't hurt, in case the browser / screen reader combination does not support required yet. constraint validation if the element is required and the element's value is the empty string, then the element is suffering from valuemissing and the element will match the :invalid pseudo class. specifications specification status comment html living standardthe definition of 'required attribute' in that specification. living standard html5the definition of 'required attribute' in that specification. recommendation html 5.1the definition of 'required attribute' in that specification. recommendation accessibility concerns provide an indication to users informing...
HTML attribute: size - HTML: Hypertext Markup Language
Web › HTML › Attributes › size
living standard html 5.1the definition of 'size attribute' in that specification. recommendation ...
HTML attribute: step - HTML: Hypertext Markup Language
Web › HTML › Attributes › step
e number spinner, if present, will only show valid float values of 1.2 and greater note: when the data entered by the user doesn't adhere to the stepping configuration, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and stepmismatch for more information. specifications specification status comment html living standardthe definition of 'step attribute' in that specification. living standard html5the definition of 'step attribute' in that specification. recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls. indicate any required and optional input, da...
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
e two <nav> sections, one called "primary navigation" and one called "footer navigation". if labels were not provided, the person using screen reading software may have to investigate each nav element's contents to determine their purpose. using the aria-labelledby attribute labeling regions • page structure • w3c wai web accessibility tutorials specifications specification status comment html living standardthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. living standard html5the definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. recommendation html 4.01 specificationthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. recommendation ...
<a>: The Anchor element - HTML: Hypertext Markup Language
Web › HTML › Element › a
arge touch targets proximity interactive elements, like links, placed in close visual proximity should have space separating them. spacing helps people with motor control issues, who may otherwise accidentally activate the wrong interactive content. spacing may be created using css properties like margin. hand tremors and the giant-button-problem specifications specification status comment referrer policythe definition of 'referrer attribute' in that specification. candidate recommendation added the referrerpolicy attribute. html living standardthe definition of '<a>' in that specification. living standard html5the definition of '<a>' in that specification. recommendation html 4.01 specificationthe definition of...
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
Web › HTML › Element › abbr
, especially if the content is technical or industry jargon. example <p>javascript object notation (<abbr>json</abbr>) is a lightweight data-interchange format.</p> this is especially helpful for people who are unfamiliar with the terminology or concepts discussed in the content, people who are new to the language, and people with cognitive concerns. specifications specification status comment html living standardthe definition of '<abbr>' in that specification. living standard html5the definition of '<abbr>' in that specification. recommendation html 4.01 specificationthe definition of '<abbr>' in that specification. recommendation ...
<acronym> - HTML: Hypertext Markup Language
Web › HTML › Element › acronym
d a dotted underline to the content of the element. a few browsers not only add a dotted underline, but also put it in small caps; to avoid this styling, adding something like font-variant: none in the css takes care of this case. it is therefore recommended that web authors either explicitly style this element, or accept some cross-browser variation. specifications specification status comment html 4.01 specificationthe definition of '<acronym>' in that specification. recommendation browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet explor...
<address>: The Contact Address element - HTML: Hypertext Markup Language
Web › HTML › Element › address
living standard html5the definition of '<address>' in that specification. recommendation html 4.01 specificationthe definition of '<address>' in that specification. recommendation ...
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
Web › HTML › Element › applet
tional vertical space, in pixels, to be reserved above and below the applet. width this attribute specifies in pixels the width that the applet needs. example html <applet code="game.class" align="left" archive="game.zip" height="250" width="350"> <param name="difficulty" value="easy"> <b>sorry, you need java to play this game.</b> </applet> specifications specification status comment html 5.2the definition of '<applet>' in that specification. recommendation html 5.1the definition of '<applet>' in that specification. recommendation html5the definition of '<applet>' in that specification. recommendation made obsolete html 4.01 specificationthe definition of '<applet>' in that specification. recommendation...
<area> - HTML: Hypertext Markup Language
Web › HTML › Element › area
candidate recommendation added the referrerpolicy attribute. html living standardthe definition of '<area>' in that specification. living standard html5the definition of '<area>' in that specification. recommendation html 4.01 specificationthe d...
<article>: The Article Contents element - HTML: Hypertext Markup Language
Web › HTML › Element › article
<p>i agree, dinos are my favorite.</p> <footer> <p> posted on <time datetime="2015-05-17 19:00">may 17</time> by tom. </p> </footer> </article> </section> <footer> <p> posted on <time datetime="2015-05-15 19:00">may 15</time> by staff. </p> </footer> </article> specifications specification status comment html living standardthe definition of '<article>' in that specification. living standard html 5.1the definition of '<article>' in that specification. recommendation html5the definition of '<article>' in that specification. recommendation ...
<aside>: The Aside element - HTML: Hypertext Markup Language
Web › HTML › Element › aside
icle. the paragraph is only indirectly related to the main article content: <article> <p> the disney movie <cite>the little mermaid</cite> was first released to theatres in 1989. </p> <aside> <p> the movie earned $87 million during its initial release. </p> </aside> <p> more info about the movie... </p> </article> specifications specification status comment html living standardthe definition of '<aside>' in that specification. living standard html5the definition of '<aside>' in that specification. recommendation ...
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
Web › HTML › Element › audio
ntent that contains no <audio> or <video> media elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts embedded content. implicit aria role no corresponding role permitted aria roles application dom interface htmlaudioelement specifications specification status comment html living standardthe definition of '<audio>' in that specification. living standard html5the definition of '<audio>' in that specification. recommendation ...
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
Web › HTML › Element › b
use the css font-weight property with the value "bold" instead in order to make text bold. examples <p> this article describes several <b class="keywords">text-level</b> elements. it explains their usage in an <b class="keywords">html</b> document. </p> keywords are displayed with the default style of the <b>element, likely in bold.</b> result specifications specification status comment html living standardthe definition of '<b>' in that specification. living standard html5the definition of '<b>' in that specification. recommendation html 4.01 specificationthe definition of '<b>' in that specification. recommendation ...
<base>: The Document Base URL element - HTML: Hypertext Markup Language
Web › HTML › Element › base
.the link points to https://example.com/#anchor. open graph open graph tags do not acknowledge <base>, and should always have full absolute urls. for example: <meta property="og:image" content="https://example.com/thumbnail.jpg"> examples <base href="https://www.example.com/"> <base target="_blank"> <base target="_top" href="https://example.com/"> specifications specification status comment html living standardthe definition of '<base>' in that specification. living standard no change since last snapshot. html5the definition of '<base>' in that specification. recommendation specified the behavior of target html 4.01 specificationthe definition of '<base>' in that specification. recommendation added the target attribute ...
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
Web › HTML › Element › bdi
living standard html5the definition of '<bdi>' in that specification. recommendation ...
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
Web › HTML › Element › bdo
indicates that the text should go in a right-to-left direction. examples <!-- switch text direction --> <p>this text will go left to right.</p> <p><bdo dir="rtl">this text will go right to left.</bdo></p> result notes the html 4 specification did not specify events for this element; they were added in xhtml. this is most likely an oversight. specifications specification status comment html living standardthe definition of '<bdo>' in that specification. living standard html5the definition of '<bdo>' in that specification. recommendation html 4.01 specificationthe definition of '<bdo>' in that specification. recommendation ...
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
thout significant interference with each other, outside of early spring. this is because of the 3d ether space available to the carriers, in contrast to the 1d ether used by ieee802.3. the carriers have an intrinsic collision avoidance system, which increases availability.</p> </blockquote> the output from this html snippet looks like this: specifications specification status comment html living standardthe definition of '<blockquote>' in that specification. living standard html5the definition of '<blockquote>' in that specification. recommendation html 4.01 specificationthe definition of '<blockquote>' in that specification. recommendation ...
<body>: The Document Body element - HTML: Hypertext Markup Language
Web › HTML › Element › body
-conforming, use css margin-top property on the element instead. vlink color of text for visited hypertext links. this method is non-conforming, use css color property in conjunction with the :visited pseudo-class instead. example <html> <head> <title>document title</title> </head> <body> <p>this is a paragraph</p> </body> </html> specifications specification status comment html living standardthe definition of '<body>' in that specification. living standard changed the list of non-conforming features. html5the definition of '<body>' in that specification. recommendation obsoleted the formerly deprecated attributes. defined the behavior of the non-conforming and never standardized topmargin, leftmargin, rightmargin and bo...
<br>: The Line Break element - HTML: Hypertext Markup Language
Web › HTML › Element › br
ent. tag omission must have a start tag, and must not have an end tag. in xhtml documents, write this element as <br />. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles none, presentation dom interface htmlbrelement specifications specification status comment html living standardthe definition of '<br>' in that specification. living standard html5the definition of '<br>' in that specification. recommendation html 4.01 specificationthe definition of '<br>' in that specification. recommendation ...
<button>: The Button element - HTML: Hypertext Markup Language
Web › HTML › Element › button
living standard html5the definition of '<button>' in that specification. recommendation html 4.01 specificationthe definition of '<button>' in that specification. recommendation ...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
Web › HTML › Element › canvas
is. in general, you should avoid using canvas in an accessible website or app. the following guides can help to make it more accessible. mdn hit regions and accessability canvas accessibility use cases canvas element accessibility issues html5 canvas accessibility in firefox 13 – by steve faulkner best practices for interactive canvas elements specifications specification status comment html living standardthe definition of '<canvas>' in that specification. living standard html5the definition of '<canvas>' in that specification. recommendation initial definition ...
<caption>: The Table Caption element - HTML: Hypertext Markup Language
Web › HTML › Element › caption
> <td>user1@sample.com</td> </tr> <tr> <td>user2</td> <td>user2@sample.com</td> </tr> </table> caption { caption-side: top; align: right; } table { border-collapse: collapse; border-spacing: 0px; } table, th, td { border: 1px solid black; } table {background: red;} do not alter caption. for that you need display: block. specifications specification status comment html living standardthe definition of '<caption>' in that specification. living standard html5the definition of '<caption>' in that specification. recommendation html 4.01 specificationthe definition of '<caption>' in that specification. recommendation ...
<cite>: The Citation element - HTML: Hypertext Markup Language
Web › HTML › Element › cite
ial which is contained within a <blockquote> or <q> element, use the cite attribute on the element. typically, browsers style the contents of a <cite> element in italics by default. to avoid this, apply the css font-style property to the <cite> element. example <p>more information can be found in <cite>[iso-0000]</cite>.</p> the html above outputs: specifications specification status comment html living standardthe definition of '<cite>' in that specification. living standard html5the definition of '<cite>' in that specification. recommendation html 4.01 specificationthe definition of '<cite>' in that specification. recommendation ...
<code>: The Inline Code element - HTML: Hypertext Markup Language
Web › HTML › Element › code
e this: notes to represent multiple lines of code, wrap the <code> element within a <pre> element. the <code> element by itself only represents a single phrase of code or line of code. a css rule can be defined for the code selector to override the browser's default font face. preferences set by the user might take precedence over the specified css. specifications specification status comment html living standardthe definition of '<code>' in that specification. living standard html5the definition of '<code>' in that specification. recommendation html 4.01 specificationthe definition of '<code>' in that specification. recommendation ...
<col> - HTML: Hypertext Markup Language
Web › HTML › Element › col
rent column group. in addition to the standard pixel and percentage values, this attribute might take the special form 0*, which means that the width of each column in the group should be the minimum width necessary to hold the column's contents. relative widths such as 0.5* also can be used. examples please see the <table> page for examples on <col>. specifications specification status comment html living standardthe definition of '<col>' in that specification. living standard html5the definition of '<col>' in that specification. recommendation html 4.01 specificationthe definition of '<col>' in that specification. recommendation initial definition ...
<colgroup> - HTML: Hypertext Markup Language
Web › HTML › Element › colgroup
is the ordinal position of the column in the table. only after this selector the vertical-align property can be used. if the table does use a colspan attribute, the effect can be achieved by combining adequate css attribute selectors like [colspan=n], though this is not trivial. examples please see the <table> page for examples on <colgroup>. specifications specification status comment html living standardthe definition of '<colgroup>' in that specification. living standard html5the definition of '<colgroup>' in that specification. recommendation html 4.01 specificationthe definition of '<colgroup>' in that specification. recommendation ...
<command>: The HTML Command element - HTML: Hypertext Markup Language
Web › HTML › Element › command
. command or empty which is the default state and indicates that this is a normal command. checkbox indicates that the command can be toggled using a checkbox. radio indicates that the command can be toggled using a radio button. examples <command type="command" label="save" icon="icons/save.png" onclick="save()"> specifications specification status comment html5the definition of '<command>' in that specification. recommendation ...
<data> - HTML: Hypertext Markup Language
Web › HTML › Element › data
he machine-readable translation of the content of the element. examples the following example displays product names but also associates each name with a product number. <p>new products</p> <ul> <li><data value="398">mini ketchup</data></li> <li><data value="399">jumbo ketchup</data></li> <li><data value="400">mega jumbo ketchup</data></li> </ul> specifications specification status comment html living standardthe definition of '<data>' in that specification. living standard no change from html5 html5the definition of '<data>' in that specification. recommendation initial definition. ...
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
Web › HTML › Element › datalist
living standard html5the definition of '<datalist>' in that specification. recommendation ...
<dd>: The Description Details element - HTML: Hypertext Markup Language
Web › HTML › Element › dd
it aria role definition permitted aria roles no role permitted dom interface htmlelement attributes this element's attributes include the global attributes. nowrap if the value of this attribute is set to yes, the definition text will not wrap. the default value is no. example for an example, see <dl> examples. specifications specification status comment html living standardthe definition of '<dd>' in that specification. living standard html5the definition of '<dd>' in that specification. recommendation html 4.01 specificationthe definition of '<dd>' in that specification. recommendation ...
<del>: The Deleted Text element - HTML: Hypertext Markup Language
Web › HTML › Element › del
rately disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been deleted would adversely affect understanding. short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<del>' in that specification. living standard html5the definition of '<del>' in that specification. recommendation html 4.01 specificationthe definition of '<del>' in that specification. recommendation ...
<dfn>: The Definition element - HTML: Hypertext Markup Language
Web › HTML › Element › dfn
any device ever built.</p> note the <abbr> element nested inside the <dfn>. the former establishes that the term is an abbreviation ("hst") and specifies the full term ("hubble space telescope") in its title attribute. the latter indicates that the abbreviated term represents a term being defined. result the output of the above code looks like this: specifications specification status comment html living standardthe definition of '<dfn>' in that specification. living standard html5the definition of '<dfn>' in that specification. recommendation html 4.01 specificationthe definition of '<dfn>' in that specification. recommendation ...
<dialog>: The Dialog element - HTML: Hypertext Markup Language
Web › HTML › Element › dialog
living standard html 5.2the definition of '<dialog>' in that specification. recommendation initial definition ...
<div>: The Content Division element - HTML: Hypertext Markup Language
Web › HTML › Element › div
pply the style named "shadowbox" to the element. html <div class="shadowbox"> <p>here's a very interesting note displayed in a lovely shadowed box.</p> </div> css .shadowbox { width: 15em; border: 1px solid #333; box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications specification status comment html living standardthe definition of '<div>' in that specification. living standard no changes since the latest snapshot html5the definition of '<div>' in that specification. recommendation obsoleted align html 4.01 specificationthe definition of '<div>' in that specification. recommendation ...
<dl>: The Description List element - HTML: Hypertext Markup Language
Web › HTML › Element › dl
concerns each screen reader announces <dl> content differently. some screen readers, such as voiceover on ios, will not announce that <dl> content is a list. because of this, make sure each list item's content is written in such a way that it communicates its relationship to the other list items in the list grouping. codepen - html buddies: dt & dd specifications specification status comment html living standardthe definition of '<dl>' in that specification. living standard html5the definition of '<dl>' in that specification. recommendation html 4.01 specificationthe definition of '<dl>' in that specification. recommendation initial definition ...
<dt>: The Description Term element - HTML: Hypertext Markup Language
Web › HTML › Element › dt
implicit aria role term permitted aria roles listitem dom interface htmlelement up to gecko 1.9.2 (firefox 4) inclusive, firefox implements the htmlspanelement interface for this element. attributes this element only includes the global attributes. example for an example, see the example provided for the <dl> element. specifications specification status comment html living standardthe definition of '<dt>' in that specification. living standard html5the definition of '<dt>' in that specification. recommendation html 4.01 specificationthe definition of '<dt>' in that specification. recommendation ...
<em>: The Emphasis element - HTML: Hypertext Markup Language
Web › HTML › Element › em
object in question is not a queen named mary, but a ship named queen mary. another example for <i> could be: "the word the is an article". example the <em> element is often used to indicate an implicit or explicit contrast. <p> in html 5, what was previously called <em>block-level</em> content is now called <em>flow</em> content. </p> result specifications specification status comment html living standardthe definition of '<em>' in that specification. living standard html5the definition of '<em>' in that specification. recommendation html 4.01 specificationthe definition of '<em>' in that specification. recommendation ...
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
Web › HTML › Element › embed
ive technology such as a screen reader can understand what it contains. the title's value should concisely describe the embedded content. without a title, they may not be able to determine what its embedded content is. this context shift can be confusing and time-consuming, especially if the embed element contains interactive content like video or audio. specifications specification status comment html living standardthe definition of '<embed>' in that specification. living standard html5the definition of '<embed>' in that specification. recommendation ...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
Web › HTML › Element › fieldset
an optional <legend> element, followed by flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role group permitted aria roles radiogroup, presentation, none dom interface htmlfieldsetelement specifications specification status comment html living standardthe definition of '<fieldset>' in that specification. living standard definition of the fieldset element html5the definition of '<fieldset>' in that specification. recommendation html 4.01 specificationthe definition of '<fieldset>' in that specification. recommendation initial definition ...
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
element; the <figcaption> element must be its first or last child. implicit aria role no corresponding role permitted aria roles group, none, presentation dom interface htmlelement attributes this element only includes the global attributes. examples please see the <figure> page for examples on <figcaption>. specifications specification status comment html living standardthe definition of '<figcaption>' in that specification. living standard html5the definition of '<figcaption>' in that specification. recommendation ...
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
Web › HTML › Element › figure
living standard html 5.2the definition of '<figure>' in that specification. recommendation no changes from html 5.0. html5the definition of '<figure>' in that specification. recommendation ...
<footer> - HTML: Hypertext Markup Language
Web › HTML › Element › footer
r> accessibility concerns the voiceover screen reader has an issue where the footer landmark role is not announced in the landmark rotor. to address this, add role="contentinfo" to the footer element. webkit bugzilla: 146930 – ax: html native elements (header, footer, main, aside, nav) should work the same as aria landmarks, sometimes they don't specifications specification status comment html living standardthe definition of '<footer>' in that specification. living standard html5the definition of '<footer>' in that specification. recommendation ...
<form> - HTML: Hypertext Markup Language
Web › HTML › Element › form
living standard html5the definition of '<form>' in that specification. recommendation html 4.01 specificationthe definition of '<form>' in that specification. recommendation initial definition ...
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
Web › HTML › Element › head
tributes. profile the uris of one or more metadata profiles, separated by white space. example <!doctype html> <html> <head> <title>document title</title> </head> </html> notes html5-compliant browsers automatically create a <head> element if its tags are omitted in the markup. this auto-creation is not guaranteed in ancient browsers. specifications specification status comment html living standardthe definition of '<head>' in that specification. living standard no change from latest shapshot html5the definition of '<head>' in that specification. recommendation obsoleted profile html 4.01 specificationthe definition of '<head>' in that specification. recommendation ...
<header> - HTML: Hypertext Markup Language
Web › HTML › Element › header
living standard html5the definition of '<header>' in that specification. recommendation ...
<hgroup> - HTML: Hypertext Markup Language
Web › HTML › Element › hgroup
living standard ...
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
Web › HTML › Element › hr
html <p> this is the first paragraph of text. this is the first paragraph of text. this is the first paragraph of text. this is the first paragraph of text. </p> <hr> <p> this is the second paragraph of text. this is the second paragraph of text. this is the second paragraph of text. this is the second paragraph of text. </p> result specifications specification status comment html living standardthe definition of '<hr>' in that specification. living standard definition of the <hr> element html5the definition of '<hr>' in that specification. recommendation html 4.01 specificationthe definition of '<hr>' in that specification. recommendation the align, noshade, size, and width attributes are deprecated ...
manifest - HTML: Hypertext Markup Language
Web › HTML › Element › html › manifest
url of a application cache manifest that is downloaded in the early stages of page load. note: manifest-based caching mechanism has been deprecated. use service workers instead. the manifest attribute has only effect during early stages of page load, thus changing it via regular dom interfaces has no effect, window.applicationcache interface instead. specifications specification status comment html5the definition of '<html> manifest attribute' in that specification. recommendation added support for the manifest attribute and deprecated it later ...
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
Web › HTML › Element › html
set language, which may cause mispronunciations. including a valid lang declaration on the <html> element also ensures that important metadata contained in the page's <head>, such as the page's <title>, are also announced properly. mdn understanding wcag, guideline 3.1 explanations understanding success criterion 3.1.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<html>' in that specification. living standard html5the definition of '<html>' in that specification. recommendation added support for the manifest attribute (deprecated later). obsoleted the version attribute html 4.01 specificationthe definition of '<html>' in that specification. recommendation ...
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
Web › HTML › Element › i
vance. use <cite> to mark up the name of a work, such as a book, play, or song. use <dfn> to mark up the defining instance of a term. examples this example demonstrates using the <i> element to mark text that is in another language. <p>the latin phrase <i>veni, vidi, vici</i> is often mentioned in music, art, and literature.</p> result specifications specification status comment html living standardthe definition of '<i>' in that specification. living standard html5the definition of '<i>' in that specification. recommendation html 4.01 specificationthe definition of '<b>' in that specification. recommendation ...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
Web › HTML › Element › iframe
="wikipedia page for avocados" src="https://en.wikipedia.org/wiki/avocado"></iframe> without this title, they have to navigate into the <iframe> to determine what its embedded content is. this context shift can be confusing and time-consuming, especially for pages with multiple <iframe>s and/or if embeds contain interactive content like video or audio. specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy attribute. html living standardthe definition of '<iframe>' in that specification. living standard html5the definition of '<iframe>' in that specification. recommendation html 4.01 specificationt...
<img>: The Image Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › img
candidate recommendation added the referrerpolicy attribute. html living standardthe definition of '<img>' in that specification. living standard html5the definition of '<img>' in that specification. recommendation html 4.01 specificationthe definitio...
<input type="button"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › button
living standard html5the definition of '<input type="button">' in that specification. recommendation ...
<input type="checkbox"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › checkbox
living standard html5the definition of '<input type="checkbox">' in that specification. recommendation ...
<input type="color"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › color
e final selected color: function updateall(event) { document.queryselectorall("p").foreach(function(p) { p.style.color = event.target.value; }); } this sets the color of every <p> block so that its color attribute matches the current value of the color input, which is referred to using event.target. result the final result looks like this: specifications specification status comment html living standard living standard initial definition html5 recommendation initial definition ...
<input type="date"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › date
living standard html5the definition of '<input type="date">' in that specification. recommendation ...
<input type="datetime-local"> - HTML: Hypertext Markup Language
living standard html5the definition of '<input type="datetime-local">' in that specification. recommendation ...
<input type="email"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › email
living standard initial definition html 5.1the definition of '<input type="email">' in that specification. recommendation initial definition ...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
into a nicely formatted size in bytes/kb/mb. function returnfilesize(number) { if(number < 1024) { return number + 'bytes'; } else if(number >= 1024 && number < 1048576) { return (number/1024).tofixed(1) + 'kb'; } else if(number >= 1048576) { return (number/1048576).tofixed(1) + 'mb'; } } the example looks like this; have a play: specifications specification status comment html living standardthe definition of '<input type="file">' in that specification. living standard initial definition html 5.1the definition of '<input type="file">' in that specification. recommendation initial definition html media capturethe definition of 'capture attribute' in that specification. recommendation initial capture attrib...
<input type="hidden"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › hidden
he example on github (see the source code, and also see it running live). when submitted, the form data sent to the server will look something like this: title=my+excellent+blog+post&content=this+is+the+content+of+my+excellent+blog+post.+i+hope+you+enjoy+it!&postid=34657 even though the hidden input cannot be seen at all, its data is still submitted. specifications specification status comment html living standardthe definition of '<input type="hidden">' in that specification. living standard initial definition html 5.2the definition of '<input type="hidden">' in that specification. recommendation initial definition ...
<input type="image"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › image
living standard html5the definition of '<input type="image">' in that specification. recommendation ...
<input type="month"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › month
living standard ...
<input type="number"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › number
ton, the required attribute(s) are removed from the input(s) we are hiding, and empty the value attribute(s). this is so the form can be submitted if both input sets aren't filled in. it also ensures that the form won't submit data that the user didn't mean to. if you didn't do this, you'd have to fill in both feet/inches and meters to submit the form! specifications specification status comment html living standardthe definition of '<input type="number">' in that specification. living standard initial definition ...
<input type="password"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › password
just some simple code to display the entered ssn onscreen so you can see it. obviously this defeats the purpose of a password field, but it's helpful for experimenting with the pattern. var ssn = document.getelementbyid("ssn"); var current = document.getelementbyid("current"); ssn.oninput = function(event) { current.innerhtml = ssn.value; } result specifications specification status comment html living standardthe definition of '<input type="password">' in that specification. living standard initial definition html 5.1the definition of '<input type="password">' in that specification. recommendation initial definition ...
<input type="radio"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › radio
west browsers. notice that when clicking on a radio button, there's a nice, smooth fade out/in effect as the two buttons change state. in addition, the style and coloring of the legend and submit button are customized to have strong contrast. this might not be a look you'd want in a real web application, but it definitely shows off the possibilities. specifications specification status html living standardthe definition of '<input type="radio">' in that specification. living standard html5the definition of '<input type="radio">' in that specification. recommendation ...
<input type="range"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › range
living standard initial definition html 5.1the definition of '<input type="range">' in that specification. recommendation initial definition ...
<input type="reset"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › reset
disabled = true or btn.disabled = false. note: see the <input type="button"> page for more ideas about enabling and disabling buttons. validation buttons don't participate in constraint validation; they have no real value to be constrained. examples we've included simple examples above. there isn't really anything more to say about reset buttons. specifications specification status html living standardthe definition of '<input type="reset">' in that specification. living standard html5the definition of '<input type="reset">' in that specification. recommendation ...
<input type="submit"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › submit
for more ideas about enabling and disabling buttons. validation submit buttons don't participate in constraint validation; they have no real value to be constrained. examples we've included simple examples above. there isn't really anything more to say about submit buttons. there's a reason this kind of control is sometimes called a "simple button." specifications specification status comments html living standardthe definition of '<input type="submit">' in that specification. living standard html5the definition of '<input type="submit">' in that specification. recommendation ...
<input type="time"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › time
living standard ...
<input type="week"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › week
living standard ...
<ins> - HTML: Hypertext Markup Language
Web › HTML › Element › ins
ately disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been inserted would adversely affect understanding. short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<ins>' in that specification. living standard html5the definition of '<ins>' in that specification. recommendation html 4.01 specificationthe definition of '<ins>' in that specification. recommendation ...
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
Web › HTML › Element › kbd
> button to confirm once you've entered the name of the new file.</p> this does some interesting nesting. for the menu option description, the entire input is enclosed in a <kbd> element. then, inside that, both the menu and menu item names are contained within both <kbd> and <samp>, indicating an input which is selected from a screen widget. result specifications specification status comment html living standardthe definition of '<kbd>' in that specification. living standard html5the definition of '<kbd>' in that specification. recommendation expanded to include any user input, like voice input and individual keystrokes. html 4.01 specificationthe definition of '<kbd>' in that specification. recommendation ...
<keygen> - HTML: Hypertext Markup Language
Web › HTML › Element › keygen
recommendation initial definition. ...
<label> - HTML: Hypertext Markup Language
Web › HTML › Element › label
lements other than the labeled control are allowed. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmllabelelement specifications specification status comment html living standardthe definition of '<label>' in that specification. living standard html5the definition of '<label>' in that specification. recommendation html 4.01 specificationthe definition of '<label>' in that specification. recommendation html 4.0 specification the definition of '<label>' in that specification. ...
<legend> - HTML: Hypertext Markup Language
Web › HTML › Element › legend
tory. permitted parents a <fieldset> whose first child is this <legend> element implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmllegendelement attributes this element only includes the global attributes. examples see <form> for examples on <legend>. specifications specification status comment html living standardthe definition of '<legend>' in that specification. living standard definition of the legend element html5the definition of '<legend>' in that specification. recommendation html 4.01 specificationthe definition of '<legend>' in that specification. recommendation initial definition ...
<li> - HTML: Hypertext Markup Language
Web › HTML › Element › li
l> pages. ordered list <ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol> ordered list with a custom value <ol type="i"> <li value="3">third item</li> <li>fourth item</li> <li>fifth item</li> </ol> unordered list <ul> <li>first item</li> <li>second item</li> <li>third item</li> </ul> specifications specification status comment html living standardthe definition of '<li>' in that specification. living standard html5the definition of '<li>' in that specification. recommendation html 4.01 specificationthe definition of '<li>' in that specification. recommendation the type attribute has been deprecated. ...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
Web › HTML › Element › link
tart tag must be present and the end tag must not be present permitted parents any element that accepts metadata elements. if itemprop is present: any element that accepts phrasing content. implicit aria role link with href attribute permitted aria roles no role permitted dom interface htmllinkelement specifications specification status comment html living standardthe definition of '<link>' in that specification. living standard no changes from latest snapshot html5the definition of '<link>' in that specification. recommendation added crossorigin and sizes attributes; extended values of media to any media queries; added numerous new values for rel. html 4.01 specificationthe definiti...
<main> - HTML: Hypertext Markup Language
Web › HTML › Element › main
<!-- main page content --> </main> </body> webaim: "skip navigation" links reader mode browser reader mode functionality looks for the presence of the <main> element, as well as heading and content sectioning elements when converting content into a specialized reader view. building websites for safari reader mode and other reading apps. specifications specification status comment html living standardthe definition of '<main>' in that specification. living standard html 5.1the definition of '<main>' in that specification. recommendation no change from html5. html5the definition of '<main>' in that specification. recommendation initial definition. ...
<map> - HTML: Hypertext Markup Language
Web › HTML › Element › map
living standard html5the definition of '<map>' in that specification. recommendation html 4.01 specificationthe definition of '<map>' in that specification. recommendation initial definition ...
<mark>: The Mark Text element - HTML: Hypertext Markup Language
Web › HTML › Element › mark
ly disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been highlighted would adversely affect understanding. short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<mark>' in that specification. living standard html5the definition of '<mark>' in that specification. recommendation ...
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
Web › HTML › Element › marquee
ps scrolling of the marquee. examples <marquee>this text will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of '<marquee>' in that specification. living standard make it obsolete in favor of css but define its expected behavior, for backward compatibility. however, the development of the marquee features of css have since been abandoned. html5the definition of '<marquee>' in that specification. recommendation make it obsole...
<menu> - HTML: Hypertext Markup Language
Web › HTML › Element › menu
living standard no change from latest snapshot, unknown html 5.1the definition of '<menu>' in that specification. recommendation ...
<menuitem> - HTML: Hypertext Markup Language
Web › HTML › Element › menuitem
vascript" onclick="alert('command clicked')"> commands don't render their contents. </menuitem> <hr> <menuitem type="radio" radiogroup="group1">radio button 1</menuitem> <menuitem type="radio" radiogroup="group1">radio button 2</menuitem> </menu> css content div { width: 300px; height: 80px; background-color: lightgreen; } result specifications specification status comment html 5.2the definition of '<menuitem>' in that specification. recommendation snapshot of the html living standard, made obsolete. html 5.1the definition of '<menuitem>' in that specification. recommendation snapshot of the html living standard, initial definition. ...
Standard metadata names - HTML: Hypertext Markup Language
Web › HTML › Element › meta › name
ined in the html specification the html specification defines the following set of standard metadata names: application-name: the name of the application running in the web page. note: browsers may use this to identify the application. it is different from the <title> element, which usually contain the application name, but may also contain information like the document name or a status. simple web pages shouldn't define an application-name. author: the name of the document's author. description: a short and accurate summary of the content of the page. several browsers, like firefox and opera, use this as the default description of bookmarked pages. generator: the identifier of the software that generated the page. keywords: words relevant to the page's content se...
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
Web › HTML › Element › meta
ith the name attribute giving the metadata name, and the content attribute giving the value. see standard metadata names for details about the set of standard metadata names defined in the html specification. examples <meta charset="utf-8"> <!-- redirect page after 3 seconds --> <meta http-equiv="refresh" content="3;url=https://www.mozilla.org"> specifications specification status comment html living standardthe definition of '<meta>' in that specification. living standard ...
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
Web › HTML › Element › meter
esult on google chrome, the resulting meter looks like this: high and low range example note that in this example the min attribute is omitted. this is allowed, as it will default to 0. html <p>he got a <meter low="69" high="80" max="100" value="84">b</meter> on the exam.</p> result on google chrome, the resulting meter looks like this: specifications specification status comment html living standardthe definition of '<meter>' in that specification. living standard html5the definition of '<meter>' in that specification. recommendation initial definition ...
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
Web › HTML › Element › nav
ion-only content. examples in this example, a <nav> block is used to contain an unordered list (<ul>) of links. with appropriate css, this can be presented as a sidebar, navigation bar, or drop-down menu. <nav class="menu"> <ul> <li><a href="#">home</a></li> <li><a href="#">about</a></li> <li><a href="#">contact</a></li> </ul> </nav> specifications specification status comment html living standardthe definition of '<nav>' in that specification. living standard no change since latest w3c snapshot. html5the definition of '<nav>' in that specification. recommendation initial definition ...
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
Web › HTML › Element › noframes
xplanatory message if the user agent doesn't support frames. <frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frameset" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your browser does not support frames or is configured to not allow them.</p></noframes> </frameset> specifications specification status comment html5the definition of 'noframes' in that specification. recommendation html 4.01 specificationthe definition of '<noframes>' in that specification. recommendation ...
<noscript> - HTML: Hypertext Markup Language
Web › HTML › Element › noscript
ermitted dom interface htmlelement attributes this element only includes the global attributes. examples <noscript> <!-- anchor linking to external file --> <a href="https://www.mozilla.com/">external link</a> </noscript> <p>rocks!</p> result with scripting enabled rocks! result with scripting disabled external link rocks! specifications specification status comment html living standardthe definition of '<noscript>' in that specification. living standard html5the definition of '<noscript>' in that specification. recommendation html 4.01 specificationthe definition of '<noscript>' in that specification. recommendation ...
<object> - HTML: Hypertext Markup Language
Web › HTML › Element › object
resource, in css pixels. -- (absolute values only. no percentages) examples embed a flash movie <!-- embed a flash movie --> <object data="movie.swf" type="application/x-shockwave-flash"></object> <!-- embed a flash movie with parameters --> <object data="movie.swf" type="application/x-shockwave-flash"> <param name="foo" value="bar"> </object> specifications specification status comment html living standardthe definition of '<object>' in that specification. living standard html5the definition of '<object>' in that specification. recommendation html 4.01 specificationthe definition of '<object>' in that specification. recommendation ...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
Web › HTML › Element › ol
living standard no change since last w3c snapshot, html5. html5the definition of 'htmlolistelement' in that specification. recommendation added reversed and start attributed; un-deprecated type html 4.01 specificationthe definition of '<ol>' in that specification. recommend...
<optgroup> - HTML: Hypertext Markup Language
Web › HTML › Element › optgroup
living standard html5the definition of '<optgroup>' in that specification. recommendation html 4.01 specificationthe definition of '<optgroup>' in that specification. recommendation ...
<option>: The HTML Option element - HTML: Hypertext Markup Language
Web › HTML › Element › option
ribute is not set, only one single <option> of this <select> element may have the selected attribute. value the content of this attribute represents the value to be submitted with the form, should this option be selected. if this attribute is omitted, the value is taken from the text content of the option element. examples see <select> for examples. specifications specification status comment html living standardthe definition of '<option>' in that specification. living standard html5the definition of '<option>' in that specification. recommendation html 4.01 specificationthe definition of '<option>' in that specification. recommendation initial definition ...
<p>: The Paragraph element - HTML: Hypertext Markup Language
Web › HTML › Element › p
ing technology. screen readers may announce the paragraph's presence, but not any content contained within it — because there is none. this can confuse and frustrate the person using the screen reader. if extra space is desired, use css properties like margin to create the effect: p { margin-bottom: 2em; // increase white space after a paragraph } specifications specification status comment html living standardthe definition of '<p>' in that specification. living standard no change since the latest w3c snapshot html5 html5the definition of '<p>' in that specification. recommendation align attribute is obsolete html 4.01 specificationthe definition of '<p>' in that specification. recommendation initial definition ...
<param>: The Object Parameter element - HTML: Hypertext Markup Language
Web › HTML › Element › param
specifies the type of the value attribute. possible values are: data: default value. the value is passed to the object's implementation as a string. ref: the value is a uri to a resource where run-time values are stored. object: an id of another <object> in the same document. examples please see the <object> page for examples on <param>. specifications specification status comment html living standardthe definition of '<param>' in that specification. living standard html5the definition of '<param>' in that specification. recommendation html 4.01 specificationthe definition of '<param>' in that specification. recommendation ...
<picture>: The Picture element - HTML: Hypertext Markup Language
Web › HTML › Element › picture
living standard initial definition ...
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
Web › HTML › Element › pre
|| || </pre> <figcaption id="cow-caption"> a cow saying, "i'm an expert in my field." the cow is illustrated using preformatted text characters. </figcaption> </figure> mdn understanding wcag, guideline 1.1 explanations h86: providing text alternatives for ascii art, emoticons, and leetspeak | w3c techniques for wcag 2.0 specifications specification status comment html living standardthe definition of '<pre>' in that specification. living standard no significant change from html5 html5the definition of '<pre>' in that specification. recommendation no significant change from html 4.01 specification html 4.01 specificationthe definition of '<pre>' in that specification. recommendation deprecated the...
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
Web › HTML › Element › progress
:indeterminate pseudo-class can be used to match against indeterminate progress bars. to change the progress bar to indeterminate after giving it a value you must remove the value attribute with element.removeattribute('value'). examples <progress value="70" max="100">70 %</progress> result on windows 7, the resulting progress looks like this: specifications specification status comment html living standardthe definition of '<progress>' in that specification. living standard html5the definition of '<progress>' in that specification. recommendation initial definition ...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
Web › HTML › Element › q
hat designates a source document or message for the information quoted. this attribute is intended to point to information explaining the context or the reference for the quote. example <p>according to mozilla's website, <q cite="https://www.mozilla.org/about/history/details/">firefox 1.0 was released in 2004 and became a big success.</q></p> specifications specification status comment html living standardthe definition of '<q>' in that specification. living standard html5the definition of '<q>' in that specification. recommendation html 4.01 specificationthe definition of '<q>' in that specification. recommendation initial definition ...
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
Web › HTML › Element › rb
recommendation ...
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
Web › HTML › Element › rp
living standard html5the definition of '<rp>' in that specification. recommendation ...
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
Web › HTML › Element › rt
living standard html5the definition of '<rt>' in that specification. recommendation ...
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
Web › HTML › Element › rtc
om interface htmlelement attributes this element only includes the global attributes. examples <div class="info"> <ruby> <rbc> <rb>旧</rb><rt>jiù</rt> <rb>金</rb><rt>jīn</rt> <rb>山</rb><rt>shān</rt> </rbc> <rtc>san francisco</rtc> </ruby> </div> .info { padding-top: 10px; font-size: 36px; } specifications specification status comment html 5.2the definition of '<rtc>' in that specification. recommendation html 5.1the definition of '<rtc>' in that specification. recommendation html5the definition of '<rtc>' in that specification. recommendation initial definition. ...
<ruby> - HTML: Hypertext Markup Language
Web › HTML › Element › ruby
ding role permitted aria roles any dom interface htmlelement attributes this element only includes the global attributes. examples example 1: character <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> example 2: word <ruby> 明日 <rp>(</rp><rt>ashita</rt><rp>)</rp> </ruby> specifications specification status comment html living standardthe definition of '<ruby>' in that specification. living standard html5the definition of '<ruby>' in that specification. recommendation ...
<s> - HTML: Hypertext Markup Language
Web › HTML › Element › s
ely disable announcing content that creates extra verbosity. because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been struck out would adversely affect understanding. short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of 's element' in that specification. living standard html5the definition of 's element' in that specification. recommendation ...
<samp>: The Sample Output element - HTML: Hypertext Markup Language
Web › HTML › Element › samp
entered at the prompt in the sample text. css the css that achieves the appearance we want is: .prompt { color: #b00; } samp > kbd { font-weight: bold; } .cursor { color: #00b; } this simply gives the prompt and cursor fairly subtle colorization and emboldens the keyboard input within the sample text. result the resulting output is this: specifications specification status comment html living standardthe definition of '<samp>' in that specification. living standard html5the definition of '<samp>' in that specification. recommendation html 4.01 specificationthe definition of '<samp>' in that specification. recommendation ...
<script>: The Script element - HTML: Hypertext Markup Language
Web › HTML › Element › script
ript mime type in the type attribute. <!-- generated by the server --> <script id="data" type="application/json">{"userid":1234,"username":"john doe","membersince":"2000-01-01t00:00:00.000z"}</script> <!-- static --> <script> const userinfo = json.parse(document.getelementbyid("data").text); console.log("user information: %o", userinfo); </script> specifications specification status comments html living standardthe definition of '<script>' in that specification. living standard removed the charset attribute html5the definition of '<script>' in that specification. recommendation html 4.01 specificationthe definition of '<script>' in that specification. recommendation ...
<select>: The HTML Select element - HTML: Hypertext Markup Language
Web › HTML › Element › select
arents any element that accepts phrasing content. implicit aria role combobox with no multiple attribute and no size attribute greater than 1, otherwise listbox permitted aria roles menu with no multiple attribute and no size attribute greater than 1, otherwise no role permitted dom interface htmlselectelement specifications specification status comments html living standardthe definition of '<select>' in that specification. living standard html5the definition of '<select>' in that specification. recommendation html 4.01 specificationthe definition of '<select>' in that specification. recommendation ...
<slot> - HTML: Hypertext Markup Language
Web › HTML › Element › slot
living standard domthe definition of 'slots' in that specification. living standard ...
<small>: the side comment element - HTML: Hypertext Markup Language
Web › HTML › Element › small
dom interface htmlelement attributes this element only includes the global attributes. examples basic usage <p>this is the first sentence. <small>this whole sentence is in small letters.</small> </p> css alternative <p>this is the first sentence. <span style="font-size:0.8em">this whole sentence is in small letters.</span> </p> specifications specification status comments html living standardthe definition of '<small>' in that specification. living standard html5the definition of '<small>' in that specification. recommendation html 4.01 specificationthe definition of '<small>' in that specification. recommendation notes although the <small> element, like the <b> and <i> elements, may be percei...
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
Web › HTML › Element › source
living standard ...
<span> - HTML: Hypertext Markup Language
Web › HTML › Element › span
htmlspanelement (before html5, the interface was htmlelement) attributes this element only includes the global attributes. example example 1 html <p><span>some text</span></p> result example 2 html <li><span> <a href="portfolio.html" target="_blank">see my portfolio</a> </span></li> css li span { background: gold; } result specifications specification status comment html living standardthe definition of '<span>' in that specification. living standard html5the definition of '<span>' in that specification. recommendation the dom interface is now htmlspanelement. html 4.01 specificationthe definition of '<span>' in that specification. recommendation ...
<strike> - HTML: Hypertext Markup Language
Web › HTML › Element › strike
i.e., if it represents deleted content, use <del> instead. in all other cases use <s>. dom interface htmlelement attributes this element includes the global attributes. example &lt;strike&gt;: <strike>today's special: salmon</strike> sold out<br /> &lt;s&gt;: <s>today's special: salmon</s> sold out the result of this code is: specifications specification status comment html5the definition of '<strike>' in that specification. recommendation make obsolete in favor of <del> and <s>. html 4.01 specificationthe definition of '<strike>' in that specification. recommendation make deprecated in favor of <del> and <s>. ...
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
Web › HTML › Element › strong
be nested to increase the relative degree of importance or stress emphasis, respectively. examples basic example <p>before proceeding, <strong>make sure you put on your safety goggles</strong>.</p> the resulting output: labeling warnings <p><strong>important:</strong> before proceeding, make sure you add plenty of butter.</p> this results in: specifications specification status comment html living standardthe definition of '<strong>' in that specification. living standard html5the definition of '<strong>' in that specification. recommendation html 4.01 specificationthe definition of '<strong>' in that specification. recommendation ...
<style>: The Style Information element - HTML: Hypertext Markup Language
Web › HTML › Element › style
ermitted content text content matching the type attribute, that is text/css. tag omission neither tag is omissible. permitted parents any element that accepts metadata content. implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlstyleelement specifications specification status comment html living standardthe definition of 'style' in that specification. living standard html5the definition of 'style' in that specification. recommendation the type attribute becomes optional. html 4.01 specificationthe definition of 'style' in that specification. recommendation ...
<sub>: The Subscript element - HTML: Hypertext Markup Language
Web › HTML › Element › sub
hin the described molecule is represented using a subscripted number; in the case of water, the subscripted "2" indicates that there are two atoms of hydrogen in the molecule. another example: <p>almost every developer's favorite molecule is c<sub>8</sub>h<sub>10</sub>n<sub>4</sub>o<sub>2</sub>, which is commonly known as "caffeine."</p> the output: specifications specification status comment html living standardthe definition of '<sub> and <sup>' in that specification. living standard html5the definition of '<sub> and <sup>;' in that specification. recommendation ...
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
Web › HTML › Element › summary
ill not be treated as a heading for these users. html in summaries this example adds some semantics to the <summary> element to indicate the label as important: <details open> <summary><strong>overview</strong></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> specifications specification status comment html living standardthe definition of '<summary>' in that specification. living standard html 5.1the definition of '<summary>' in that specification. recommendation initial definition ...
<sup>: The Superscript element - HTML: Hypertext Markup Language
Web › HTML › Element › sup
living standard html5the definition of '<sub> and <sup>;' in that specification. recommendation ...
<table>: The Table element - HTML: Hypertext Markup Language
Web › HTML › Element › table
attributes to programmatically associate each table cell with the header(s) the cell is associated with. mdn tables for visually impaired users tables with multi-level headers • tables • w3c wai web accessibility tutorials h43: using id and headers attributes to associate data cells with header cells in data tables | techniques for w3c wcag 2.0 specifications specification status comment html living standardthe definition of 'table element' in that specification. living standard html5the definition of 'table element' in that specification. recommendation ...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
Web › HTML › Element › tbody
css is unchanged. we do, however, add a slightly more subtle style for header cells contained directly within a <tbody> (as opposed to those which reside in a <thead>). this is used for the headers indicating each table section's corresponding major. tbody > tr > th { background-color: #dde; border-bottom: 1.5px solid #bbb; font-weight: normal; } specifications specification status comment html living standardthe definition of 'tbody element' in that specification. living standard html5the definition of 'tbody element' in that specification. recommendation ...
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
Web › HTML › Element › td
the text near the bottom of the cell. middle: centers the text in the cell. and top: positions the text near the top of the cell. to achieve a similar effect, use the css vertical-align property. width this attribute is used to define a recommended cell width. use the css width property instead. examples see <table> for examples on <td>. specifications specification status comment html living standardthe definition of 'td element' in that specification. living standard html5the definition of 'td element' in that specification. recommendation ...
<template>: The Content Template element - HTML: Hypertext Markup Language
Web › HTML › Element › template
living standard html5the definition of 'template element' in that specification. recommendation initial definition ...
<textarea> - HTML: Hypertext Markup Language
Web › HTML › Element › textarea
le form-associated element. permitted content text tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role textbox permitted aria roles no role permitted dom interface htmltextareaelement specifications specification status comment html living standardthe definition of '<textarea>' in that specification. living standard html5the definition of '<textarea>' in that specification. recommendation html 4.01 specificationthe definition of '<textarea>' in that specification. recommendation browser compatibility the compatibility table in this page is generated ...
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
Web › HTML › Element › tfoot
ble; middle, which will center the text in the cell; and top, which will put the text as close to the top of the cell as it is possible. note: do not use this attribute as it is obsolete (and not supported) in the latest standard: instead set the css vertical-align property on it. examples please see the <table> page for examples on <tfoot>. specifications specification status comment html living standardthe definition of 'tfoot element' in that specification. living standard html5the definition of 'tfoot element' in that specification. recommendation ...
<th> - HTML: Hypertext Markup Language
Web › HTML › Element › th
cellpadding properties and the width of the <col> element can also create extra width. but, if a column's width is too narrow to show a particular cell properly, it will be widened when displayed. note: do not use this attribute as it is obsolete in the latest standard: use the css width property instead. examples see <table> for examples on <th>. specifications specification status comment html living standardthe definition of 'th element' in that specification. living standard html5the definition of 'th element' in that specification. recommendation ...
<thead>: The Table Head element - HTML: Hypertext Markup Language
Web › HTML › Element › thead
cell as it is possible; middle, which will center the text in the cell; top, which will put the text as close to the top of the cell as it is possible. note: do not use this attribute as it is obsolete (and not supported) in the latest standard: instead set the css vertical-align property on it. examples see <table> for examples on <thead>. specifications specification status comment html living standardthe definition of 'thead element' in that specification. living standard html5the definition of 'thead element' in that specification. recommendation ...
<time> - HTML: Hypertext Markup Language
Web › HTML › Element › time
living standard no change from html 5.1 html 5.1the definition of '<time>' in that specification. recommendation no change from html5 html5the definition of '<time>' in that specification. recommendation initial definition. ...
<title>: The Document Title element - HTML: Hypertext Markup Language
Web › HTML › Element › title
to help the user, update the page title value to reflect significant page state changes (such as form validation problems). example <title>2 errors - your order - blue house chinese food - foodyum: online takeout today!</title> mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<title>' in that specification. living standard html5the definition of '<title>' in that specification. recommendation html 4.01 specificationthe definition of '<title>' in that specification. recommendation ...
<tr>: The Table Row element - HTML: Hypertext Markup Language
Web › HTML › Element › tr
living standard the whatwg living standard html5the definition of 'tr element' in that specification. recommendation w3c html5 ...
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
Web › HTML › Element › track
living standard html5the definition of 'track element' in that specification. recommendation initial definition ...
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
Web › HTML › Element › tt
using the tt selector, as seen in the example overriding the default font above. user-configured changes to the default monospace font setting may take precedence over your css. although this element wasn't officially deprecated in html 4.01, its use was discouraged in favor of the semantic elements and/or css. the <tt> element is obsolete in html 5. specifications specification status comment html5the definition of '<tt>' in that specification. recommendation html 4.01 specificationthe definition of '<tt>' in that specification. recommendation ...
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
Web › HTML › Element › u
element instead of <u> or even <i>. html <p>the class read <cite>moby dick</cite> in the first term.</p> result with default style note that the default styling for the <cite> element renders the text in italics. you can, if you wish, override that using css: cite { font-style: normal; text-decoration: underline; } result with custom style specifications specification status comment html living standardthe definition of '<u>' in that specification. living standard html5the definition of '<u>' in that specification. recommendation html 4.01 specificationthe definition of '<b>' in that specification. recommendation ...
<ul>: The Unordered List element - HTML: Hypertext Markup Language
Web › HTML › Element › ul
living standard html5the definition of '<ul>' in that specification. recommendation ...
<var>: The Variable element - HTML: Hypertext Markup Language
Web › HTML › Element › var
rwise it falls back to the default monospace font. css var { font: bold 15px "courier", "courier new", monospace; } html <p>the variables <var>minspeed</var> and <var>maxspeed</var> control the minimum and maximum speed of the apparatus in revolutions per minute (rpm).</p> this html uses <var> to enclose the names of two variables. result specifications specification status comment html living standardthe definition of '<var>' in that specification. living standard html5the definition of '<var>' in that specification. recommendation ...
<wbr> - HTML: Hypertext Markup Language
Web › HTML › Element › wbr
g a punctuation mark at the end of the line, which the reader might mistake for the end of the url. <p>http://this<wbr>.is<wbr>.a<wbr>.really<wbr>.long<wbr>.example<wbr>.com/with<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages</p> specifications specification status comment html living standardthe definition of '<wbr>' in that specification. living standard html5the definition of '<wbr>' in that specification. recommendation ...
accesskey - HTML: Hypertext Markup Language
accesskeys are present, so that they are aware of the functionality. if the system lacks a method of notifying the user about this feature, the user might accidentally activate accesskeys. because of these issues, it is generally advised not to use accesskeys for most general-purpose websites and web apps. webaim: keyboard accessibility - accesskey specifications specification status comment html 5.2the definition of 'accesskey' in that specification. recommendation more realistic behavior described for what is implemented in reality. html living standardthe definition of 'accesskey' in that specification. living standard no change from latest w3c html 5.1 spec. html 5.1the definition of 'accesskey' in that specification. recom...
autocapitalize - HTML: Hypertext Markup Language
of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences. the autocapitalize attribute enables authors to override that behavior per-element. the autocapitalize attribute never causes autocapitalization to be enabled for an <input> element with a type attribute whose value is url, email, or password. specifications specification status comment html living standardthe definition of 'autocapitalize' in that specification. living standard ...
class - HTML: Hypertext Markup Language
classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element. for example, attribute to describe an attribute rather than italics, although an element of this class may be presented by italics. semantic names remain logical even if the presentation of the page changes. specifications specification status comment html living standardthe definition of 'class' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'class' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'class' in that specification. recommendation snapshot of html livi...
contenteditable - HTML: Hypertext Markup Language
is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable. note that although its allowed values include true and false, this attribute is an enumerated one and not a boolean one. you can set the color used to draw the text insertion caret with the css caret-color property. specifications specification status comment html living standardthe definition of 'contenteditable' in that specification. living standard no change from latest snapshot, html 5.2 html 5.2the definition of 'contenteditable' in that specification. recommendation snapshot of html living standard, no change from html 5.1 html 5.1the definition of 'contenteditable' in that specification. ...
contextmenu - HTML: Hypertext Markup Language
recommendation snapshot of html living standard, initial definition. ...
data-* - HTML: Hypertext Markup Language
attribute and several data-* attributes: <img class="spaceship cruiserx3" src="shipx3.png" data-ship-id="324" data-weapons="laseri laserii" data-shields="72%" data-x="414354" data-y="85160" data-z="31940" onclick="spaceships[this.dataset.shipid].blasted()"> for a more in-depth tutorial about using html data attributes, see using data attributes. specifications specification status comment html living standardthe definition of 'data-*' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'data-*' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'data-*' in that specification. recommendation snapshot of ht...
dir - HTML: Hypertext Markup Language
he directionality of <input> and <textarea>s in order to assist with authoring content. chrome and safari provide a directionality option in the contextual menu of input fields while internet explorer and edge use the key combinations ctrl + left shift and ctrl + right shift. firefox uses ctrl/cmd + shift + x but does not update the dir attribute value. specifications specification status comment html living standardthe definition of 'dir' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'dir' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'dir' in that specification. recommendation snapshot of html living sta...
draggable - HTML: Hypertext Markup Language
> is forbidden. the correct usage is <img draggable="false">. if this attribute is not set, its default value is auto, which means drag behavior is the default browser behavior: only text selections, images, and links can be dragged. for other elements, the event ondragstart must be set for drag and drop to work, as shown in this comprehensive example. specifications specification status comment html living standardthe definition of 'draggable' in that specification. living standard no change from latest snapshot, html 5.1 html 5.2the definition of 'draggable' in that specification. recommendation no change html 5.1the definition of 'draggable' in that specification. recommendation snapshot of html living standard, initial defin...
dropzone - HTML: Hypertext Markup Language
hat types of content can be dropped on an element, using the html drag and drop api. it can have the following values: copy, which indicates that dropping will create a copy of the element that was dragged. move, which indicates that the element that was dragged will be moved to this new location. link, which will create a link to the dragged data. specifications specification status comment html 5.1the definition of 'dropzone' in that specification. recommendation snapshot of html living standard, initial definition ...
hidden - HTML: Hypertext Markup Language
a scripted graphics engine as an off-screen buffer, and a form control could refer to a hidden form element using its form attribute. note: changing the value of the css display property on an element with the hidden attribute overrides the behavior. for instance, elements styled display: flex will be displayed despite the hidden attribute's presence. specifications specification status comment html living standardthe definition of 'hidden' in that specification. living standard no change from latest snapshot, html 5.1 html living standardthe definition of 'hidden elements' in that specification. living standard defines the suggested default rendering of the hidden attribute using css html 5.1the definition of 'hidden' in that specificat...
id - HTML: Hypertext Markup Language
ontrast to the class attribute, which allows space-separated values, elements can only have one single id value. note: using characters except ascii letters, digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in html 4. though this restriction has been lifted in html5, an id should start with a letter for compatibility. specifications specification status comment html living standardthe definition of 'id' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'id' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'id' in that specification. recommendation snapshot of html living standa...
inputmode - HTML: Hypertext Markup Language
racter as well as other optimizations. inputs that require email addresses should typically use <input type="email"> instead. url a keypad optimized for entering urls. this may have the / key more prominent, for example. enhanced features could include history access and so on. inputs that require a url should typically use <input type="url"> instead. specifications specification status comment html living standardthe definition of 'inputmode' in that specification. living standard ...
is - HTML: Hypertext Markup Language
it live also). // create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // constructor contents ommitted for brevity ... } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification. living standard ...
itemid - HTML: Hypertext Markup Language
living standard ...
itemprop - HTML: Hypertext Markup Language
working draft html living standardthe definition of 'itemprop' in that specification. living standard ...
itemref - HTML: Hypertext Markup Language
working draft html living standardthe definition of 'itemref' in that specification. living standard ...
itemscope - HTML: Hypertext Markup Language
working draft html living standardthe definition of 'itemscope' in that specification. living standard ...
itemtype - HTML: Hypertext Markup Language
working draft html living standardthe definition of 'itemprop' in that specification. living standard ...
lang - HTML: Hypertext Markup Language
the language subtag lookup. even if the lang attribute is set, it may not be taken into account, as the xml:lang attribute has priority. for the css pseudo-class :lang, two invalid language names are different if their names are different. so while :lang(es) matches both lang="es-es" and lang="es-419", :lang(xyzzy) would not match lang="xyzzy-zorp!". specifications specification status comment html living standardthe definition of 'lang' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'lang' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'lang' in that specification. recommendation snapshot of html liv...
part - HTML: Hypertext Markup Language
the part global attribute contains a space-separated list of the part names of the element. part names allows css to select and style specific elements in a shadow tree via the ::part pseudo-element. see our shadow part example for a usage example. specifications specification status comment shadow partsthe definition of 'part' in that specification. working draft ...
slot - HTML: Hypertext Markup Language
living standard domthe definition of 'slot attribute' in that specification. living standard ...
spellcheck - HTML: Hypertext Markup Language
l be checked for spelling errors only if its nearest ancestor has a spellcheck state of true. this attribute is merely a hint for the browser: browsers are not required to check for spelling errors. typically non-editable elements are not checked for spelling errors, even if the spellcheck attribute is set to true and the browser supports spellchecking. specifications specification status comment html living standardthe definition of 'spellcheck' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'spellcheck' in that specification. recommendation snapshot of html living standard, initial definition ...
style - HTML: Hypertext Markup Language
ject, please clone https://github.com/mdn/interactive-examples and send us a pull request. usage note: this attribute must not be used to convey semantic information. even if all styling is removed, a page should remain semantically correct. typically it shouldn't be used to hide irrelevant information; this should be done using the hidden attribute. specifications specification status comment html living standardthe definition of 'style' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'style' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'style' in that specification. recommendation snapshot of html livi...
tabindex - HTML: Hypertext Markup Language
ponents authored using non-interactive elements are not be listed in the accessibility tree. this prevents assistive technology from being able to navigate to and manipulate those components. the content should be semantically described using interactive elements (<a>, <button>, <details>, <input>, <select>, <textarea>, etc.) instead. these elements have built-in roles and states that communicate status to the accessibility that would otherwise have to be managed by aria. using the tabindex attribute | the paciello group specifications specification status comment html living standardthe definition of 'tabindex' in that specification. living standard no change from latest snapshot, html 5.1. html 5.1the definition of 'tabindex' in that specificati...
title - HTML: Hypertext Markup Language
ccessible technique that can be accessed with the above browsing methods. 3.2.5.1. the title attribute | w3c html 5.2: 3. semantics, structure, and apis of html documents using the html title attribute – updated | the paciello group tooltips & toggletips - inclusive components the trials and tribulations of the title attribute - 24 accessibility specifications specification status comment html living standardthe definition of 'title' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'title' in that specification. recommendation snapshot of html living standard, no change from html5 html5the definition of 'title' in that specification. recommendation snapshot of html ...
translate - HTML: Hypertext Markup Language
sed by human translators. as such it's important that web authors use this attribute to mark content that should not be translated. examples in this example, the translate attribute is used to ask translation tools not to translate the company's brand name in the footer. <footer> <small>© 2020 <span translate="no">brandname</span></small> </footer> specifications specification status comment html living standardthe definition of 'translate' in that specification. living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'translate' in that specification. recommendation snapshot of html living standard, initial definition ...
Global attributes - HTML: Hypertext Markup Language
to specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged. it can have the following values: empty string and yes, which indicates that the element will be translated. no, which indicates that the element will not be translated. specifications specification status comment html living standardthe definition of 'global attributes' in that specification. living standard shadow parts working draft added the part and exportparts global attributes. html 5.2the definition of 'global attributes' in that specification. recommendation snapshot of html living standard. from html 5.1, itemid, itemprop, itemref, item...
Link types: dns-prefetch - HTML: Hypertext Markup Language
living standard ...
Link types: manifest - HTML: Hypertext Markup Language
the manifest keyword for the rel attribute of the <link> element indicates that the target resource is a web app manifest. specifications specification status comment web app manifest working draft ...
Link types: modulepreload - HTML: Hypertext Markup Language
living standard ...
Link types: noopener - HTML: Hypertext Markup Language
living standard ...
Link types: noreferrer - HTML: Hypertext Markup Language
living standard ...
Link types: preconnect - HTML: Hypertext Markup Language
living standard ...
Link types: prefetch - HTML: Hypertext Markup Language
living standard ...
Link types: preload - HTML: Hypertext Markup Language
living standard ...
Link types: prerender - HTML: Hypertext Markup Language
living standard ...
Link types - HTML: Hypertext Markup Language
et of pages. <a>, <area> <link>, <form> up indicates that the page is part of a hierarchical structure and that the hyperlink leads to the higher level resource of that structure. the number of up link types indicates the depth difference between the current page and the linked resource. <a>, <area>, <link> <form> specifications specification status comment preloadthe definition of 'preload' in that specification. candidate recommendation added preload. resource hintsthe definition of 'preconnect' in that specification. working draft added dns-prefetch, preconnect, and prerender values. html living standardthe definition of 'link types' in that specification. living standard added opener an...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
oad, but it had a problem: there was no way to work out a priority for the items (as didn't exist back then), so they all got fetched with fairly low priority. there are a number of script-based resource loaders out there, but they don't have any power over the browser's fetch prioritization queue, and are subject to much the same performance problems. specifications specification status comment preloadthe definition of 'preload' in that specification. candidate recommendation further details of preload. html living standardthe definition of 'rel=preload' in that specification. living standard definition of rel=preload. ...
MIME types (IANA media types) - HTTP
n: form-data; name="mycheckbox" on -----------------------------8721656041911415653955004498 content-disposition: form-data; name="myfile"; filename="test.txt" content-type: text/plain simple file. -----------------------------8721656041911415653955004498-- multipart/byteranges the multipart/byteranges mime type is used to send partial responses to the browser. 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. like other multipart types, the content-type uses a boundary to separate the pieces. each piece has a content-type header with its actual type and a content-range of the range it represents. http/1.1 206 partial content accept-ranges: bytes content-type: multipart/byterang...
Cross-Origin Resource Sharing (CORS) - HTTP
Web › HTTP › CORS
examples of this usage can be found above. access-control-request-headers the access-control-request-headers header is used when issuing a preflight request to let the server know what http headers will be used when the actual request is made. access-control-request-headers: <field-name>[, <field-name>]* examples of this usage can be found above. specifications specification status comment fetchthe definition of 'cors' in that specification. living standard new definition; supplants w3c cors specification. ...
Content Security Policy (CSP) - HTTP
Web › HTTP › CSP
document in which the violation occurred. effective-directive the directive whose enforcement caused the violation. original-policy the original policy as specified by the content-security-policy http header. referrer the referrer of the document in which the violation occurred. script-sample the first 40 characters of the inline script, event handler, or style that caused the violation. status-code the http status code of the resource on which the global object was instantiated. violated-directive the name of the policy section that was violated. sample violation report let's consider a page located at http://example.com/signup.html. it uses the following policy, disallowing everything but stylesheets from cdn.example.com. content-security-policy: default-src 'none'; style-src ...
HTTP conditional requests - HTTP
ar to if-match, or if-unmodified-since, but can have only one single etag, or one date. if it fails, the range request fails, and instead of a 206 partial content response, a 200 ok is sent with the complete resource. use cases cache update the most common use case for conditional requests is updating a cache. with an empty cache, or without a cache, the requested resource is sent back with a status of 200 ok. together with the resource, the validators are sent in the headers. in this example, both last-modified and etag are sent, but it could equally have been only one of them. these validators are cached with the resource (like all headers) and will be used to craft conditional requests, once the cache becomes stale. as long as the cache is not stale, no requests are issued at all. but...
Feature Policy - HTTP
e feature is available. 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. specifications specification status comment feature policythe definition of 'feature-policy' in that specification. editor's draft initial definition. defines the feature-policy header. directives are defined in the specs for the features they control. see individual directive pages for details. ...
Access-Control-Allow-Credentials - HTTP
is header entirely (rather than setting its value to false). examples allow credentials: access-control-allow-credentials: true using xhr with credentials: var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/', true); xhr.withcredentials = true; xhr.send(null); using fetch with credentials: fetch(url, { credentials: 'include' }) specifications specification status comment fetchthe definition of 'access-control-allow-credentials' in that specification. living standard initial definition ...
Access-Control-Allow-Headers - HTTP
living standard initial definition. ...
Access-Control-Allow-Methods - HTTP
living standard initial definition ...
Access-Control-Allow-Origin - HTTP
living standard initial definition. ...
Access-Control-Expose-Headers - HTTP
living standard ...
Access-Control-Max-Age - HTTP
chromium (prior to v76) caps at 10 minutes (600 seconds). chromium (starting in v76) caps at 2 hours (7200 seconds). chromium also specifies a default value of 5 seconds. a value of -1 will disable caching, requiring a preflight options check for all calls. examples cache results of a preflight request for 10 minutes: access-control-max-age: 600 specifications specification status comment fetchthe definition of 'access-control-max-age' in that specification. living standard initial definition. ...
Access-Control-Request-Headers - HTTP
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. living standard initial definition. ...
Access-Control-Request-Method - HTTP
equest 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. living standard initial definition. ...
Allow - HTTP
Web › HTTP › Headers › Allow
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. ...
Alt-Svc - HTTP
Web › HTTP › Headers › Alt-Svc
leted through such changes. multiple entries can be specified in a single alt-svc header using comma as separator. in that case, early entries are considered more preferable. example alt-svc: h2=":443"; ma=2592000; alt-svc: h2=":443"; ma=2592000; persist=1 alt-svc: h2="alt.example.com:443", h2=":443" alt-svc: h3-25=":443"; ma=3600, h2=":443"; ma=3600 specifications specification status comment rfc 7838 ietf rfc initial definition. ...
Authorization - HTTP
header type request header forbidden header name no syntax authorization: <type> <credentials> directives <type> authentication type. a common type is "basic". ...
Clear-Site-Data - HTTP
...
CSP: base-uri - HTTP
element with its href set to https://example.com will result in a csp violation. <meta http-equiv="content-security-policy" content="base-uri 'self'"> <base href="https://example.com/"> // error: refused to set the document's base uri to 'https://example.com/' // because it violates the following content security policy // directive: "base-uri 'self'" specifications specification status comment content security policy level 3the definition of 'base-uri' in that specification. working draft no changes. content security policy level 2the definition of 'base-uri' in that specification. recommendation initial definition. ...
CSP: block-all-mixed-content - HTTP
candidate recommendation initial definition. ...
CSP: child-src - HTTP
lows it in the case of script-src for external scripts. examples violation cases given this csp header: content-security-policy: child-src https://example.com/ this <iframe> and worker are blocked and won't load: <iframe src="https://not-example.com"></iframe> <script> var blockedworker = new worker("data:application/javascript,..."); </script> specifications specification status comment content security policy level 3the definition of 'child-src' in that specification. working draft no changes. content security policy level 2the definition of 'child-src' in that specification. recommendation initial definition. ...
CSP: connect-src - HTTP
working draft no changes. content security policy level 2the definition of 'connect-src' in that specification. recommendation initial definition. ...
CSP: default-src - HTTP
working draft added frame-src, manifest-src and worker-src as defaults. content security policy level 2the definition of 'default-src' in that specification. recommendation initial definition. ...
CSP: font-src - HTTP
f script-src for external scripts. examples violation cases given this csp header: content-security-policy: font-src https://example.com/ the following font resource loading is blocked and won't load: <style> @font-face { font-family: "myfont"; src: url("https://not-example.com/font"); } body { font-family: "myfont"; } </style> specifications specification status comment content security policy level 3the definition of 'font-src' in that specification. working draft no changes. content security policy level 2the definition of 'font-src' in that specification. recommendation initial definition. ...
CSP: form-action - HTTP
working draft no changes. content security policy level 2the definition of 'form-action' in that specification. recommendation initial definition. ...
CSP: frame-ancestors - HTTP
e blob and filesystem from source directives. sites needing to allow these content types can specify them using the data attribute. 'none' refers to the empty set; that is, no urls match. the single quotes are required. examples content-security-policy: frame-ancestors 'none'; content-security-policy: frame-ancestors 'self' https://www.example.org; specifications specification status comment content security policy level 3the definition of 'frame-ancestors' in that specification. working draft no changes. content security policy level 2the definition of 'frame-ancestors' in that specification. recommendation initial definition. ...
CSP: frame-src - HTTP
fe inline script for an example. in csp 2.0 this applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. examples violation cases given this csp header: content-security-policy: frame-src https://example.com/ the following <iframe> is blocked and won't load: <iframe src="https://not-example.com/"></iframe> specifications specification status comment content security policy level 3the definition of 'frame-src' in that specification. working draft undeprecates frame-src. content security policy level 2the definition of 'frame-src' in that specification. recommendation deprecates frame-src. ...
CSP: img-src - HTTP
see script-src for an example. 'report-sample' requires a sample of the violating code to be included in the violation report. examples violation cases given this csp header: content-security-policy: img-src https://example.com/ the following <img> is blocked and won't load: <img src="https://not-example.com/foo.jpg" alt="example picture"> specifications specification status comment content security policy level 3the definition of 'img-src' in that specification. working draft no changes. content security policy level 2the definition of 'img-src' in that specification. recommendation initial definition. ...
CSP: manifest-src - HTTP
pt for an example. in csp 2.0 this applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. examples violation cases given this csp header: content-security-policy: manifest-src https://example.com/ the following <link> is blocked and won't load: <link rel="manifest" href="https://not-example.com/manifest"> specifications specification status comment content security policy level 3the definition of 'manifest-src' in that specification. working draft initial definition. ...
CSP: media-src - HTTP
working draft no changes. content security policy level 2the definition of 'media-src' in that specification. recommendation initial definition. ...
CSP: navigate-to - HTTP
se using a <form> element with an action set to inline javascript will result in a csp violation. <meta http-equiv="content-security-policy" content="navigate-to 'none'"> <form action="javascript:alert('foo')" id="form1" method="post"> <input type="text" name="fieldname" value="fieldvalue"> <input type="submit" id="submit" value="submit"> </form> specifications specification status comment content security policy level 3the definition of 'navigate-to' in that specification. working draft initial definition. ...
CSP: object-src - HTTP
working draft no changes. content security policy level 2the definition of 'object-src' in that specification. recommendation initial definition. ...
CSP: plugin-types - HTTP
working draft no changes. content security policy level 2the definition of 'plugin-types' in that specification. recommendation initial definition. ...
CSP: prefetch-src - HTTP
working draft initial definition. ...
CSP: report-uri - HTTP
, but no further email notifications will be sent until this log file is deleted:\n\n" . $log_file; mail($email_address, $email_subject, $message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) { exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification. working draft no changes. content security policy level 2the definition of 'report-uri' in that specification. recommendation initial definition. ...
CSP: sandbox - HTTP
-top-navigation allows the page to navigate (load) content to the top-level browsing context. if this keyword is not used, this operation is not allowed. allow-top-navigation-by-user-activation lets the resource navigate the top-level browsing context, but only if initiated by a user gesture. examples content-security-policy: sandbox allow-scripts; specifications specification status comment content security policy level 3the definition of 'sandbox' in that specification. working draft no changes. content security policy level 2the definition of 'sandbox' in that specification. recommendation initial definition. ...
CSP: script-src-attr - HTTP
inline' are ignored. see script-src for an example. 'report-sample' requires a sample of the violating code to be included in the violation report. examples fallback to script-src if script-src-attr is absent, user agent falls back to the script-src directive, and if that is absent as well, to default-src. todo: add comprehensive examples. specifications specification status comment content security policy level 3the definition of 'script-src-attr' in that specification. working draft initial definition. ...
CSP: script-src-elem - HTTP
inline' are ignored. see script-src for an example. 'report-sample' requires a sample of the violating code to be included in the violation report. examples fallback to script-src if script-src-elem is absent, user agent falls back to the script-src directive, and if that is absent as well, to default-src. todo: add comprehensive examples. specifications specification status comment content security policy level 3the definition of 'script-src-elem' in that specification. working draft initial definition. ...
CSP: script-src - HTTP
strict-dynamic in a backwards compatible way, without requiring user-agent sniffing. the policy: script-src 'unsafe-inline' https: 'nonce-abcdefg' 'strict-dynamic' will act like 'unsafe-inline' https: in browsers that support csp1, https: 'nonce-abcdefg' in browsers that support csp2, and 'nonce-abcdefg' 'strict-dynamic' in browsers that support csp3. specifications specification status comment content security policy level 3the definition of 'script-src' in that specification. working draft no changes. content security policy level 2the definition of 'script-src' in that specification. recommendation initial definition. ...
CSP: style-src-attr - HTTP
n and whitespace matter, including leading or trailing whitespace. see unsafe inline script for an example. in csp 2.0, this applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. 'report-sample' requires a sample of the violating code to be included in the violation report. examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-attr' in that specification. working draft initial definition. ...
CSP: style-src-elem - HTTP
n and whitespace matter, including leading or trailing whitespace. see unsafe inline script for an example. in csp 2.0, this applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. 'report-sample' requires a sample of the violating code to be included in the violation report. examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-elem' in that specification. working draft initial definition. ...
CSP: style-src - HTTP
le> unsafe style expressions the 'unsafe-eval' source expression controls several style methods that create style declarations from strings. if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification. working draft no changes. content security policy level 2the definition of 'style-src' in that specification. recommendation initial definition. ...
CSP: trusted-types - HTTP
...
CSP: upgrade-insecure-requests - HTTP
candidate recommendation initial definition. ...
CSP: worker-src - HTTP
working draft initial definition. ...
Content-Security-Policy - HTTP
content-security-policy: default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none' example: do not implement the above policy yet; instead just report violations that would have occurred: content-security-policy-report-only: default-src https:; report-uri /csp-violation-report-endpoint/ see mozilla web security guidelines for more examples. specifications specification status comment content security policy level 3 working draft adds manifest-src, navigate-to, report-to, strict-dynamic, worker-src. undeprecates frame-src. deprecates report-uri in favor if report-to. mixed content candidate recommendation adds block-all-mixed-content. subresource integrity recommendation adds require-sri-for. upgrade insecure...
Cross-Origin-Resource-Policy - HTTP
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/. specifications specification status comment fetch living standard initial definition ...
DNT - HTTP
Web › HTTP › Headers › DNT
ould prefer privacy rather than personalized content. 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. 1 the user prefers not to be tracked on the target site. null the user has not specified a preference about tracking. examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification. obsolete initial definition. ...
Device-Memory - HTTP
0.5, 1, 2, 4, 8. device-memory: <number> examples server first needs to opt in to receive device-memory header by sending the response headers accept-ch containing device-memory and accept-ch-lifetime. accept-ch: device-memory accept-ch-lifetime: 86400 then on subsequent requests the client might send device-memory header back: device-memory: 1 specifications specification status comment device memory 1the definition of 'device-memory' in that specification. editor's draft initial definition. ...
ETag - HTTP
Web › HTTP › Headers › ETag
specifications specification title rfc 7232, section 2.3: etag hypertext transfer protocol (http/1.1): conditional requests ...
Early-Data - HTTP
the early-data header is not set by the originator of the request (i.e., a browser). ...
Expect-CT - HTTP
equirements, to prevent the use of misissued certificates for that site from going unnoticed. 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. browsers ignore the expect-ct header over http; the header only has effect on https connections. the expect-ct will likely become obsolete in june 2021. since may 2018 new c...
Feature-Policy: accelerometer - HTTP
xts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. accelerometerthe definition of 'accelerometer' in that specification. candidate recommendation ...
Feature-Policy: ambient-light-sensor - HTTP
exts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specification specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: autoplay - HTTP
...
Feature-Policy: battery - HTTP
xts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. battery status apithe definition of 'feature policy integration' in that specification. candidate recommendation ...
Feature-Policy: camera - HTTP
exts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specification specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: display-capture - HTTP
(iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default alowlist is 'self'. specifications specification status comment feature policy editor's draft initial definition. screen capturethe definition of 'display-capture' in that specification. working draft feature policy directive definition. ...
Feature-Policy: document-domain - HTTP
contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is *. specifications specification status comment html living standardthe definition of 'document-domain' in that specification. living standard ...
Feature-Policy: encrypted-media - HTTP
ntexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the allow list is 'self'. specifications specification status comment feature policy editor's draft initial definition. encrypted media extensionsthe definition of 'feature policy integration' in that specification. recommendation ...
Feature-Policy: fullscreen - HTTP
fullscreen apithe definition of 'fullscreen' in that specification. editor's draft defines the fullscreen policy. ...
Feature-Policy: geolocation - HTTP
...
Feature-Policy: gyroscope - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: layout-animations - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: legacy-image-formats - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: magnetometer - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: microphone - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: midi - HTTP
ntexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the allow list is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: oversized-images - HTTP
contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default value the default value is '*'. specification specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: payment - HTTP
feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the payment feature's default allowlist value is 'self'. specifications specification status comment payment request api candidate recommendation see section 16. feature policy integration. feature policy editor's draft initial definition. ...
Feature-Policy: picture-in-picture - HTTP
...
Feature-Policy: publickey-credentials-get - HTTP
(iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default allowlist is 'self'. specifications specification status comment feature policy editor's draft initial definition. web authentication level 2 editor's draft. definition of publickey-credentials-get directive, default allowlist. ...
Feature-Policy: screen-wake-lock - HTTP
: the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy default allow list for screen-wake-lock is 'self'. specifications specification status comment feature policy editor's draft initial definition. screen wake lock api editor's draft initial definition of screen-wake-lock feature directive. ...
Feature-Policy: sync-xhr - HTTP
level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy by default the policy is set to *, which means synchronous requests are allowed in all frames. specification specification status comment feature policy editor's draft initial definition. whatwg spec default policy is *. ...
Feature-Policy: unoptimized-images - HTTP
ed browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: unsized-media - HTTP
is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default value the default value for unsized-media is '*', that is unsized media elements are allowed for all origins by default. the page will re-flow every time an image with unknown dimensions is loaded. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: usb - HTTP
xts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. webusbthe definition of 'feature-policy integration' in that specification. draft default allow list is 'self'. ...
Feature-Policy: vibrate - HTTP
d browsing contexts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. ...
Feature-Policy: wake-lock - HTTP
'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy default allow list for wake-lock is 'self'. specifications specification status comment feature policy editor's draft initial definition. wake lock api 1 candidate recommendation initial definition of wake-lock feature directive. ...
web-share - HTTP
xts (iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default value is 'self'. specifications specification status comment feature policy editor's draft initial definition. web share api draft ...
Feature-Policy: xr-spatial-tracking - HTTP
(iframes). 'self': the feature is allowed by default in top-level browsing contexts and in nested browsing contexts (iframes) in the same origin. the feature is not allowed in cross-origin documents in nested browsing contexts. 'none': the feature is disabled in top-level and nested browsing contexts. default policy the default allowlist is 'self'. specifications specification status comment webxr device apithe definition of 'permissions policy' in that specification. working draft ...
Feature-Policy - HTTP
rface. autoplay controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface. when this policy is disabled and there were no user gestures, the promise returned by htmlmediaelement.play() will reject with a domexception. the autoplay attribute on <audio> and <video> elements will be ignored. battery controls whether the use of the battery status api is allowed. when this policy is disabled, the promise returned by navigator.getbattery() will reject with a notallowederror domexception. camera controls whether the current document is allowed to use video input devices. when this policy is disabled, the promise returned by getusermedia() will reject with a notallowederror domexception. display-capture controls whether or not the current...
Host - HTTP
Web › HTTP › Headers › Host
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. a 400 (bad request) status code may be sent to any http/1.1 request message that lacks a host header field or that contains more than one. header type request header forbidden header name yes syntax host: <host>:<port> directives <host> the domain name of the server (for virtual hosting). <port> optional tcp port number on which the server is listening. examples host: developer.cdn.mozilla.net specifications specification title ...
If-Modified-Since - HTTP
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. unlike if-unmodified-since, if-modified-since can only be used with a get or head. when used in combination with if-none-match, it is ignored, unless the server doesn't support if-none-match. the most common use case is to update a cached entity that has no associated etag. ...
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. when the condition fails for get and head methods, then the server must return http status code 304 (not modified). for methods that apply server-side changes, the status code 412 (precondition failed) is used. note that the server generating a 304 response must generate any of the following header fields that would have been sent in a 200 (ok) response to the same request: cache-control, content-location, date, etag, expires, and vary. the ...
If-Range - HTTP
Web › HTTP › Headers › If-Range
this header can be used either with a last-modified validator, or with an etag, but not with both. ...
Link - HTTP
Web › HTTP › Headers › Link
be enclosed between < and >: link: <https://example.com>; rel="preconnect" link: https://bad.example; rel="preconnect" specifying multiple links you can specify multiple links separated by commas, for example: link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect" specifications specification status comments rfc 8288, section 3: link serialisation in http headers ietf rfc rfc 5988, section 5: the link header field ietf rfc initial definition ...
Location - HTTP
Web › HTTP › Headers › Location
the location response header indicates the url to redirect a page to. it only provides a meaning when served with a 3xx (redirection) or 201 (created) status response. 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). all responses with one of these status codes send a location header. in cases of resource creation, it indicates the url to the newly ...
Proxy-Authorization - HTTP
header type request header forbidden header name no syntax proxy-authorization: <type> <credentials> directives <type> authentication type. a common type is "basic". see also the iana registry of authentication schemes. ...
Range - HTTP
Web › HTTP › Headers › Range
rver 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. if the server sends back ranges, it uses the 206 partial content for the response. if the ranges are invalid, the server returns the 416 range not satisfiable error. the server can also ignore the range header and return the whole document with a 200 status code. 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...
Referrer-Policy - HTTP
ted list with the desired policy specified last: referrer-policy: no-referrer, strict-origin-when-cross-origin in the above scenario, no-referrer will only be used if strict-origin-when-cross-origin is not supported by the browser. specifying multiple values is only supported in the referrer-policy http header, and not in the referrerpolicy attribute. specifications specification status referrer policy editor's draft ...
Server-Timing - HTTP
the performanceservertiming interface enables tools to automatically collect and process metrics from javascript. this interface is restricted to the same origin, but you can use the timing-allow-origin header to specify the domains that are allowed to access the server metrics. the interface is only available in secure contexts (https) in some browsers. specifications specification status title server timingthe definition of 'server-timing header field' in that specification. working draft initial definition. ...
Strict-Transport-Security - HTTP
ts preload lists. ...
Timing-Allow-Origin - HTTP
see timing resources. <origin> specifies a uri that may see the timing resources. you can specify multiple origins, separated by commas. examples to allow any resource to see timing resources: timing-allow-origin: * to allow https://developer.mozilla.org to see timing resources, you can specify: timing-allow-origin: https://developer.mozilla.org specifications specification status comment resource timing level 3the definition of 'timing-allow-origin' in that specification. editor's draft initial definition. ...
Trailer - HTTP
Web › HTTP › Headers › Trailer
the te request header needs to be set to "trailers" to allow trailer fields. ...
Upgrade-Insecure-Requests - HTTP
grade mechanisms of upgrade-insecure-requests: get / http/1.1 host: example.com upgrade-insecure-requests: 1 the server can now redirect to a secure version of the site. a vary header can be used so that the site isn't served by caches to clients that don’t support the upgrade mechanism. location: https://example.com/ vary: upgrade-insecure-requests specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification. candidate recommendation initial definition. ...
X-Content-Type-Options - HTTP
living standard initial definition ...
HTTP headers - HTTP
Web › HTTP › Headers
ill be used when the actual request is made. origin indicates where a fetch originates from. timing-allow-origin specifies origins that are allowed to see values of attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions. do not track dnt expresses the user's tracking preference. tk indicates the tracking status of the corresponding response. downloads content-disposition indicates if the resource transmitted should be displayed inline (default behavior without the header), or if it should be handled like a download and the browser should present a “save as” dialog. message body information content-length the size of the resource, in decimal number of bytes. content-type indicates the m...
DELETE - HTTP
Web › HTTP › Methods › DELETE
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. a 204 (no content) status code if the action has been enacted and no further information is to be supplied. a 200 (ok) status code if the action has been enacted and the response message includes a representation describing the status. http/1.1 200 ok date: wed, 21 oct 2015 07:28:00...
PATCH - HTTP
Web › HTTP › Methods › PATCH
in the example below a 204 response code is used, because the response does not carry a payload body. a 200 response could have contained a payload body. http/1.1 204 no content content-location: /file.txt etag: "e0023aa4f" specifications specification title rfc 5789: patch patch method for http ...
An overview of HTTP - HTTP
Web › HTTP › Overview
ere, developer.mozilla.org), or the tcp port (here, 80). the version of the http protocol. optional headers that convey additional information for the servers. or a body, for some methods like post, similar to those in responses, which contain the resource sent. responses an example response: responses consist of the following elements: the version of the http protocol they follow. a status code, indicating if the request was successful, or not, and why. a status message, a non-authoritative short description of the status code. http headers, like those for requests. optionally, a body containing the fetched resource. apis based on http the most commonly used api based on http is the xmlhttprequest api, which can be used to exchange data between a user agent and a server. the ...
Protocol upgrade mechanism - HTTP
ther headers may be required depending on the requested protocol; for example, websocket upgrades allow additional headers to configure details about the websocket connection as well as to offer a degree of security in opening the connection. see upgrading to a websocket connection for more details. if the server decides to upgrade the connection, it sends back a 101 switching protocols response status with an upgrade header that specifies the protocol(s) being switched to. if it does not (or cannot) upgrade the connection, it ignores the upgrade header and sends back a regular response (for example, a 200 ok). right after sending the 101 status code, the server can begin speaking the new protocol, performing any additional protocol-specific handshakes as necessary. effectively, the connection...
101 Switching Protocols - HTTP
Web › HTTP › Status › 101
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. the server includes in this response an upgrade response header to indicate the protocol it switched to. the process is described in detail in the article protocol upgrade mechanism. status 101 switching protocols examples switching protocols might be used with websockets. http/1.1 101 switching protocols upgrade: websocket connection: upgrade specifications specification title rfc 7231, section 6.2.2: 101 switching protocol hypertext transfer protocol (http/1.1): semantics and content ...
103 Early Hints - HTTP
Web › HTTP › Status › 103
the http 103 early hints information response status code is primarily intended to be used with the link header to allow the user agent to start preloading resources while the server is still preparing a response. syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. no compatibility data found. please contribute data for "http.status.103" (depth: 1) to the mdn compatibility data repository. ...
205 Reset Content - HTTP
Web › HTTP › Status › 205
the http 205 reset content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the ui. status 205 reset content specifications specification title rfc 7231, section 6.3.6: 205 reset content hypertext transfer protocol (http/1.1): semantics and content compatibility notes browser behavior differs if this response erroneously includes a body on persistent connections see 204 no content for more detail. ...
206 Partial Content - HTTP
Web › HTTP › Status › 206
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. if there is only one range, the content-type of the whole response is set to the type of the document, and a content-range is provided. if several ranges are sent back, the content-type is set to multipart/byteranges and each fragment covers one range, with content-range and content-type describing it. status 206 partial content examples a response containing one single range: http/1.1 206 partial content date: wed, 15 nov 2015 06:25:24 gmt last-modified: wed, 15 nov 2015 04:58:08 gmt content-range: bytes 21010-47021/47022 content-length: 26012 content-type: image/gif ... 26012 bytes of...
304 Not Modified - HTTP
Web › HTTP › Status › 304
head request, or when the request is conditional and uses a if-none-match or a if-modified-since header. ...
404 Not Found - HTTP
Web › HTTP › Status › 404
the http 404 not found client error response code indicates that the server can't find the requested resource. links that lead to a 404 page are often called broken or dead links and can be subject to link rot. a 404 status code does not indicate whether the resource is temporarily or permanently missing. but if a resource is permanently removed, a 410 (gone) should be used instead of a 404 status. status 404 not found custom error pages many web sites customize the look of a 404 page to be more helpful to the user and provide guidance on what to do next. apache servers can be configured using an .htaccess file and a code snippet like the following example. errordocument 404 /notfound.html for an example of a custom 404 page, see mdn's 404 page. custom design is a good thing, in modera...
411 Length Required - HTTP
Web › HTTP › Status › 411
tp) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header. ...
412 Precondition Failed - HTTP
Web › HTTP › Status › 412
n failed client error response code indicates that access to the target resource has been denied. 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. status 412 precondition failed examples etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" etag: w/"0815" avoiding mid-air collisions with the help of the etag and the if-match headers, you can detect mid-air edit collisions. for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes t...
415 Unsupported Media Type - HTTP
Web › HTTP › Status › 415
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. ...
416 Range Not Satisfiable - HTTP
Web › HTTP › Status › 416
ntactically correct, doesn't make sense. the 416 response message contains a content-range indicating an unsatisfied range (that is a '*') followed by a '/' and the current length of the resource. e.g. ...
417 Expectation Failed - HTTP
Web › HTTP › Status › 417
the http 417 expectation failed client error response code indicates that the expectation given in the request's expect header could not be met. see the expect header for more details. ...
418 I'm a teapot - HTTP
Web › HTTP › Status › 418
the http 418 i'm a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot. a combined coffee/tea pot that is temporarily out of coffee should instead return 503. this error is a reference to hyper text coffee pot control protocol defined in april fools' jokes in 1998 and 2014. ...
426 Upgrade Required - HTTP
Web › HTTP › Status › 426
the http 426 upgrade required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. the server sends an upgrade header with this response to indicate the required protocol(s). ...
502 Bad Gateway - HTTP
Web › HTTP › Status › 502
ext transfer protocol (http) 502 bad gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server. ...
504 Gateway Timeout - HTTP
Web › HTTP › Status › 504
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. ...
HTTP
Web › HTTP
behavior of the server or the client. custom proprietary headers can be added using the x- prefix; others in an iana registry, whose original content was defined in rfc 4229. iana also maintains a registry of proposed new http message headers. http request methods the different operations that can be done with http: get, post, and also less common requests like options, delete, or trace. http status response codes http response codes indicate whether a specific http request has been successfully completed. responses are grouped in five classes: informational responses, successful responses, redirections, client errors, and servers errors. csp directives the content-security-policy response header fields allows web site administrators to control resources the user agent is allowed to lo...
Expressions and operators - JavaScript
ernary) operator the conditional operator is the only javascript operator that takes three operands. the operator can have one of two values based on a condition. the syntax is: condition ? val1 : val2 if condition is true, the operator has the value of val1. otherwise it has the value of val2. you can use the conditional operator anywhere you would use a standard operator. for example, var status = (age >= 18) ? 'adult' : 'minor'; this statement assigns the value "adult" to the variable status if age is eighteen or more. otherwise, it assigns the value "minor" to status. comma operator the comma operator (,) simply evaluates both of its operands and returns the value of the last operand. this operator is primarily used inside a for loop, to allow multiple variables to be updated each ...
Meta programming - JavaScript
ype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property. because reflect.defineproperty returns a boolean success status, you can just use an if...else block here: if (reflect.defineproperty(target, property, attributes)) { // success } else { // failure } « previousnext » ...
Using Promises - JavaScript
ng. using async/await addresses most, if not all of these problems—the tradeoff being that the most common mistake with that syntax is forgetting the await keyword. when promises and tasks collide if you run into situations in which you have promises and tasks (such as events or callbacks) which are firing in unpredictable orders, it's possible you may benefit from using a microtask to check status or balance out your promises when promises are created conditionally. if you think microtasks may help solve this problem, see the microtask guide to learn more about how to use queuemicrotask() to enqueue a function as a microtask. ...
JavaScript technologies overview - JavaScript
api specification is an addition to the ecmascript language specification, also standardized by ecma tc39. the internationalization api provides collation (string comparison), number formatting, and date-and-time formatting for javascript applications, letting the applications choose the language and tailor the functionality to their needs. the initial standard was approved in december 2012; the status of implementations in browsers is tracked in the documentation of the intl object. the internationalization specification is nowadays also ratified on a yearly basis and browsers constantly improve their implementation. dom apis webidl the webidl specification provides the glue between the dom technologies and ecmascript. the core of the dom the document object model (dom) is a cross-platfor...
getter - JavaScript
op() { ... } } {get [expression]() { ... } } parameters prop the name of the property to bind to the given function. expression starting with ecmascript 2015, you can also use expressions for a computed property name to bind to the given function. description sometimes it is desirable to allow access to a property that returns a dynamically computed value, or you may want to reflect the status of an internal variable without requiring the use of explicit method calls. in javascript, this can be accomplished with the use of a getter. it is not possible to simultaneously have a getter bound to a property and have that property actually hold a value, although it is possible to use a getter and a setter in conjunction to create a type of pseudo-property. note the following when working w...
Intl.RelativeTimeFormat() constructor - JavaScript
ut. // create a relative time formatter in your locale // with numeric: "auto" option value passed in. const rtf = new intl.relativetimeformat("en", { numeric: "auto" }); // format relative time using negative value (-1). rtf.format(-1, "day"); // > "yesterday" // format relative time using positive day unit (1). rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat()' in that specification. stage 4 ...
Intl.RelativeTimeFormat.prototype.format() - JavaScript
ut. // create a relative time formatter in your locale // with numeric: "auto" option value passed in. const rtf = new intl.relativetimeformat("en", { numeric: "auto" }); // format relative time using negative value (-1). rtf.format(-1, "day"); // > "yesterday" // format relative time using positive day unit (1). rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.format()' in that specification. stage 4 ...
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
stage 4 ...
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
sing the unicode extension key "nu" or filled in as a default. examples using the resolvedoptions method var de = new intl.relativetimeformat('de-de'); var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.style; // "long" usedoptions.numeric; // "always" usedoptions.numberingsystem; // "latn" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.resolvedoptions()' in that specification. stage 4 ...
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
adequate match for balinese since most balinese speakers also understand indonesian, and therefore return the balinese language tag as well. const locales = ['ban', 'id-u-co-pinyin', 'de-id']; const options = { localematcher: 'lookup' }; console.log(intl.relativetimeformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.supportedlocalesof()' in that specification. stage 4 ...
Intl.RelativeTimeFormat - JavaScript
st rtf = new intl.relativetimeformat("en", { numeric: "auto" }); // format relative time using the day unit. rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat' in that specification. ...
JSON - JavaScript
er-defined manner. by default, all instances of undefined are replaced with null, and other unsupported native data types are censored. the replacer option allows for specifying other behavior. examples example json { "browsers": { "firefox": { "name": "firefox", "pref_url": "about:config", "releases": { "1": { "release_date": "2004-11-09", "status": "retired", "engine": "gecko", "engine_version": "1.7" } } } } } specifications specification ecmascript (ecma-262)the definition of 'json' in that specification. ...
Promise() constructor - JavaScript
...
Promise.prototype.then() - JavaScript
e => { console.log("this gets called after the end of the main stack. the value received and returned is: " + value); return value; }); // instantly logging the value of thenprom console.log(thenprom); // using settimeout we can postpone the execution of a function to the moment the stack is empty settimeout(() => { console.log(thenprom); }); // logs, in order: // promise {[[promisestatus]]: "pending", [[promisevalue]]: undefined} // "this gets called after the end of the main stack. the value received and returned is: 33" // promise {[[promisestatus]]: "resolved", [[promisevalue]]: 33} description as the then and promise.prototype.catch() methods return promises, they can be chained — an operation called composition. examples using the then method var p1 = new promise((res...
Reflect.defineProperty() - JavaScript
...
JavaScript
nt. the first 40 lessons are free, and the complete course is available for a small one-time payment. togetherjs collaboration made easy. by adding togetherjs to your site, your users can help each other out on a website in real-time! stack overflow stack overflow questions tagged with "javascript". javascript versions and release notes browse javascript's feature history and implementation status. jsfiddle edit javascript, css, html and get live results. use external resources and collaborate with your team online. plunker plunker is an online community for creating, collaborating on and sharing your web development ideas. edit your javascript, css, html files and get live results and file structure. jsbin js bin is an open-source collaborative web development debugging tool. c...
background_color - Web app manifests
cation and loading the site's content. note: the background_color member is only meant to improve the user experience while the main stylesheet is loading from the network or the storage media; it is not used by the user agent as the background-color css property when the progressive web app stylesheet is available. examples "background_color": "red" specification specification status comment feedback web app manifestthe definition of 'background_color' in that specification. working draft initial definition. web app manifest working group drafts ...
categories - Web app manifests
cations. like search engines and meta keywords, catalogs and stores are free to ignore them. note: categories values are lower-cased by the stores and catalogs before processing, so "news" and "news" are treated as the same value. developers are encouraged to use lower case in the first place. example "categories": ["books", "education", "medical"] specification specification status comment feedback web app manifestthe definition of 'categories' in that specification. working draft initial definition. web app manifest working group drafts ...
description - Web app manifests
e values of the dir and lang manifest members. examples simple description in left-to-right language: "description": "awesome application that will help you achieve your dreams." description in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "description": ".تطبيق رائع سيساعدك على تحقيق أحلامك" specification specification status comment feedback web app manifestthe definition of 'description' in that specification. working draft initial definition. web app manifest working group drafts ...
dir - Web app manifests
Web › Manifest › dir
working draft initial definition. web app manifest working group drafts ...
iarc_rating_id - Web app manifests
ed to be used to determine which ages the web application is appropriate for. note: the same code can be shared across multiple participating storefronts, as long as the distributed product remains the same (i.e., doesn’t serve totally different code paths on different storefronts). examples "iarc_rating_id": "e84b072d-71b3-4d3e-86ae-31a8ce4e53b7" specification specification status comment feedback web app manifestthe definition of 'iarc_rating_id' in that specification. working draft initial definition. web app manifest working group drafts ...
icons - Web app manifests
be used by the user agent like a mask over any solid fill. maskable: the image is designed with icon masks and safe zone in mind, such that any part of the image outside the safe zone can safely be ignored and masked away by the user agent. any: the user agent is free to display the icon in any context (this is the default value). specification specification status comment feedback web app manifestthe definition of 'icons' in that specification. working draft initial definition. web app manifest working group drafts ...
lang - Web app manifests
Web › Manifest › lang
type string mandatory no the lang member is a string containing a single language tag. it specifies the primary language for the values of the manifest's directionality-capable members, and together with dir determines their directionality. examples "lang": "en-us" specification specification status comment feedback web app manifestthe definition of 'lang' in that specification. working draft initial definition. web app manifest working group drafts ...
name - Web app manifests
Web › Manifest › name
as a label for an icon). name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the values of the dir and lang manifest members. examples simple name in left-to-right language: "name": "awesome application" right-to-left name in arabic: "dir": "rtl", "lang": "ar", "name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'name' in that specification. working draft initial definition. web app manifest working group drafts ...
orientation - Web app manifests
hem does not make sense for the particular context. note: the orientation can be changed at runtime via the screen orientation api. values orientation can take one of the following values: any natural landscape landscape-primary landscape-secondary portrait portrait-primary portrait-secondary examples "orientation": "portrait-primary" specification specification status comment feedback web app manifestthe definition of 'orientation' in that specification. working draft initial definition. web app manifest working group drafts ...
prefer_related_applications - Web app manifests
that applications listed in related_applications should be preferred over the web application. if the prefer_related_applications member is set to true, the user agent might suggest installing one of the related applications instead of this web app. if omitted, prefer_related_applications defaults to false. examples "prefer_related_applications": true specification specification status comment feedback web app manifestthe definition of 'prefer_related_applications' in that specification. working draft initial definition. web app manifest working group drafts ...
related_applications - Web app manifests
plication values application objects may contain the following values: member description platform the platform on which the application can be found. list of available values url the url at which the application can be found. id the id used to represent the application on the specified platform. specification specification status comment feedback web app manifestthe definition of 'related_applications' in that specification. working draft initial definition. web app manifest working group drafts ...
scope - Web app manifests
ill be the url of the manifest. examples if the scope is relative, the manifest url is used as a base url: "scope": "/app/" the following scope limits navigation to the current site: "scope": "https://example.com/" finally, the following example limits navigation to a subdirectory of the current site: "scope": "https://example.com/subdirectory/" specification specification status comment feedback web app manifestthe definition of 'scope' in that specification. working draft initial definition. web app manifest working group drafts ...
screenshots - Web app manifests
ts member defines an array of screenshots intended to showcase the application. these images are intended to be used by progressive web app stores. examples "screenshots" : [ { "src": "screenshot1.webp", "sizes": "1280x720", "type": "image/webp" }, { "src": "screenshot2.webp", "sizes": "1280x720", "type": "image/webp" } ] specification specification status comment feedback web app manifestthe definition of 'screenshots' in that specification. working draft initial definition. web app manifest working group drafts ...
short_name - Web app manifests
layed left-to-right or right-to-left based on the value of the dir and lang manifest members. examples simple short_name in left-to-right language: "name": "awesome application", "short_name": "awesome app" short_name in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "name": "تطبيق رائع", "short_name": "رائع" specification specification status comment feedback web app manifestthe definition of 'short_name' in that specification. working draft initial definition. web app manifest working group drafts ...
shortcuts - Web app manifests
shortcut's url member. examples the following is a list of shortcuts a calendar app might have: "shortcuts" : [ { "name": "today's agenda", "url": "/today", "description": "list of events planned for today" }, { "name": "new event", "url": "/create/event" }, { "name": "new reminder", "url": "/create/reminder" } ] specification specification status comment feedback web app manifestthe definition of 'shortcuts' in that specification. working draft initial definition. web app manifest working group drafts ...
start_url - Web app manifests
tion menu or homescreen). note: the start_url member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards. examples absolute url "start_url": "https://example.com" relative url if the url is relative, the manifest url is used as the base url to resolve it. "start_url": "../startpoint.html" specification specification status comment feedback web app manifestthe definition of 'start_url' in that specification. working draft initial definition. web app manifest working group drafts ...
theme_color - Web app manifests
type string mandatory no the theme_color member is a string that defines the default theme color for the application. this sometimes affects how the os displays the site (e.g., on android's task switcher, the theme color surrounds the site). examples "theme_color": "red" specification specification status comment feedback web app manifestthe definition of 'theme_color' in that specification. working draft initial definition. web app manifest working group drafts ...
Web app manifests
e manifest file is in the same origin as the current page. splash screens in chrome 47 and later, a splash screen is displayed for sites launched from a homescreen. this splashscreen is auto-generated from properties in the web app manifest, specifically: name background_color the icon in the icons array that is closest to 128dpi for the device. specifications specification status comment web app manifest working draft initial definition. ...
<math> - MathML
Web › MathML › Element › math
notes: xhtml documents with mathml must be served as application/xhtml+xml. you can achieve that easily by adding the .xhtml extension to your local files. for apache servers you can configure your .htaccess file to map extensions to the correct mime type. since you notate your mathml in an xml document, also be sure you write a well-formed xml document. specifications specification status comment mathml 3.0the definition of 'the top-level math element' in that specification. recommendation current specification mathml 2.0the definition of 'the top-level math element' in that specification. recommendation initial specification ...
<menclose> - MathML
recommendation current specification mathml 2.0the definition of 'menclose' in that specification. recommendation initial specification ...
<merror> - MathML
Web › MathML › Element › merror
ground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color and also the fraction line color. you can use #rgb, #rrggbb and html color names. examples <math> <merror> <mrow> <mtext> division by zero: </mtext> <mfrac> <mn> 1 </mn> <mn> 0 </mn> </mfrac> </mrow> </merror> </math> specifications specification status comment mathml 3.0the definition of 'merror' in that specification. recommendation current specification mathml 2.0the definition of 'merror' in that specification. recommendation initial specification ...
<mfrac> - MathML
Web › MathML › Element › mfrac
ribute is deprecated and will be removed in the future. use css text-align instead. examples sample rendering: your browser rendering: a b c d <math> <mfrac bevelled="true"> <mfrac> <mi> a </mi> <mi> b </mi> </mfrac> <mfrac> <mi> c </mi> <mi> d </mi> </mfrac> </mfrac> </math> specifications specification status comment mathml 3.0the definition of 'mfrac' in that specification. recommendation current specification mathml 2.0the definition of 'mfrac' in that specification. recommendation initial specification ...
<mglyph> - MathML
Web › MathML › Element › mglyph
k to a specified uri. mathbackground the background color (if the image has transparency). you can use #rgb, #rrggbb and html color names. src the image url. valign specifies the vertical alignment with respect to the current baseline. width the width of the image. examples <math> <mi><mglyph src="my-glyph.png" alt="my glyph"/></mi> </math> specifications specification status comment mathml 3.0the definition of 'mglyph' in that specification. recommendation current specification mathml 2.0the definition of 'mglyph' in that specification. recommendation initial specification ...
<mi> - MathML
Web › MathML › Element › mi
recommendation current specification mathml 2.0the definition of 'mi' in that specification. recommendation initial specification ...
<mlabeledtr> - MathML
lues are: axis, baseline, bottom, center and top. examples rendering: <math> <mtable> <mlabeledtr> <mtd><mn>1</mn></mtd> <!-- label --> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mlabeledtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> </mtr> </mtable> </math> specifications specification status comment mathml 3.0the definition of 'mlabeledtr' in that specification. recommendation current specification mathml 2.0the definition of 'mlabeledtr' in that specification. recommendation initial specification ...
<mmultiscripts> - MathML
recommendation current specification mathml 2.0the definition of 'mmultiscripts' in that specification. recommendation initial specification ...
<mn> - MathML
Web › MathML › Element › mn
recommendation current specification mathml 2.0the definition of 'mn' in that specification. recommendation initial specification ...
<mo> - MathML
Web › MathML › Element › mo
herwise false. allowed values are true or false. examples <math> <mrow> <mn>5</mn> <mo>+</mo> <mn>5</mn> </mrow> <mrow> <mo> [ </mo> <!-- default form value: prefix --> <mrow> <mn> 0 </mn> <mo> ; </mo> <!-- default form value: infix --> <mn> 1 </mn> </mrow> <mo> ) </mo> <!-- default form value: postfix --> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mo' in that specification. recommendation current specification mathml 2.0the definition of 'mo' in that specification. recommendation initial specification ...
<mover> - MathML
Web › MathML › Element › mover
the text color. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: x + y + z ⏞ <math> <mover accent="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23de; <!--top curly bracket--> </mo> </mover> </math> specifications specification status comment mathml 3.0the definition of 'mover' in that specification. recommendation current specification mathml 2.0the definition of 'mover' in that specification. recommendation initial specification ...
<mpadded> - MathML
imension. prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the mathml2 pseudo-unit lspace was allowed, which is no longer present in the mathml3 recommendation and has been removed now. examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </mpadded> </math> specifications specification status comment mathml 3.0the definition of 'mpadded' in that specification. recommendation current specification mathml 2.0the definition of 'mpadded' in that specification. recommendation initial specification ...
<mphantom> - MathML
d, style provided for use with stylesheets. mathbackground the background color. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: x + y + z <math> <mrow> <mi> x </mi> <mo> + </mo> <mphantom> <mi> y </mi> <mo> + </mo> </mphantom> <mi> z </mi> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mphantom' in that specification. recommendation current specification mathml 2.0the definition of 'mphantom' in that specification. recommendation initial specification ...
<mroot> - MathML
Web › MathML › Element › mroot
pecified url. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color and also the color of the root symbol itself. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: x 3 <math> <mroot> <mi>x</mi> <mn>3</mn> </mroot> </math> specifications specification status comment mathml 3.0the definition of 'mroot' in that specification. recommendation current specification mathml 2.0the definition of 'mroot' in that specification. recommendation initial specification ...
<mrow> - MathML
Web › MathML › Element › mrow
can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. examples <math> <mrow> <mn> 1 </mn> <mo> + </mo> <mn> 1 </mn> </mrow> <mrow> <mo> ( </mo> <mrow> <mi> x </mi> <mo> , </mo> <mi> y </mi> </mrow> <mo> ) </mo> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mrow' in that specification. recommendation current specification mathml 2.0the definition of 'mrow' in that specification. recommendation initial specification ...
<ms> - MathML
Web › MathML › Element › ms
recommendation current specification mathml 2.0the definition of 'ms' in that specification. recommendation initial specification ...
<mspace> - MathML
Web › MathML › Element › mspace
mathbackground the background color. you can use #rgb, #rrggbb and html color names. width the desired width of the space (see length for values and units). note that some common attributes like mathcolor, mathvariant or dir have no effect on <mspace>. examples <math> <mspace depth="40px" height="20px" /> <mspace width="100px" /> </math> specifications specification status comment mathml 3.0the definition of 'mspace' in that specification. recommendation current specification mathml 2.0the definition of 'mspace' in that specification. recommendation initial specification ...
<msqrt> - MathML
Web › MathML › Element › msqrt
hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color and also the color of the root symbol itself. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: x <math> <msqrt> <mi>x</mi> </msqrt> </math> specifications specification status comment mathml 3.0the definition of 'msqrt' in that specification. recommendation current specification mathml 2.0the definition of 'msqrt' in that specification. recommendation initial specification ...
<mstyle> - MathML
Web › MathML › Element › mstyle
recommendation current specification mathml 2.0the definition of 'mstyle' in that specification. recommendation initial specification ...
<msub> - MathML
Web › MathML › Element › msub
#rrggbb and html color names. subscriptshift the minimum space by which to shift the subscript below the baseline of the expression, as a length value. this attribute is deprecated and will be removed in the future. examples sample rendering: rendering in your browser: x 1 <math> <msub> <mi>x</mi> <mn>1</mn> </msub> </math> specifications specification status comment mathml 3.0the definition of 'msub' in that specification. recommendation current specification mathml 2.0the definition of 'msub' in that specification. recommendation initial specification ...
<msubsup> - MathML
ift the superscript above the baseline of the expression, as a length value. this attribute is deprecated and will be removed in the future. examples sample rendering: rendering in your browser: ∫ 0 1 <math displaystyle="true"> <msubsup> <mo> &#x222b;<!--integral --> </mo> <mn> 0 </mn> <mn> 1 </mn> </msubsup> </math> specifications specification status comment mathml 3.0the definition of 'msubsup' in that specification. recommendation current specification mathml 2.0the definition of 'msubsup' in that specification. recommendation initial specification ...
<msup> - MathML
Web › MathML › Element › msup
bb and html color names. superscriptshift the minimum space by which to shift the superscript up from the baseline of the expression, as a length value. this attribute is deprecated and will be removed in the future. examples sample rendering: rendering in your browser: x 2 <math> <msup> <mi>x</mi> <mn>2</mn> </msup> </math> specifications specification status comment mathml 3.0the definition of 'msup' in that specification. recommendation current specification mathml 2.0the definition of 'msup' in that specification. recommendation initial specification ...
<mtable> - MathML
Web › MathML › Element › mtable
recommendation current specification mathml 2.0the definition of 'mtable' in that specification. recommendation initial specification ...
<mtd> - MathML
Web › MathML › Element › mtd
l color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. rowalign specifies the vertical alignment of this cell and overrides values specified by <mtable> or <mtr>. possible values are: axis, baseline, bottom, center and top. rowspan a non-negative integer value that indicates on how many rows does the cell extend. specifications specification status comment mathml 3.0the definition of 'mtd' in that specification. recommendation current specification mathml 2.0the definition of 'mtd' in that specification. recommendation initial specification ...
<mtext> - MathML
Web › MathML › Element › mtext
recommendation current specification mathml 2.0the definition of 'mtext' in that specification. recommendation initial specification ...
<mtr> - MathML
Web › MathML › Element › mtr
ed to set a hyperlink to a specified uri. mathbackground the background color. you can use #rgb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. rowalign overrides the vertical alignment of cells specified by <mtable> for this row. possible values are: axis, baseline, bottom, center and top. specifications specification status comment mathml 3.0the definition of 'mtr' in that specification. recommendation current specification mathml 2.0the definition of 'mtr' in that specification. recommendation initial specification ...
<munder> - MathML
Web › MathML › Element › munder
color. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: x + y + z ⏟ <math> <munder accentunder="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23df; <!--bottom curly bracket--> </mo> </munder> </math> specifications specification status comment mathml 3.0the definition of 'munder' in that specification. recommendation current specification mathml 2.0the definition of 'munder' in that specification. recommendation initial specification ...
<munderover> - MathML
gb, #rrggbb and html color names. mathcolor the text color. you can use #rgb, #rrggbb and html color names. examples sample rendering: rendering in your browser: ∫ 0 ∞ <math displaystyle="true"> <munderover > <mo> &#x222b; <!--integral--> </mo> <mn> 0 </mn> <mi> &#x221e; <!--infinity--> </mi> </munderover> </math> specifications specification status comment mathml 3.0the definition of 'munderover' in that specification. recommendation current specification mathml 2.0the definition of 'munderover' in that specification. recommendation initial specification ...
<semantics> - MathML
recommendation current specification mathml 2.0the definition of 'combining presentation and content markup ' in that specification. recommendation initial specification ...
Web video codec guide - Web media technologies
ril 1, 2019, so mpeg-2 can be used freely outside those two countries. patents are licensed by mpeg la. theora theora, developed by xiph.org, is an open and free video codec which may be used without royalties or licensing. theora is comparable in quality and compression rates to mpeg-4 part 2 visual and avc, making it a very good if not top-of-the-line choice for video encoding. but its status as being free from any licensing concerns and its relatively low cpu resource requirements make it a popular choice for many software and web projects. the low cpu impact is particularly useful since there are no hardware decoders available for theora. theora was originally based upon the vc3 codec by on2 technologies. the codec and its specification were released under the lgpl license and entr...
Lazy loading - Web Performance
bserver api intersection observers allow the user to know when an observed element enters or exits the browser’s viewport. event handlers when browser compatibility is crucial, there are a few options: polyfill intersection observer fallback to scroll, resize or orientation change event handlers to determine if a specific element is in viewport specifications specification status comment html living standard living standard ...
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
n end user might take through a web application, reporting back the performance the simulator experiences. the traffic measured is not of your actual users, but rather synthetically generated traffic collecting data on page performance. an example of synthetic monitoring is webpagetest.org. it is done in a controlled environment where variable like geography, network, device, browser, and cached status are predetermined. 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. controlling for environmental variables is helpful in understanding where performance bottlenecks have been occurring and identifying the source of any performance issues. for exam...
Privacy, permissions, and information security
this is the technology behind the https (hypertext transport protocol secured) protocol not all of these are generally directly used within code; notably, the permissio...
Add to Home screen - Progressive web apps (PWAs)
n on the home screen is tapped and it first starts to load (this currently appears only when apps have been added to the home screen by chrome). display: specifies how the app should be displayed. to make it feel like a distinct app (and not just a web page), you should choose a value such as fullscreen (no ui is shown at all) or standalone (very similar, but system-level ui elements such as the status bar might be visible). icons: specifies icons for the browser to use when representing the app in different places (such as on the task switcher, or more important, the home screen). we've included only one in our demo. name/short_name: these fields provide an app name to be displayed when representing the app in different places. name provides the full app name, and short_name provides a short...
accent-height - SVG: Scalable Vector Graphics
the font coordinate system. only one element is using this attribute: <font-face> font-face for <font-face>, accent-height defines the distance from the origin to the top of accent characters, measured by a distance within the font coordinate system. value <number> default value value of ascent animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'accent-height' in that specification. recommendation initial definition ...
accumulate - SVG: Scalable Vector Graphics
ter the first builds upon the last value of the previous iteration. none specifies that repeat iterations are not cumulative. this attribute is ignored if the target attribute value does not support addition, or if the animation element does not repeat. this attribute will be ignored if the animation function is specified with only the to attribute. specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'accumulate' in that specification. recommendation initial definition ...
additive - SVG: Scalable Vector Graphics
d other lower priority animations. replace specifies that the animation will override the underlying value of the attribute and other lower priority animations. this is the default, however the behavior is also affected by the animation value attributes by and to, as described in smil animation: how from, to and by attributes affect additive behavior. specifications specification status comment svg animations level 2the definition of 'additive' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'additive' in that specification. recommendation initial definition ...
alignment-baseline - SVG: Scalable Vector Graphics
lisation of anchors --> <circle cx="60" cy="10" r="3" fill="red" /> <circle cx="60" cy="65" r="3" fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text{ font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> for object alignment in other elements (such as <text>), see dominant-baseline. specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification. working draft no change scalable vector graphics (svg) 2the definition of 'alignment-baseline' in that specification. candidate recommendation refers to the definition in css inline layout and notes the changes to auto, before-edge, after-edge, text-before-edge, and text-aft...
alphabetic - SVG: Scalable Vector Graphics
n @font-face. for horizontally oriented glyph layouts, it indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment. the value is an offset in the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification. recommendation initial definition ...
amplitude - SVG: Scalable Vector Graphics
the amplitude attribute controls the amplitude of the gamma function of a component transfer element when its type attribute is gamma. four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'amplitude' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'amplitude' in that specification. recommendation initial definition ...
arabic-form - SVG: Scalable Vector Graphics
t value isolated animatable no initial this value indicates that the glyph represents the initial form. medial this value indicates that the glyph represents the medial form. terminal this value indicates that the glyph represents the terminal form. isolated this value indicates that the glyph represents the isolated form. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'arabic-form' in that specification. recommendation initial definition ...
ascent - SVG: Scalable Vector Graphics
Web › SVG › Attribute › ascent
t-origin-y value for the corresponding font. only one element is using this attribute: <font-face> font-face for <font-face>, ascent defines the maximum unaccented height of the font within the font coordinate system. value <number> default value difference between units-per-em and vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ascent' in that specification. recommendation initial definition ...
attributeName - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributename' in that specification. recommendation initial definition ...
attributeType - SVG: Scalable Vector Graphics
ned as animatable in the default xml namespace for the target element. auto this value specifies that the implementation should match the attributename to an attribute for the target element. user agents first search through the list of css properties for a matching property name, and if none is found, search the default xml namespace for the element. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributetype' in that specification. recommendation initial definition ...
azimuth - SVG: Scalable Vector Graphics
Web › SVG › Attribute › azimuth
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'azimuth' in that specification. recommendation initial definition ...
baseFrequency - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'basefrequency' in that specification. recommendation initial definition ...
baseProfile - SVG: Scalable Vector Graphics
g profile should define the text that is appropriate for this attribute. only one element is using this attribute: <svg> context notes value profile name default value none animatable no example <svg width="120" height="120" version="1.1" xmlns="http://www.w3.org/2000/svg" baseprofile="full"> ... </svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'baseprofile' in that specification. recommendation initial definition ...
baseline-shift - SVG: Scalable Vector Graphics
rscripts. <length-percentage> a length value raises (positive value) or lowers (negative value) the dominant-baseline of the parent text content element by the specified length. a percentage value raises (positive value) or lowers (negative value) the dominant-baseline of the parent text content element by the specified percentage of the line-height. specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification. working draft removed the baseline value, as it is a redundant keyword within the vertical-align property. scalable vector graphics (svg) 2the definition of 'alignment-baseline' in that specification. candidate recommendation refers to the definition in css inline layout and...
bbox - SVG: Scalable Vector Graphics
Web › SVG › Attribute › bbox
font. only one element is using this attribute: <font-face> usage notes value <string> default value none animatable no <string> a comma-separated list of exactly four numbers specifying, in order, the lower left x, lower left y, upper right x, and upper right y of the bounding box for the complete font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'bbox' in that specification. recommendation initial definition ...
begin - SVG: Scalable Vector Graphics
Web › SVG › Attribute › begin
1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" /> </svg> this example is embed in an iframe. if you want to activate the key events, you have to click on it first. begin-5-accesskey.svg specifications specification status comment svg animations level 2the definition of 'begin for <discard>' in that specification. editor's draft adds the definition for the <discard> element. svg animations level 2the definition of 'begin' in that specification. editor's draft refers to the specifications in dom ui events and html for the <event-value>. scalable vector graphics (svg) 1.1...
bias - SVG: Scalable Vector Graphics
Web › SVG › Attribute › bias
divisor attribute, the bias attribute is added to each component. this allows representation of values that would otherwise be clamped to 0 or 1. usage notes value <number> default value 0 animatable yes one application of bias is when it is desirable to have 0.5 gray value be the zero response of the filter. specifications specification status comment filter effects module level 1the definition of 'bias' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'bias' in that specification. recommendation initial definition ...
by - SVG: Scalable Vector Graphics
Web › SVG › Attribute › by
"width" fill="freeze" by="50" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no the exact value type for this attribute depends on the value of the attribute that will be animated. when a list of values is defined via the values attribute, the by attribute is ignored. specifications specification status comment svg animations level 2the definition of 'by' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'by' in that specification. recommendation initial definition ...
calcMode - SVG: Scalable Vector Graphics
r keysplines will be ignored. for <animatemotion>, this is the default value. spline interpolates from one value in the values list to the next according to a time function defined by a cubic bézier spline. the points of the spline are defined in the keytimes attribute, and the control points for each interval are defined in the keysplines attribute. specifications specification status comment svg animations level 2the definition of 'calcmode' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'calcmode' in that specification. recommendation initial definition ...
cap-height - SVG: Scalable Vector Graphics
within the font coordinate system. note: it was specified to share the syntax and semantics of the obsolete cap-height descriptor of the @font-face at-rule defined in an early version of css 2. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'cap-height' in that specification. recommendation initial definition ...
clip-path - SVG: Scalable Vector Graphics
candidate recommendation extends its application to html elements. the clip-path property replaces the deprecated clip property. scalable vector graphics (svg) 1.1 (second edition)the definition of 'clip-path' in that specification. recommendation initial definition (applies...
clip - SVG: Scalable Vector Graphics
Web › SVG › Attribute › clip
ounds of the viewport created by the given element.the value rect() defines a clipping rectangle following the following syntax: rect(<top>, <right>, <bottom>, <left>). the <top> and <bottom> values specify offsets from the top border edge of the element viewport, while <right> and <left> specify offsets from the left border edge of the element viewport. specifications specification status comment css masking module level 1the definition of 'clip' in that specification. candidate recommendation deprecates clip property, suggests clip-path as replacement. scalable vector graphics (svg) 1.1 (second edition)the definition of 'clip' in that specification. recommendation initial definition ...
clipPathUnits - SVG: Scalable Vector Graphics
this value indicates that all coordinates inside the <clippath> element are relative to the bounding box of the element the clipping path is applied to. it means that the origin of the coordinate system is the top left corner of the object bounding box and the width and height of the object bounding box are considered to have a length of 1 unit value. specifications specification status comment css masking module level 1the definition of 'clippathunits' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'clippathunits' in that specification. recommendation initial definition ...
color-interpolation-filters - SVG: Scalable Vector Graphics
for color interpolation. this option indicates that the author doesn't require that color interpolation occur in a particular color space. srgb indicates that color interpolation should occur in the srgb color space. linearrgb indicates that color interpolation should occur in the linearized rgb color space as described in the srgb specification. specifications specification status comment filter effects module level 1the definition of 'color-interpolation' in that specification. working draft no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation-filters' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is ...
color-interpolation - SVG: Scalable Vector Graphics
es for color interpolation. this option indicates that the author doesn't require that color interpolation occur in a particular color space. srgb indicates that color interpolation should occur in the srgb color space. linearrgb indicates that color interpolation should occur in the linearized rgb color space as described in the srgb specification. specifications specification status comment scalable vector graphics (svg) 2the definition of 'color-interpolation' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation' in that specification. recommendation initial definition browser compatibility the compatibility table on this pa...
color-profile - SVG: Scalable Vector Graphics
name> and uses the last matching entry that is found. if a match is found, the corresponding profile overrides an embedded profile inside an image. if no match is found, then the embedded profile inside the image is used. <iri> an iri reference to the source color profile. the referenced color profile overrides an embedded profile inside the image. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-profile' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull reque...
color - SVG: Scalable Vector Graphics
Web › SVG › Attribute › color
candidate recommendation removed the restriction to which elements it applies. scalable vector graphics (svg) 1.1 (second edition)the definition of 'color' in that specification. recommendation initial definition browser compatibility the compatibility table on thi...
contentScriptType - SVG: Scalable Vector Graphics
ributes. this language must be used for all instances of script that do not specify their own scripting language. the value specifies a media type, per mime part two: media types [rfc2046]. usage notes value one of the content types specified in the media types default value application/ecmascript animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification. recommendation initial definition ...
contentStyleType - SVG: Scalable Vector Graphics
ady defined as default value if contentstyletype is ommitted, the attribute is not well supported in user agents. if other style sheet languages become more popular they might not use the style attribute, instead it could be easily declared which style language is used in the <style>'s type attribute. the use of contentstyletype is therefore deprecated. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification. recommendation initial definition ...
cx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › cx
candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cx' in that specification. candidate recommendation definition for svg2 paint servers. scalable vector graphics (svg) 1.1 (second edition)the definition of '...
cy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › cy
candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cy' in that specification. candidate recommendation definition for svg2 paint servers. scalable vector graphics (svg) 1.1 (second edition)the definition of '...
d - SVG: Scalable Vector Graphics
Web › SVG › Attribute › d
candidate recommendation definition for <path> scalable vector graphics (svg) 1.1 (second edition)the definition of 'd' in that specification. recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the defi...
data-* - SVG: Scalable Vector Graphics
Web › SVG › Attribute › data-*
th the following restrictions: can't start with xml. no semicolons (;, u+003a). no capital a to z letters. the svgelement.dataset property is a domstringmap that provides the attribute data-test-value via svgelement.dataset.testvalue. hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format. specifications specification status comment scalable vector graphics (svg) 2the definition of 'data-*' in that specification. candidate recommendation custom data attributes are new in svg 2. ...
descent - SVG: Scalable Vector Graphics
Web › SVG › Attribute › descent
d depth of the font. note: it was specified to share the syntax and semantics of the obsolete descent descriptor of the @font-face at-rule defined in an early version of css 2. only one element is using this attribute: <font-face> usage notes value <number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification. recommendation initial definition ...
diffuseConstant - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'diffuseconstant' in that specification. recommendation initial definition ...
direction - SVG: Scalable Vector Graphics
proposed recommendation definition in css scalable vector graphics (svg) 2the definition of 'direction' in that specification. candidate recommendation refers to the css writing modes specification of the direction property. scalable vector graphics (svg) 1.1 ...
display - SVG: Scalable Vector Graphics
Web › SVG › Attribute › display
ell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container<display-box> = contents | none<display-legacy> = inline-block | inline-list-item | inline-table | inline-flex | inline-grid animatable yes for a description of the values, please refer to the css display property. specifications specification status comment scalable vector graphics (svg) 2the definition of 'display' in that specification. candidate recommendation refers to the css 2 specification of the display property, but outlines the differences regarding svg. scalable vector graphics (svg) 1.1 (second edition)the definition of 'display' in that specification. recommendation initial definition ...
divisor - SVG: Scalable Vector Graphics
Web › SVG › Attribute › divisor
style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes value <number> default value sum of all values in kernelmatrix or 1 if sum is 0 animatable yes <number> this value defines the divisor. if the specified divisor is 0 then the default value will be used instead. specifications specification status comment filter effects module level 1the definition of 'divisor' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'divisor' in that specification. recommendation initial definition ...
dominant-baseline - SVG: Scalable Vector Graphics
candidate recommendation refers to the specification in working draft and explicitly mentions the removal of the values use-script, no-change, and reset-size. css inline layoutthe definition of 'dominant-baseline' in that specification. working draft removed th...
dur - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dur
ic media duration. this is only valid for elements that define media. (for animation elements the attribute will be ignored if media is specified.) indefinite this value specifies the simple duration as indefinite. note: the interpolation will not work if the simple duration is indefinite (although this may still be useful for <set> elements). specifications specification status comment svg animations level 2the definition of 'dur' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'dur' in that specification. recommendation initial definition ...
dx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dx
are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphs, the remaining glyphs use a value of 0. if there are more values than glyphs, extra values are ignored. value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dx' in that specification. working draft initial definition for <fedropshadow> filter effects module level 1the definition of 'dx' in that specification. working draft definition for <feoffset> scalable vector graphics (svg) 2the definition of 'dx' in that specification. candidate recommendati...
dy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › dy
multiple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph. if there are less values than glyphes, the remaining glyphes use a value of 0. if there are more values than glyphes, extra values are ignored. value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dy' in that specification. working draft initial definition for <fedropshadow> filter effects module level 1the definition of 'dy' in that specification. working draft definition for <feoffset> scalable vector graphics (svg) 2the definition of 'dy' in that specification. candidate recommendati...
edgeMode - SVG: Scalable Vector Graphics
age is extended along each of its borders as necessary by duplicating the color values at the given edge of the input image. wrap this value indicates that the input image is extended by taking the color values from the opposite edge of the image. none this value indicates that the input image is extended with pixel values of zero for r, g, b and a. specifications specification status comment filter effects module level 1the definition of 'edgemode for <fegaussianblur>' in that specification. working draft initial definition for <fegaussianblur> filter effects module level 1the definition of 'edgemode for <feconvolvematrix>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the defini...
elevation - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'elevation' in that specification. recommendation initial definition ...
enable-background - SVG: Scalable Vector Graphics
n. those values act as a clipping rectangle on the background image canvas. negative values for <width> or <height> are forbidden. if one, two, or three values are specified or if neither <width> nor <height> are specified, the backgroundimage and backgroundalpha of a filter primitive are processed as if background image processing were not enabled. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'enable-background' in that specification. recommendation initial definition ...
end - SVG: Scalable Vector Graphics
Web › SVG › Attribute › end
t> <line x1="110" y1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" /> </svg> this example is embed in an iframe. if you want to activate the key events, you have to click on it first. specifications specification status comment svg animations level 2the definition of 'end' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'end' in that specification. recommendation initial definition ...
exponent - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'exponent' in that specification. recommendation initial definition ...
externalResourcesRequired - SVG: Scalable Vector Graphics
tion timeline does not begin until that resource and all other required resources become available, have been parsed and are ready to be rendered. false this value indicates that resources external to the current document are optional. document rendering can proceed even if external resources are unavailable to the current element and its descendants. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'externalresourcesrequired' in that specification. recommendation initial definition ...
fill-opacity - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-opacity' in that specification. recommendation initial definition for shapes and texts ...
fill-rule - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and text scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-rule' in that specification. recommendation initial definition for shapes and text ...
fill - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fill
animatable yes note: as a presentation attribute fill can be used as a css property. tspan for <tspan>, fill is a presentation attribute that defines the color of the text. value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property. specifications specification status comment svg animations level 2the definition of 'transform' in that specification. editor's draft definition for animations scalable vector graphics (svg) 2the definition of 'fill' in that specification. candidate recommendation definition for shapes and texts. adds context-fill and context-stroke. scalable vector graphics (svg) 1.1 (second editio...
filter - SVG: Scalable Vector Graphics
Web › SVG › Attribute › filter
3.org/2000/svg"> <filter id="blur"> <fegaussianblur stddeviation="2" /> </filter> <rect x="10" y="10" width="80" height="80" filter="url(#blur)" /> </svg> usage notes value none | <filter-function-list> default value none animatable yes for a description of the values see the css filter property. specifications specification status comment filter effects module level 1the definition of 'filter' in that specification. working draft extended the values by several special filter functions. scalable vector graphics (svg) 1.1 (second edition)the definition of 'filter' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is...
filterRes - SVG: Scalable Vector Graphics
recommendation initial definition ...
filterUnits - SVG: Scalable Vector Graphics
m taking the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute). objectboundingbox in that case, x, y, width and height represent fractions or percentages of the bounding box on the referencing element. specifications specification status comment filter effects module level 1the definition of 'filterunits' in that specification. working draft initial definition scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterunits' in that specification. recommendation initial definition ...
flood-color - SVG: Scalable Vector Graphics
working draft removed the <icccolor> value and aligned the value to the css color value. scalable vector graphics (svg) 1.1 (second edition)the definition of 'flood-color' in that specification. recommendation initial definition ...
flood-opacity - SVG: Scalable Vector Graphics
g> usage notes value <alpha-value> initial value 1 animatable yes <alpha-value> a number or percentage indicating the opacity value to use across the current filter primitive subregion. a number of 0 or a percentage of 0% represents a fully transparent color, 1 or 100% represents a fully opaque color. specifications specification status comment filter effects module level 1the definition of 'flood-opacity' in that specification. working draft aligned the value to the css <alpha-value> value. scalable vector graphics (svg) 1.1 (second edition)the definition of 'flood-opacity' in that specification. recommendation initial definition ...
font-family - SVG: Scalable Vector Graphics
/svg> usage notes value [ <family-name> | <generic-family> ]#where <family-name> = <string> | <custom-ident>+<generic-family> = serif | sans-serif | cursive | fantasy | monospace default value depends on user agent animatable yes for a description of the values, please refer to the css font-family property. specifications specification status comment css fonts module level 4the definition of 'generic font families' in that specification. working draft adds new generic font families, specifically: system-ui, emoji, math, and fangsong. css fonts module level 3the definition of 'font-family' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1...
font-size-adjust - SVG: Scalable Vector Graphics
the specified number times the font-size. the number specified should generally be the aspect ratio (ratio of x-height to font size) of the first choice font-family. this means that the first-choice font, when available, will appear the same size in browsers, whether or not they support font-size-adjust. 0 yields text of zero height (hidden text). specifications specification status comment css fonts module level 3the definition of 'font-size-adjust' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size-adjust' in that specification. recommendation initial definition ...
font-size - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size' in that specification. recommendation initial definition ...
font-stretch - SVG: Scalable Vector Graphics
working draft adds the <percentage> syntax for variable fonts. css fonts module level 3the definition of 'font-stretch' in that specification. candidate recommendation initial definition of font-stretch in css fonts scalable vector graphics (svg) 1.1 (second editio...
font-style - SVG: Scalable Vector Graphics
.org/2000/svg"> <text y="20" font-style="normal">normal font style</text> <text x="150" y="20" font-style="italic">italic font style</text> </svg> usage notes value normal | italic | oblique default value normal animatable yes for a description of the values, please refer to the css font-style property. specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification. working draft no change css fonts module level 3the definition of 'font-style' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-style' in that specification. recommendation init...
font-variant - SVG: Scalable Vector Graphics
unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ] default value normal animatable yes for a description of the values, please refer to the css font-variant property. specifications specification status comment css fonts module level 4the definition of 'font-variant' in that specification. working draft no change css fonts module level 3the definition of 'font-variant' in that specification. candidate recommendation added many more keywords for different types of variations. scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-v...
font-weight - SVG: Scalable Vector Graphics
2000/svg"> <text y="20" font-weight="normal">normal text</text> <text x="100" y="20" font-weight="bold">bold text</text> </svg> usage notes value normal | bold | bolder | lighter | <number> default value normal animatable yes for a description of the values, please refer to the css font-weight property. specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification. working draft defines font-weight to accept any numbers between 1 and 1000. css fonts module level 3the definition of 'font-weight' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-w...
format - SVG: Scalable Vector Graphics
Web › SVG › Attribute › format
recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <altglyph>' in that specification. recommendation initial definition for <altglyph> ...
fr - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fr
candidate recommendation initial definition ...
from - SVG: Scalable Vector Graphics
Web › SVG › Attribute › from
freeze" from="100" to="150" dur="3s"/> </rect> </svg> usage notes value see below default value none animatable no the exact value type for this attribute depends on the value of the attribute that will be animated. when a list of values is defined via the values attribute, the from attribute is ignored. specifications specification status comment svg animations level 2the definition of 'from' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'from' in that specification. recommendation initial definition ...
fx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fx
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification. recommendation initial definition ...
fy - SVG: Scalable Vector Graphics
Web › SVG › Attribute › fy
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification. recommendation initial definition ...
g1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › g1
recommendation initial definition ...
g2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › g2
recommendation initial definition ...
glyph-name - SVG: Scalable Vector Graphics
r unicode character. the glyph names can be referenced in kerning definitions created by <hkern> and <vkern> elements. only one element is using this attribute: <glyph> context notes value <name># default value none animatable no <name># this value specifies a comma-separated list of names for the glyph. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-name' in that specification. recommendation initial definition ...
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
e is restricted to 0, 90, 180, and 270 degrees. if another angle is specified, it is rounded to the closest of the permitted values. a value of 0deg indicates that all glyphs are set with the top of the glyphs oriented towards the reference orientation. a value of 90deg indicates an orientation of 90 degrees clockwise from the reference orientation. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-horizontal' in that specification. recommendation initial definition ...
glyph-orientation-vertical - SVG: Scalable Vector Graphics
e is restricted to 0, 90, 180, and 270 degrees. if another angle is specified, it is rounded to the closest of the permitted values. a value of 0deg indicates that all glyphs are set with the top of the glyphs oriented towards the reference orientation. a value of 90deg indicates an orientation of 90 degrees clockwise from the reference orientation. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-vertical' in that specification. recommendation initial definition ...
glyphRef - SVG: Scalable Vector Graphics
entifier, the format of which is dependent on the format of the given font. two elements are using this attribute: <altglyph> and <glyphref> usage notes value <string> default value none animatable yes <string> this value represents the glyph identifier. its format depends on the format of the given font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref for <glyphref>' in that specification. recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'altglyph for <altglyph>' in that specification. recommendation initial definition for <altglyph> ...
gradientTransform - SVG: Scalable Vector Graphics
dient2)" style="transform: translatex(220px);" /> </svg> usage notes default value identity transform value <transform-list> animatable yes <transform-list> a list of transformation functions specifying some additional transformation from the gradient coordinate system onto the target coordinate system. specifications specification status comment css transforms level 1the definition of 'surfacescale for <fespecularlighting>' in that specification. working draft defines the <transformation-list> value. scalable vector graphics (svg) 2the definition of 'gradienttransformation for <lineargradient>' in that specification. candidate recommendation no change scalable vector graphics (svg) 2t...
gradientUnits - SVG: Scalable Vector Graphics
) is at the top/left of the object bounding box and (1,1) is at the bottom/right of the object bounding box). when the object's bounding box is not square, the rings that are conceptually circular within object bounding box space will render as elliptical due to application of the non-uniform scaling transformation from bounding box space to user space. specifications specification status comment scalable vector graphics (svg) 2the definition of 'gradientunits for <radialgradient>' in that specification. candidate recommendation no change scalable vector graphics (svg) 2the definition of 'gradientunits for <lineargradient>' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the ...
hanging - SVG: Scalable Vector Graphics
Web › SVG › Attribute › hanging
hanging baseline alignment for horizontally oriented glyph layouts. the value is an offset in the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'hanging' in that specification. recommendation initial definition ...
height - SVG: Scalable Vector Graphics
Web › SVG › Attribute › height
ty for <svg>. use for <use>, height defines the vertical length for the referenced element. value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, height is a geometry property meaning this attribute can also be used as a css property for used elements. specifications specification status comment filter effects module level 1the definition of 'height' in that specification. working draft definition for <filter> filter effects module level 1the definition of 'height' in that specification. working draft definition for filter primitives css masking module level 1the definition of 'height' in that specification. candidate recommendatio...
horiz-adv-x - SVG: Scalable Vector Graphics
vance of the glyph. glyph, missing-glyph for <glyph> and <missing-glyph> elements, horiz-adv-x specifies the horizontal advance of the glyph in horizontal orientation. value <number> default value <font>ʼs horiz-adv-x value animatable no <number> this value indicates the horizontal advance of the glyph. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <glyph> and <missing-glyph>' in that specification. recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <font>' in that specification. recommendation initial definition...
horiz-origin-x - SVG: Scalable Vector Graphics
ed when drawing horizontally oriented text. note: the origin applies to all glyphs in the font. only one element is using this attribute: <font> usage notes value <number> default value 0 animatable no <number> this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-x' in that specification. recommendation initial definition ...
horiz-origin-y - SVG: Scalable Vector Graphics
ed when drawing horizontally oriented text. note: the origin applies to all glyphs in the font. only one element is using this attribute: <font> usage notes value <number> default value 0 animatable no <number> this value indicates the x-coordinate of the origin of a glyph for horizontally oriented text. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-y' in that specification. recommendation initial definition ...
href - SVG: Scalable Vector Graphics
Web › SVG › Attribute › href
referring to an element or fragment within an svg document to be cloned. the <use> element can reference an entire svg document by specifying an href value without a fragment. such references are taken to be referring to the root element of the referenced document. value <url> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'href for <a>' in that specification. candidate recommendation defines href for the <a> element. svg animations level 2the definition of 'href for <animate>, <animatemotion>, <animatetransform>, and <set>' in that specification. editor's draft defines href for animation elements. svg animations...
id - SVG: Scalable Vector Graphics
Web › SVG › Attribute › id
a basic media fragment when used as a url target fragment. it must be valid in xml documents. a stand-alone svg document uses xml 1.0 syntax, which specifies that valid ids only include designated characters (letters, digits, and a few punctuation marks), and do not start with a digit, a full stop (.) character, or a hyphen-minus (-) character. specifications specification status comment scalable vector graphics (svg) 2the definition of 'id' in that specification. candidate recommendation defines the allowed values in more detail. scalable vector graphics (svg) 1.1 (second edition)the definition of 'id' in that specification. recommendation initial definition ...
ideographic - SVG: Scalable Vector Graphics
graphic baseline alignment for horizontally oriented glyph layouts. the value is an offset in the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ideographic' in that specification. recommendation initial definition ...
image-rendering - SVG: Scalable Vector Graphics
yes auto indicates that the user agent shall make appropriate tradeoffs to balance speed and quality, but quality shall be given more importance than speed. optimizespeed indicates that the user agent shall emphasize rendering speed over quality. optimizequality indicates that the user agent shall emphasize quality over rendering speed. specifications specification status comment css images module level 3the definition of 'image-rendering' in that specification. candidate recommendation definition in css scalable vector graphics (svg) 2the definition of 'image-rendering' in that specification. candidate recommendation no significant change, only added a reference to css images 3 scalable vector graphics (svg) 1.1 (seco...
in - SVG: Scalable Vector Graphics
Web › SVG › Attribute › in
<!-- this is a workaround. --> <feimage xlink:href="https://developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <feblend in2="sourcegraphic" mode="multiply"/> </filter> </defs> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#imagemultiply);"/> </svg> </div> result specifications specification status comment filter effects module level 1the definition of 'in' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'in' in that specification. recommendation initial definition ...
in2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › in2
used to displace the pixels in the image defined in the in attribute. value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primitive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes specifications specification status comment filter effects module level 1the definition of 'in2 for <fedisplacementmap>' in that specification. working draft no change filter effects module level 1the definition of 'in2 for <fecomposite>' in that specification. working draft no change filter effects module level 1the definition of 'in2 for <feblend>' in that specification. working dr...
intercept - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'intercept' in that specification. recommendation initial definition ...
k - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k
e value is in the font coordinate system. this attribute is required. two elements are using this attribute: <hkern> and <vkern> context notes value <number> default value none animatable no <number> this value indicates the amount for decreasing the spacing between the two glyphs in the kerning pair. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification. recommendation initial definition ...
k1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k1
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k1' in that specification. recommendation initial definition ...
k2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k2
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k2' in that specification. recommendation initial definition ...
k3 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k3
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k3' in that specification. recommendation initial definition ...
k4 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › k4
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k4' in that specification. recommendation initial definition ...
kernelMatrix - SVG: Scalable Vector Graphics
> the list of <number>s that make up the kernel matrix for the convolution. values are separated by space characters and/or a comma. the number of entries in the list must equal <orderx> times <ordery>. if the result of orderx * ordery is not equal to the the number of entries in the value list, the filter primitive acts as a pass through filter. specifications specification status comment filter effects module level 1the definition of 'kernelmatrix' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelmatrix' in that specification. recommendation initial definition ...
kernelUnitLength - SVG: Scalable Vector Graphics
ome cases as one pixel in the intermediate image offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable. if a negative or zero value is specified the default value will be used instead. value <number-optional-number> default value pixel in offscreen bitmap animatable yes specifications specification status comment filter effects module level 1the definition of 'kernelunitlength for <fespecularlighting>' in that specification. working draft marked the attribute as deprecated. filter effects module level 1the definition of 'kernelunitlength for <fediffuselighting>' in that specification. working draft marked the attribute as deprecated. filter effects mod...
keyPoints - SVG: Scalable Vector Graphics
there must be exactly as many values in the keypoints list as in the keytimes list. if there's a semicolon at the end of the value, optionally followed by white space, both the semicolon and the trailing white space are ignored. if there are any errors in the value specification (i.e. bad values, too many or too few values), then thatʼs an error. specifications specification status comment svg animations level 2the definition of 'keypoints' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keypoints' in that specification. recommendation initial definition ...
keySplines - SVG: Scalable Vector Graphics
ues: x1 y1 x2 y2, describing the bézier control points for one time segment. the keytimes values that define the associated segment are the bézier "anchor points", and the keysplines values are the control points. thus, there must be one fewer sets of control points than there are keytimes. the values of x1 y1 x2 y2 must all be in the range 0 to 1. specifications specification status comment svg animations level 2the definition of 'keysplines' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keysplines' in that specification. recommendation initial definition ...
keyTimes - SVG: Scalable Vector Graphics
st time value in the list must be 0. the time associated with each value defines when the value is set; the animation function uses that value until the next time defined in the list. if the calcmode attribute is set to paced, the keytimes attribute is ignored. if the duration of the animation is indefinite, any keytimes specification will be ignored. specifications specification status comment svg animations level 2the definition of 'keytimes' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keytimes' in that specification. recommendation initial definition ...
lang - SVG: Scalable Vector Graphics
Web › SVG › Attribute › lang
lue specifies the language used for the element. the syntax of this value is defined in the bcp 47 specification. the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g. en-us for us english or de-at for austrian german. specifications specification status comment scalable vector graphics (svg) 2the definition of 'lang' in that specification. candidate recommendation made the lang attribute (without namespace) available on all elements and defined the interaction between both. scalable vector graphics (svg) 1.1 (second edition)the definition of 'lang' in that specification. recommendation deprecated definition o...
lengthAdjust - SVG: Scalable Vector Graphics
0" textlength="100" lengthadjust="spacing"> shrunk using spacing only. </text> <text x="0" y="110" textlength="100" lengthadjust="spacingandglyphs"> shrunk using spacing and glyphs. </text> </g> </svg> usage notes value spacing | spacingandglyphs default value spacing animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'lengthadjust' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'lengthadjust' in that specification. recommendation initial definition ...
letter-spacing - SVG: Scalable Vector Graphics
xt x="200" y="20" letter-spacing="-0.5">smaller letter-spacing</text> </svg> usage notes value normal | <length> default value normal animatable yes for a description of the values, please refer to the css letter-spacing property. prior to firefox 72 firefox ignored letter-spacing and renders text without. specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification. working draft svg 2 just refers to the definition in css text 3. scalable vector graphics (svg) 1.1 (second edition)the definition of 'letter-spacing' in that specification. recommendation initial definition ...
lighting-color - SVG: Scalable Vector Graphics
working draft removed the <icccolor> value. scalable vector graphics (svg) 1.1 (second edition)the definition of 'lighting-color' in that specification. recommendation initial definition ...
limitingConeAngle - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'limitingconeangle' in that specification. recommendation initial definition ...
local - SVG: Scalable Vector Graphics
Web › SVG › Attribute › local
the resource identified by the xlink:href attribute is used. only one element is using this attribute: <color-profile> usage notes value <string> default value none animatable no <string> this value specifies the unique id for a locally stored color profile as specified by international color consortium. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'local' in that specification. recommendation initial definition ...
marker-end - SVG: Scalable Vector Graphics
age notes value none | <marker-ref> default value none animatable yes none indicates that no marker symbol shall be drawn at the final vertex. <marker-ref> this value is a reference to a <marker> element, which will be drawn at the final vertex. if the reference is not valid, then no marker will be drawn. specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-end' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-end' in that specification. recommendation initial definition ...
marker-mid - SVG: Scalable Vector Graphics
notes value none | <marker-ref> default value none animatable yes none indicates that no marker symbol shall be drawn at the given vertices. <marker-ref> this value is a reference to a <marker> element, which will be drawn at the given vertices. if the reference is not valid, then no marker will be drawn. specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-mid' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-mid' in that specification. recommendation initial definition ...
marker-start - SVG: Scalable Vector Graphics
age notes value none | <marker-ref> default value none animatable yes none indicates that no marker symbol shall be drawn at the first vertex. <marker-ref> this value is a reference to a <marker> element, which will be drawn at the first vertex. if the reference is not valid, then no marker will be drawn. specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-start' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-start' in that specification. recommendation initial definition ...
markerHeight - SVG: Scalable Vector Graphics
ue defines either an absolute or a relative height of the marker. relative values refer to the height specified via the viewbox and preserveaspectratio attributes. <number> this value defines the height of the marker in the units defined by the markerunits attribute. a value of zero disables rendering of the element and negative values are an error. specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerheight' in that specification. candidate recommendation allowed percentage and number values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerheight' in that specification. recommendation initial definition ...
markerUnits - SVG: Scalable Vector Graphics
marker-end property). strokewidth this value specifies that the markerwidth and markerunits attributes and the contents of the <marker> element represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the stroke-width attribute) in place for the graphic object referencing the marker. specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerunits' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerunits' in that specification. recommendation initial definition ...
markerWidth - SVG: Scalable Vector Graphics
value defines either an absolute or a relative width of the marker. relative values refer to the width specified via the viewbox and preserveaspectratio attributes. <number> this value defines the width of the marker in the units defined by the markerunits attribute. a value of zero disables rendering of the element and negative values are an error. specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerwidth' in that specification. candidate recommendation allowed percentage and number values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerwidth' in that specification. recommendation initial definition ...
mask - SVG: Scalable Vector Graphics
Web › SVG › Attribute › mask
candidate recommendation extends its usage to html elements. extends its syntax by making it a shorthand for the new mask-* properties defined in that specification. scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification. recommendation...
maskContentUnits - SVG: Scalable Vector Graphics
k> element refer to the user coordinate system as defined when the mask was created. objectboundingbox this value indicates that all coordinates inside the <mask> element are relative to the bounding box of the element the mask is applied to. a bounding box could be considered the same as if the content of the <mask> were bound to a "0 0 1 1" viewbox. specifications specification status comment css masking module level 1the definition of 'maskcontentunits' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskcontentunits' in that specification. recommendation initial definition ...
maskUnits - SVG: Scalable Vector Graphics
oordinate system as defined when the mask was created. objectboundingbox this value indicates that all coordinates for the geometry attributes represent fractions or percentages of the bounding box of the element to which the mask is applied. a bounding box could be considered the same as if the content of the <mask> were bound to a "0 0 1 1" viewbox. specifications specification status comment css masking module level 1the definition of 'maskunits' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskunits' in that specification. recommendation initial definition ...
mathematical - SVG: Scalable Vector Graphics
matical baseline alignment for horizontally oriented glyph layouts. the value is an offset in the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'mathematical' in that specification. recommendation initial definition ...
max - SVG: Scalable Vector Graphics
Web › SVG › Attribute › max
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'max' in that specification. recommendation initial definition ...
media - SVG: Scalable Vector Graphics
Web › SVG › Attribute › media
t> <rect y="20" width="200" height="200" /> </svg> usage notes value <media-query-list> default value all animatable yes <media-query-list> this value holds a media query that needs to match in order for the style sheet to be applied. if not specified, the style sheet is applied unconditionally. specifications specification status comment scalable vector graphics (svg) 2the definition of 'media' in that specification. candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query-list>. scalable vector graphics (svg) 1.1 (second edition)the definition of 'media' in that specification. recommendation initial definition ...
method - SVG: Scalable Vector Graphics
Web › SVG › Attribute › method
with connected characters (e.g. cursive fonts), the connections may not align properly when text is rendered along the path. stretch this value indicates that the character outlines will be converted into paths, and then stretched and possibly warped. with this approach, connected characters, such as in cursive fonts, will maintain their connections. specifications specification status comment scalable vector graphics (svg) 2the definition of 'method' in that specification. candidate recommendation described the stretch value in more detail. scalable vector graphics (svg) 1.1 (second edition)the definition of 'method' in that specification. recommendation initial definition ...
min - SVG: Scalable Vector Graphics
Web › SVG › Attribute › min
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'min' in that specification. recommendation initial definition ...
mode - SVG: Scalable Vector Graphics
Web › SVG › Attribute › mode
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'mode' in that specification. recommendation initial definition ...
name - SVG: Scalable Vector Graphics
Web › SVG › Attribute › name
face. value <name> default value none animatable yes <name> this value specifies the name of a local font. unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in this attribute is not surrounded in single or double quotes. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <font-face-name>' in that specification. recommendation initial definition for <font-face-name> scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <color-profile>' in that specification. recommendation initial definition for <color-profile> ...
numOctaves - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'numoctaves' in that specification. recommendation initial definition ...
onclick - SVG: Scalable Vector Graphics
Web › SVG › Attribute › onclick
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'onclick' in that specification. recommendation initial definition ...
opacity - SVG: Scalable Vector Graphics
Web › SVG › Attribute › opacity
0" fill="black" opacity="0.3" /> </svg> usage notes default value 1 value <alpha-value> animatable yes <alpha-value> the uniform opacity setting to be applied across an entire object, as a <number>. any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. specifications specification status comment css color module level 4the definition of 'opacity' in that specification. working draft defines in more detail what this attribute applies to. css color module level 3the definition of 'opacity' in that specification. recommendation defines in more detail what this attribute applies to. scalable vector graphics (svg) 2the definition of 'opaci...
operator - SVG: Scalable Vector Graphics
for <femorphology>, operator defines whether to erode (i.e., thin) or dilate (fatten) the source graphic. value erode | dilate default value erode animatable yes erode this value thins the source graphic defined in the in attribute. dilate this value fattens the source graphic defined in the in attribute. specifications specification status comment filter effects module level 1the definition of 'operator for <femorphology>' in that specification. working draft no change filter effects module level 1the definition of 'operator for <fecomposite>' in that specification. working draft refers to css compositing and blending specification for the values and added the lighter value. scalable ve...
order - SVG: Scalable Vector Graphics
Web › SVG › Attribute › order
ber of columns in the matrix. the second number, indicates the number of rows in the matrix. if no second number is not provided, it defaults to the first number. it is recommended that only small values (e.g., 3) be used; higher values may result in very high cpu overhead and usually do not produce results that justify the impact on performance. specifications specification status comment filter effects module level 1the definition of 'order' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'order' in that specification. recommendation initial definition ...
orient - SVG: Scalable Vector Graphics
Web › SVG › Attribute › orient
ive x-axis. note: for example, if a value of 45 is given, then the marker's positive x-axis would be pointing down and right in the shape's coordinate system. <number> this value indicates an angle in degrees. the marker is oriented such that the specified angle is that measured between the shape's positive x-axis and the marker's positive x-axis. specifications specification status comment scalable vector graphics (svg) 2the definition of 'orient' in that specification. candidate recommendation added the auto-start-reverse value and simplified the descriptions of the values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'orient' in that specification. recommendation initial definition ...
orientation - SVG: Scalable Vector Graphics
recommendation initial definition ...
origin - SVG: Scalable Vector Graphics
Web › SVG › Attribute › origin
the origin attribute specifies the origin of motion for an animation. it has no effect in svg. only one element is using this attribute: <animatemotion> context notes value default default value default animatable no specifications specification status comment svg animations level 2the definition of 'origin' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'origin' in that specification. recommendation initial definition (referring to smil animation specification) ...
overflow - SVG: Scalable Vector Graphics
lns="http://www.w3.org/2000/svg" overflow="auto"> <text y="20">this text is wider than the svg, so there should be a scrollbar shown.</text> </svg> usage notes value visible | hidden | scroll | auto default value visible animatable yes for a description of the values, please see the css overflow property. specifications specification status comment css level 2 (revision 1)the definition of 'overflow' in that specification. recommendation definition in css scalable vector graphics (svg) 2the definition of 'overflow' in that specification. candidate recommendation simplifies the definition and outlines the values within the user agent stylesheet. scalable vector graphics (svg) 1.1 (second ...
paint-order - SVG: Scalable Vector Graphics
candidate recommendation initial definition ...
panose-1 - SVG: Scalable Vector Graphics
recommendation initial definition ...
path - SVG: Scalable Vector Graphics
Web › SVG › Attribute › path
ecified in href is used instead. value <path-data> default value path specified in href animatable yes <path-data> this value defines the text path along which the glyphs of the <text> element are aligned. for detailed information about the commands that can be used, see the explanation for the d attribute. specifications specification status comment scalable vector graphics (svg) 2the definition of 'path for <textpath>' in that specification. candidate recommendation initial definition for <textpath> svg animations level 2the definition of 'path for <animatemotion>' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'path f...
pathLength - SVG: Scalable Vector Graphics
hlength lets authors specify a total length for the shape, in user units. value <number> default value none animatable yes rect for <rect>, pathlength lets authors specify a total length for the rectangle, in user units. value <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'pathlength' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pathlength' in that specification. recommendation initial definition ...
patternContentUnits - SVG: Scalable Vector Graphics
he pattern tile was created. objectboundingbox this value indicates that all coordinates inside the <pattern> element are relative to the bounding box of the element the pattern is applied to. a bounding box could be considered the same as if the content of the <pattern> were bound to a "0 0 1 1" viewbox for a pattern tile of width and height of 100%. specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterncontentunits' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterncontentunits' in that specification. recommendation initial definition ...
patternTransform - SVG: Scalable Vector Graphics
n isn't very good. for backward compatibility reason, it is highly suggested to keep using the patterntransform attribute. value <transform-list> default value identity transform animatable yes transform functions to know more about the definition of transform functions, see the transform attribute definition. specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterntransform' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterntransform' in that specification. recommendation initial definition ...
patternUnits - SVG: Scalable Vector Graphics
dinate system as defined when the pattern was applied. objectboundingbox this value indicates that all coordinates for the geometry properties represent fractions or percentages of the bounding box of the element to which the mask is applied. a bounding box could be considered the same as if the content of the <mask> were bound to a "0 0 1 1" viewbox. specifications specification status comment scalable vector graphics (svg) 2the definition of 'patternunits' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patternunits' in that specification. recommendation initial definition ...
pointer-events - SVG: Scalable Vector Graphics
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointer-events' in that specification. recommendation initial definition ...
points - SVG: Scalable Vector Graphics
Web › SVG › Attribute › points
to the first point. value [ <number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification. candidate recommendation definition for <polygon> scalable vector graphics (svg) 2the definition of 'points' in that specification. candidate recommendation definition for <polyline> scalable vector graphics (svg) 1.1 (second edition)the definition of 'points' in...
pointsAtX - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatx' in that specification. recommendation initial definition ...
pointsAtY - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsaty' in that specification. recommendation initial definition ...
pointsAtZ - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatz' in that specification. recommendation initial definition ...
preserveAlpha - SVG: Scalable Vector Graphics
alue true | false animatable yes true this value indicates that the convolution will only apply to the color channels. in this case, the filter will temporarily unpremultiply the color component values and apply the kernel. false this value indicates that the convolution will apply to all channels, including the alpha channel. specifications specification status comment filter effects module level 1the definition of 'preservealpha' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'preservealpha' in that specification. recommendation initial definition ...
preserveAspectRatio - SVG: Scalable Vector Graphics
viewport. value <align> <meetorslice>? default value xmidymid meet animatable yes view for <view>, preserveaspectratio indicates if a uniform scaling must be performed to fit the element viewport. value <align> <meetorslice>? default value xmidymid meet animatable yes specification specification status comment filter effects module level 1the definition of 'preserveaspectratio' in that specification. working draft scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification. ...
primitiveUnits - SVG: Scalable Vector Graphics
te system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute). objectboundingbox this value indicates that any length values within the filter definitions represent fractions or percentages of the bounding box on the referencing element. specifications specification status comment filter effects module level 1the definition of 'primitiveunits' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'primitiveunits' in that specification. recommendation initial definition ...
r - SVG: Scalable Vector Graphics
Web › SVG › Attribute › r
the gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this end circle. a value of lower or equal to zero will cause the area to be painted as a single color using the color and opacity of the last gradient <stop>. value <length> | <percentage> default value 50% animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'r' in that specification. candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'r' in that specification. candidate recommendation definition for svg2 paint servers <radialgradient> scalable vector graphics (svg) 1.1 (second edition)the d...
radius - SVG: Scalable Vector Graphics
Web › SVG › Attribute › radius
and y. the values are in the coordinate system established by the primitiveunits attribute on the <filter> element. a negative or zero value disables the effect of the given filter primitive (i.e., the result is the filter input image). usage notes value <number-optional-number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'radius' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'radius' in that specification. recommendation initial definition ...
refX - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refX
stem of the marker contents, after application of the viewbox and preserveaspectratio attributes. left the reference point of the marker is placed at the left edge of the shape. center the reference point of the marker is placed at the horizontal center of the shape. right the reference point of the marker is placed at the right edge of the shape. specifications specification status comment scalable vector graphics (svg) 2the definition of 'refx' in that specification. candidate recommendation added keywords left, center, and right. scalable vector graphics (svg) 2the definition of 'refx' in that specification. candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definiti...
refY - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refY
system of the marker contents, after application of the viewbox and preserveaspectratio attributes. top the reference point of the marker is placed at the top edge of the shape. center the reference point of the marker is placed at the vertical center of the shape. bottom the reference point of the marker is placed at the bottom edge of the shape. specifications specification status comment scalable vector graphics (svg) 2the definition of 'refy' in that specification. candidate recommendation added keywords left, center, and right. scalable vector graphics (svg) 2the definition of 'refy' in that specification. candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definiti...
rendering-intent - SVG: Scalable Vector Graphics
the gamut. saturation this value leaves colors that fall inside the gamut unchanged. this method usually converts out of gamut colors to colors that have the same lightness but fall just inside the gamut. absolute-colorimetric this value disables white point matching when converting colors. note: this option is generally not recommended. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'rendering-intent' in that specification. recommendation initial definition ...
repeatCount - SVG: Scalable Vector Graphics
animatable no <number> this value specifies the number of iterations. it can include partial iterations expressed as fraction values. a fractional value describes a portion of the simple duration. values must be greater than 0. indefinite this value indicates that the animation will be repeated indefinitely (i.e. until the document ends). specifications specification status comment svg animations level 2the definition of 'repeatcount' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeatcount' in that specification. recommendation initial definition ...
repeatDur - SVG: Scalable Vector Graphics
/svg> usage notes value <clock-value> | indefinite default values none animatable no <clock-value> this value specifies the duration in presentation time to repeat the animation. indefinite this value indicates that the animation will be repeated indefinitely (i.e. until the document ends). specifications specification status comment svg animations level 2the definition of 'repeatdur' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeatdur' in that specification. recommendation initial definition ...
requiredExtensions - SVG: Scalable Vector Graphics
ibute is not present, then it implicitly evaluates to "true". if a null string or empty string value is given, the attribute evaluates to "false". the iri names for the extension should include versioning information, such as "http://example.org/svgextensionxyz/1.0", so that script writers can distinguish between different versions of a given extension. specifications specification status comment scalable vector graphics (svg) 2the definition of 'requiredextensions' in that specification. candidate recommendation iris replaced with urls scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredextensions' in that specification. recommendation initial definition ...
requiredFeatures - SVG: Scalable Vector Graphics
recommendation initial definition ...
restart - SVG: Scalable Vector Graphics
Web › SVG › Attribute › restart
the animation can be restarted at any time. whennotactive this value indicates that the animation can only be restarted when it is not active (i.e. after the active end). attempts to restart the animation during its active duration are ignored. never this value indicates that the animation cannot be restarted for the time the document is loaded. specifications specification status comment svg animations level 2the definition of 'restart' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'restart' in that specification. recommendation initial definition ...
result - SVG: Scalable Vector Graphics
Web › SVG › Attribute › result
stom-ident> and defines the name for the filter primitive. it is only meaningful within a given <filter> element and thus has only local scope. it is legal for the same <filter-primitive-reference> to appear multiple times within the same <filter> element. when referenced, this value will use the closest preceding filter primitive with the given result. specifications specification status comment filter effects module level 1the definition of 'result' in that specification. working draft clarifies that the value is a <custom-ident>. scalable vector graphics (svg) 1.1 (second edition)the definition of 'result' in that specification. recommendation initial definition ...
rotate - SVG: Scalable Vector Graphics
Web › SVG › Attribute › rotate
editor's draft initial definition ...
rx - SVG: Scalable Vector Graphics
Web › SVG › Attribute › rx
f of the width of the rectangle, then the browser will consider the value for rx as half of the width of the rectangle. value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, rx is a geometry property meaning this attribute can also be used as a css property for rects. specifications specification status comment scalable vector graphics (svg) 2the definition of 'rx' in that specification. candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'rx' in that specification. recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definiti...
ry - SVG: Scalable Vector Graphics
Web › SVG › Attribute › ry
f of the width of the rectangle, then the browser will consider the value for ry as half of the width of the rectangle. value <length> | <percentage> | auto default value auto animatable yes note: starting with svg2, ry is a geometry property meaning this attribute can also be used as a css property for rects. specifications specification status comment scalable vector graphics (svg) 2the definition of 'ry' in that specification. candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'ry' in that specification. recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definiti...
scale - SVG: Scalable Vector Graphics
Web › SVG › Attribute › scale
tyle="filter: url(#displacementfilter2); transform: translatex(240px);""/> </svg> usage notes value <number> default value none animatable yes <number> this value defines the scale factor for the displacement. when the value of this attribute is 0, this operation has no effect on the source image. specifications specification status comment filter effects module level 1the definition of 'scale' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'scale' in that specification. recommendation initial definition ...
seed - SVG: Scalable Vector Graphics
Web › SVG › Attribute › seed
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification. recommendation initial definition ...
shape-rendering - SVG: Scalable Vector Graphics
r agent might turn off anti-aliasing for all lines and curves or possibly just for straight lines which are close to vertical or horizontal. also, the user agent might adjust line positions and line widths to align edges with device pixels. geometricprecision indicates that the user agent shall emphasize geometric precision over speed and crisp edges. specifications specification status comment scalable vector graphics (svg) 2the definition of 'shape-rendering' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'shape-rendering' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from...
side - SVG: Scalable Vector Graphics
Web › SVG › Attribute › side
candidate recommendation initial definition ...
slope - SVG: Scalable Vector Graphics
Web › SVG › Attribute › slope
the slope attribute indicates the vertical stroke angle of a font. only one element is using this attribute: <font-face> usage notes value <number> default value 0 animatable no <number> this value indicates the vertical stroke angle of the font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'slope' in that specification. recommendation initial definition ...
spacing - SVG: Scalable Vector Graphics
Web › SVG › Attribute › spacing
is value indicates that the user agent should use text-on-a-path layout algorithms to adjust the spacing between typographic characters in order to achieve visually appealing results. exact this value indicates that the typographic characters should be rendered exactly according to the spacing rules as specified by the layout rules for text-on-a-path. specifications specification status comment scalable vector graphics (svg) 2the definition of 'spacing' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'spacing' in that specification. recommendation initial definition ...
specularConstant - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularconstant' in that specification. recommendation initial definition ...
specularExponent - SVG: Scalable Vector Graphics
xponent defines the exponent value for the specular term. value <number> default value 1 animatable yes fespotlight for <fespotlight>, specularexponent defines the exponent value controlling the focus for the light source. value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularexponent for <fespecularlighting>' in that specification. working draft no change filter effects module level 1the definition of 'specularexponent for <fespotlight>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specul...
spreadMethod - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vector graphics (svg) 2the definition of 'spreadmethod for <lineargradient>' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the de...
startOffset - SVG: Scalable Vector Graphics
entage distance along the entire path. thus, 0% indicates the start point of the path and 100% indicates the end point of the path. <number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element. note: negative values and values larger than the path length (e.g. 150%) are allowed. specifications specification status comment scalable vector graphics (svg) 2the definition of 'startoffset' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'startoffset' in that specification. recommendation initial definition ...
stdDeviation - SVG: Scalable Vector Graphics
is. if one number is provided, then that value is used for both x and y. a negative value is forbidden. a value of zero disables the effect of the given filter primitive (i.e., the result is the filter input image). if stddeviation is 0 in only one of x or y, then the effect is that the blur is only applied in the direction that has a non-zero value. specifications specification status comment filter effects module level 1the definition of 'stddeviation' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stddeviation' in that specification. recommendation initial definition ...
stemh - SVG: Scalable Vector Graphics
Web › SVG › Attribute › stemh
or by error, all stems may have slightly different widths. if this attribute is used, the units-per-em must also be used. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the horizontal stem width of the font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemh' in that specification. recommendation initial definition ...
stemv - SVG: Scalable Vector Graphics
Web › SVG › Attribute › stemv
, and one lighter weight one as for an uppercase "m" or "n"). if this attribute is used, the units-per-em must also be used. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the vertical stem width of the font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemv' in that specification. recommendation initial definition ...
stitchTiles - SVG: Scalable Vector Graphics
ill show clear discontinuities at the tile borders. stitch this value indicates that the user agent will automatically adjust the x and y values of the base frequency such that the <feturbulence> node’s width and height (i.e., the width and height of the current subregion) contain an integral number of the tile width and height for the first octave. specifications specification status comment filter effects module level 1the definition of 'stitchtiles' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stitchtiles' in that specification. recommendation initial definition ...
stop-color - SVG: Scalable Vector Graphics
color> <icccolor> default value black animatable yes currentcolor this keyword denotes the current fill color and can be specified in the same manner as within a <paint> specification for the fill and stroke attributes. <color> this value indicates a color value. <icccolor> this value refers to an icc color profile. specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-color' in that specification. candidate recommendation added a note that in svg the transparent keyword is treated differently than in css. scalable vector graphics (svg) 1.1 (second edition)the definition of 'stop-color' in that specification. recommendation initial definition ...
stop-opacity - SVG: Scalable Vector Graphics
ion attribute, it can be applied to any element but it has effect only on the following element: <stop> usage notes value <opacity-value> default value 1 animatable yes <opacity-value> this value is either a <number> between 0 and 1 or a <percentage> value specifying the opacity of the color gradient stop. specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-opacity' in that specification. candidate recommendation refers to the definition in css colors 3, but allows percentage values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'stop-opacity' in that specification. recommendation initial definition ...
string - SVG: Scalable Vector Graphics
Web › SVG › Attribute › string
recommendation initial definition ...
stroke-dasharray - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dasharray' in that specification. recommendation initial definition for shapes and texts ...
stroke-dashoffset - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dashoffset' in that specification. recommendation initial definition for shapes and texts ...
stroke-linecap - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linecap' in that specification. recommendation initial definition for shapes and texts ...
stroke-linejoin - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linejoin' in that specification. recommendation initial definition for shapes and texts ...
stroke-miterlimit - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-miterlimit' in that specification. recommendation initial definition for shapes and texts ...
stroke-opacity - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-opacity' in that specification. recommendation initial definition for shapes and texts ...
stroke-width - SVG: Scalable Vector Graphics
candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-width' in that specification. recommendation initial definition for shapes and texts ...
stroke - SVG: Scalable Vector Graphics
Web › SVG › Attribute › stroke
candidate recommendation definition for shapes and texts. adds context-fill and context-stroke. scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke' in that specification. recommendation initial definition for shapes and texts browser c...
style - SVG: Scalable Vector Graphics
Web › SVG › Attribute › style
table no <style> the syntax of style data depends on the style sheet language. by default, the style sheet language is css. note: in theory, the contentstyletype attribute could be used to specify styling languages other than css, like xsl(t). however, this was never implemented satisfactorily in browsers, so you should not rely on it. specifications specification status comment scalable vector graphics (svg) 2the definition of 'style' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'style' in that specification. recommendation initial definition ...
surfaceScale - SVG: Scalable Vector Graphics
arlighting for <fespecularlighting>, surfacescale defines the height of the surface. value <number> default value 1 animatable yes fediffuselighting for <fediffuselighting>, surfacescale defines the height of the surface. value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'surfacescale for <fediffuselighting>' in that specification. working draft no change filter effects module level 1the definition of 'surfacescale for <fespecularlighting>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'surfaces...
systemLanguage - SVG: Scalable Vector Graphics
ent within the object on which the systemlanguage test attribute is placed, this does not mean that it is intended for multiple linguistic audiences. an example would be a beginner's language primer, such as "a first lesson in latin," which is clearly intended to be used by an english-literate audience. in this case, the attribute should only include en. specifications specification status comment scalable vector graphics (svg) 2the definition of 'systemlanguage' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'systemlanguage' in that specification. recommendation initial definition ...
tabindex - SVG: Scalable Vector Graphics
candidate recommendation initial definition ...
tableValues - SVG: Scalable Vector Graphics
default value empty list resulting in identity transfer animatable yes <list-of-numbers> this value holds a comma- and/or space-separated list of <number>s, which define a lookup table for the color component transfer function. each number can be between 0 and 1. an empty list results in an identity transfer function. specifications specification status comment filter effects module level 1the definition of 'tablevalues' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'tablevalues' in that specification. recommendation initial definition ...
target - SVG: Scalable Vector Graphics
Web › SVG › Attribute › target
ecurely accessed from this document, it is re-used, replacing the existing content. if it does not exist, it is created (the same as '_blank', except that it now has a name). the name must be a valid xml name [xml11], and should not start with an underscore (u+005f low line character), to meet the requirements of a valid browsing context name from html. specifications specification status comment scalable vector graphics (svg) 2the definition of 'target' in that specification. candidate recommendation removed the _replace value. scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification. recommendation initial definition ...
targetX - SVG: Scalable Vector Graphics
Web › SVG › Attribute › targetX
<= targetx < orderx. only one element is using this attribute: <feconvolvematrix> usage notes value <integer> default value floor(orderx / 2) animatable yes <integer> this value indicates the positioning in horizontal direction of the convolution matrix relative to a given target pixel in the input image. specifications specification status comment filter effects module level 1the definition of 'targetx' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targetx' in that specification. recommendation initial definition ...
targetY - SVG: Scalable Vector Graphics
Web › SVG › Attribute › targetY
0 <= targety < ordery. only one element is using this attribute: <feconvolvematrix> usage notes value <integer> default value floor(ordery / 2) animatable yes <integer> this value indicates the positioning in vertical direction of the convolution matrix relative to a given target pixel in the input image. specifications specification status comment filter effects module level 1the definition of 'targety' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targety' in that specification. recommendation initial definition ...
text-anchor - SVG: Scalable Vector Graphics
he text is rendered at the initial text position. for an element with a direction property value of rtl (typical for arabic and hebrew), the left side of the text is rendered at the initial text position. for an element with a vertical primary text direction (often typical for asian text), the bottom of the text is rendered at the initial text position. specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-anchor' in that specification. candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-anchor' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated ...
text-decoration - SVG: Scalable Vector Graphics
"40" text-decoration="line-through">struck-through text</text> </svg> usage notes value <'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> default value see individual properties animatable yes for a description of the values, please refer to the css text-decoration property. specifications specification status comment css text decoration module level 3the definition of 'text-decoration' in that specification. candidate recommendation defines the property as a shorthand for text-decoration-line, text-decoration-style, and text-decoration-color. scalable vector graphics (svg) 2the definition of 'text-decoration' in that specification. candidate recommendation mainly r...
text-rendering - SVG: Scalable Vector Graphics
ng or both to produce the most legible text. geometricprecision this value indicates that the user agent shall emphasize geometric precision over legibility and rendering speed. this option will usually cause the user agent to suspend the use of hinting so that glyph outlines are drawn with comparable geometric precision to the rendering of path data. specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification. candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from s...
textLength - SVG: Scalable Vector Graphics
h to get its baseval property; textlength is stored as an svglength object, so we can't treat it like a plain number. after updating the text width, the contents of the widthdisplay box are updated with the new value as well, and we're finished. result here's what the example looks like. try dragging the slider around to get a feel for what it does. specifications specification status comment scalable vector graphics (svg) 2the definition of 'textlength' in that specification. candidate recommendation allowed percentages and numbers as values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'textlength' in that specification. recommendation initial definition ...
to - SVG: Scalable Vector Graphics
Web › SVG › Attribute › to
ined via the values attribute, the to attribute is ignored. set for the <set> element, to specifies the value for the attribute during the duration of the element. value <value> default value none animatable no the exact value type for this attribute depend on the value of the attribute that will be animated. specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification. editor's draft no change svg animations level 2the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'to for <...
transform-origin - SVG: Scalable Vector Graphics
be a <length>, a <percentage>, or one of the keywords left, center, and right. the other value must be a <length>, a <percentage>, or one of the keywords top, center, and bottom. three-value syntax: the first two values are the same as for the two-value syntax. the third value must be a <length>. it always represents the z offset. specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification. working draft scalable vector graphics (svg) 2the definition of 'transform-origin' in that specification. candidate recommendation ...
transform - SVG: Scalable Vector Graphics
skewy the skewy(<a>) transform function specifies a skew transformation along the y axis by a degrees. example html,body,svg { height:100% } <svg viewbox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"> <rect x="-3" y="-3" width="6" height="6" /> <rect x="-3" y="-3" width="6" height="6" fill="red" transform="skewy(30)" /> </svg> specification specification status comment css transforms level 2the definition of 'transform' in that specification. editor's draft css transforms level 1the definition of 'transform' in that specification. working draft scalable vector graphics (svg) 2the definition of 'transform' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (se...
u1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › u1
recommendation initial definition ...
u2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › u2
recommendation initial definition ...
unicode-bidi - SVG: Scalable Vector Graphics
it has effect only on the following eleven elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> context notes value normal | embed | isolate | bidi-override | isolate-override | plaintext default value normal animatable no for a description of the values, please refer to the css unicode-bidi property. specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that specification. proposed recommendation svg 2 only refers to css writing modes. introduced isolate, isolate-override, and plaintext keywords. scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-bidi' in that specification. recommendation initial defini...
unicode-range - SVG: Scalable Vector Graphics
the range of iso 10646 characters possibly covered by the glyphs in a font. only one element is using this attribute: <font-face> usage notes value <urange># default value none animatable no <urange># this value is a comma-separated list of iso 10646 characters possibly covered by the glyphs in the font. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-range' in that specification. recommendation initial definition ...
unicode - SVG: Scalable Vector Graphics
Web › SVG › Attribute › unicode
s not provided for a given <glyph>, then the only way to use this glyph is via an <altglyph> reference. only one element is using this attribute: <glyph> context notes value <string> default value none animatable no <string> this value specifies one or more unicode characters corresponding to a glyph. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode' in that specification. recommendation initial definition ...
units-per-em - SVG: Scalable Vector Graphics
s value is almost always necessary as nearly every other attribute requires the definition of a design grid. only one element is using this attribute: <font-face> usage notes value <number> default value 1000 animatable no <number> this value indicates the the number of coordinate units on the em square. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'units-per-em' in that specification. recommendation initial definition ...
v-alphabetic - SVG: Scalable Vector Graphics
indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment. the value is an offset in the font coordinate system relative to the glyph-specific vert-origin-x attribute. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification. recommendation initial definition ...
v-hanging - SVG: Scalable Vector Graphics
the font coordinate system relative to the glyph-specific vert-origin-x attribute. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs to achieve hanging baseline alignment. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification. recommendation initial definition ...
v-ideographic - SVG: Scalable Vector Graphics
yph layouts. the value is an offset in the font coordinate system relative to the glyph-specific vert-origin-x attribute. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification. recommendation initial definition ...
v-mathematical - SVG: Scalable Vector Graphics
yph layouts. the value is an offset in the font coordinate system relative to the glyph-specific vert-origin-x attribute. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification. recommendation initial definition ...
values - SVG: Scalable Vector Graphics
Web › SVG › Attribute › values
tribute: for type="matrix", values is a list of 20 matrix values (a00 a01 a02 a03 a04 a10 a11 ... a34), separated by whitespace and/or a comma. for type="saturate", values is a single real number value (0 to 1). for type="huerotate", values is a single one real number value (degrees). for type="luminancetoalpha", values is not applicable. specifications specification status comment filter effects module level 1the definition of 'values for <fecolormatrix>' in that specification. working draft no change svg animations level 2the definition of 'values for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the...
vector-effect - SVG: Scalable Vector Graphics
candidate recommendation initial definition ...
version - SVG: Scalable Vector Graphics
Web › SVG › Attribute › version
dering or processing. while it is specified to accept any number, the only two valid choices are currently 1.0 and 1.1. <svg version="1.1" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="80" height="80"/> </svg> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'version' in that specification. recommendation initial definition ...
vert-adv-y - SVG: Scalable Vector Graphics
rection glyph, missing-glyph for <glyph> and <missing-glyph> elements, vert-adv-y specifies the vertical advance for a glyph in vertical orientation. value <number> default value <font>ʼs vert-adv-y value animatable no <number> this value indicates the vertical advance of the glyph in vertical direction specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <glyph> and <missing-glyph>' in that specification. recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <font>' in that specification. recommendation initial definition f...
vert-origin-x - SVG: Scalable Vector Graphics
of the origin of a glyph to be used when drawing vertically oriented text. only one element is using this attribute: <font> usage notes value <number> default value half of horiz-adv-x value animatable no <number> this value indicates the x-coordinate of the origin of a glyph for vertically oriented text. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-x' in that specification. recommendation initial definition ...
vert-origin-y - SVG: Scalable Vector Graphics
inate system of the origin of a glyph to be used when drawing vertically oriented text. only one element is using this attribute: <font> usage notes value <number> default value ascent value animatable no <number> this value indicates the y-coordinate of the origin of a glyph for vertically oriented text. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-y' in that specification. recommendation initial definition ...
viewBox - SVG: Scalable Vector Graphics
Web › SVG › Attribute › viewBox
ement. value <number>?, <number>?, <number>?, <number> default value none animatable yes view for <view>, viewbox defines the position and dimension for the content of the <view> element. value <number>?, <number>?, <number>?, <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'viewbox' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewbox' in that specification. recommendation initial definition ...
viewTarget - SVG: Scalable Vector Graphics
the viewtarget attribute indicates the target object associated with the view. only one element is using this attribute: <view> usage notes value <xml-name> default value none animatable no <xml-name> this value specifies the name of the object associated with the view. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewtarget' in that specification. recommendation initial definition ...
visibility - SVG: Scalable Vector Graphics
recommendation css definition of the property scalable vector graphics (svg) 2the definition of 'visibility' in that specification. candidate recommendation mainly refers to css 2.1 scalable vector graphics (svg) 1.1 (second edition)the definition of 'visibility' in ...
width - SVG: Scalable Vector Graphics
Web › SVG › Attribute › width
ty for <svg>. use for <use>, width defines the horizontal length for the referenced element. value auto | <length> | <percentage> default value auto (treated as 0) animatable yes note: starting with svg2, width is a geometry property meaning this attribute can also be used as a css property for used elements. specifications specification status comment filter effects module level 1the definition of 'width' in that specification. working draft definition for <filter> filter effects module level 1the definition of 'width' in that specification. working draft definition for filter primitives css masking module level 1the definition of 'width' in that specification. candidate recommendation ...
widths - SVG: Scalable Vector Graphics
Web › SVG › Attribute › widths
or more glyph widths. if this attribute is used, the units-per-em attribute must also be used. if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs. if not enough glyph widths are given, the last in the list is replicated to cover that range. if too many widths are provided, the extras are ignored. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'widths' in that specification. recommendation initial definition ...
word-spacing - SVG: Scalable Vector Graphics
"0" y="40" word-spacing="-0.5">smaller spacing between words</text> </svg> usage notes value normal | <length> animatable yes default values normal for a description of the values, please refer to the css letter-spacing property. prior to firefox 72 firefox ignored word-spacing and renders text without. specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification. working draft svg 2 just refers to the definition in css text 3. scalable vector graphics (svg) 1.1 (second edition)the definition of 'word-spacing' in that specification. recommendation initial definition ...
writing-mode - SVG: Scalable Vector Graphics
bottom block flow direction. both the writing mode and the typographic mode are horizontal. vertical-rl this value defines a right-to-left block flow direction. both the writing mode and the typographic mode are vertical. vertical-lr this value defines a left-to-right block flow direction. both the writing mode and the typographic mode are vertical. specifications specification status comment css writing modes module level 3the definition of 'writing-mode' in that specification. proposed recommendation definition in css writing modes 3 scalable vector graphics (svg) 2the definition of 'writing-mode' in that specification. candidate recommendation mainly refers to the definition in css writing modes 3 and defines a mapping between the deprec...
x-height - SVG: Scalable Vector Graphics
the x-height attribute indicates the height of lowercase glyphs in the font within the font coordinate system. only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the height of lowercase glyphs. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'x-height' in that specification. recommendation initial definition ...
x - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x
stroke-dasharray: 2px; } use for <use>, x defines the x coordinate of the uper left corner of the referenced element. value <length> | <percentage> default value 0 animatable yes note: starting with svg2, x is a geometry property meaning this attribute can also be used as a css property for used elements. specifications specification status comment filter effects module level 1the definition of 'x' in that specification. working draft definition for <filter> filter effects module level 1the definition of 'x' in that specification. working draft definition for <fespotlight> filter effects module level 1the definition of 'x' in that specification. working draft definition for <fepoin...
x1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x1
candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x1' in that specification. candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x1' in that spe...
x2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › x2
candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x2' in that specification. candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x2' in that spe...
xChannelSelector - SVG: Scalable Vector Graphics
x-axis. b this keyword specifies that the blue color channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the x-axis. a this keyword specifies that the alpha channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the x-axis. specifications specification status comment filter effects module level 1the definition of 'xchannelselector' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'xchannelselector' in that specification. recommendation initial definition ...
xlink:arcrole - SVG: Scalable Vector Graphics
recommendation initial definition ...
xlink:href - SVG: Scalable Vector Graphics
on of the referenced object. value <iri> default value none animatable yes tref for <tref>, xlink:href defines a reference to an element whose character data content shall be used as character data for this <tref> element. value <iri> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <a>' in that specification. recommendation defines href for the <a> element. scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <altglyph>' in that specification. recommendation defines href for the <altglyph> element. scalable vector gra...
xlink:show - SVG: Scalable Vector Graphics
linking to the resource it will be loaded and shown within the document. this is similar to the effect achieved by an html <img> element. other this value indicates that other markup present in the link, i.e. the target attribute, determines its behavior. none this value specifies that there is no indication for how to refer to the linked resource. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:show' in that specification. recommendation initial definition ...
xlink:title - SVG: Scalable Vector Graphics
lter>, <font-face-uri>, <glyphref>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, <tref>, and <use> usage context value <anything> default value none animatable no <anything> this value specifies the title used to describe the meaning of the link or resource. specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification. candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification. recommend...
xlink:type - SVG: Scalable Vector Graphics
recommendation initial definition ...
xml:base - SVG: Scalable Vector Graphics
the xml:base attribute specifies a base iri other than the base iri of the document or external entity. all elements are using this attribute. usage notes value <iri> default value none animatable no <iri> this value specifies the base iri of the element. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:base' in that specification. recommendation initial definition ...
xml:lang - SVG: Scalable Vector Graphics
lue specifies the language used for the element. the syntax of this value is defined in the bcp 47 specification. the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g. en-us for us english or de-at for austrian german. specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:lang' in that specification. candidate recommendation made the lang attribute (without namespace) available on all elements and defined the interaction between both. scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:lang' in that specification. recommendation initial definit...
xml:space - SVG: Scalable Vector Graphics
preserve this value tells the user agent to convert all newline and tab characters into spaces. then, it draws all space characters (including leading, trailing and multiple consecutive space characters). for example, the string "a b" (three spaces between "a" and "b") separates "a" and "b" more than "a b" (one space between "a" and "b"). specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:space' in that specification. candidate recommendation deprecates the attribute and suggests to use white-space instead. scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:space' in that specification. recommendation initial definition ...
y - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y
stroke-dasharray: 2px; } use for <use>, y defines the y coordinate of the uper left corner of the referenced element. value <length> | <percentage> default value 0 animatable yes note: starting with svg2, y is a geometry property meaning this attribute can also be used as a css property for used elements. specifications specification status comment filter effects module level 1the definition of 'y' in that specification. working draft definition for <filter> filter effects module level 1the definition of 'y' in that specification. working draft definition for <fespotlight> filter effects module level 1the definition of 'y' in that specification. working draft definition for <fepoin...
y1 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y1
or start at the bottom left corner of the bounding box of the shape it is applied to. --> <lineargradient y1="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y1' in that specification. candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y1' in that specification. candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y1' in that spe...
y2 - SVG: Scalable Vector Graphics
Web › SVG › Attribute › y2
tor end at the bottom right corner of the bounding box of the shape it is applied to. --> <lineargradient y2="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y2' in that specification. candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y2' in that specification. candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y2' in that spe...
yChannelSelector - SVG: Scalable Vector Graphics
y-axis. b this keyword specifies that the blue color channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the y-axis. a this keyword specifies that the alpha channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the y-axis. specifications specification status comment filter effects module level 1the definition of 'ychannelselector' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'ychannelselector' in that specification. recommendation initial definition ...
z - SVG: Scalable Vector Graphics
Web › SVG › Attribute › z
value <number> default value 1 animatable yes fespotlight for <fespotlight>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits attribute on the <filter> element. value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'z for <fepointlight>' in that specification. working draft no change filter effects module level 1the definition of 'z for <fespotlight>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'z for <fepointlight>' in that specificatio...
zoomAndPan - SVG: Scalable Vector Graphics
recommendation initial definition ...
Compatibility sources - SVG: Scalable Vector Graphics
the following sources are used for the compatibility tables on svg elements and attributes: https://developer.mozilla.org/en/svg_in_firefox together with its revision history for firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for webkit, safari and chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for opera >= 9, http://www.opera.com/docs/specs/opera8/ for opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on ie9 support status the svg support charts at codedread.com for basic checks against the w3c test suite wikipedia for basic hints, not normative ...
<a> - SVG: Scalable Vector Graphics
Web › SVG › Element › a
candidate recommendation replaced xlink:href attribute by href scalable vector graphics (svg) 1.1 (second edition)the definition of '<a>' in that specification. recommendation initial definition ...
<altGlyph> - SVG: Scalable Vector Graphics
Web › SVG › Element › altGlyph
recommendation initial definition ...
<altGlyphDef> - SVG: Scalable Vector Graphics
defines a substitution representation for glyphs. usage context categoriestext content elementpermitted contenteither: one or more <glyphref> elements, or one or more <altglyphitem> elements attributes global attributes core attributes specific attributes none dom interface this element implements the svgaltglyphdefelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphdef>' in that specification. recommendation initial definition ...
<altGlyphItem> - SVG: Scalable Vector Graphics
lyphitem> element provides a set of candidates for glyph substitution by the <altglyph> element. usage context categoriestext content elementpermitted contentone or more <glyphref> elements example attributes global attributes core attributes specific attributes none dom interface this element implements the svgaltglyphitemelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphitem>' in that specification. recommendation initial definition ...
<animate> - SVG: Scalable Vector Graphics
Web › SVG › Element › animate
essed a preference for no animated experiences. designing safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 specifications specification status comment svg animations level 2the definition of '<animate>' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animate>' in that specification. recommendation initial definition ...
<animateColor> - SVG: Scalable Vector Graphics
rom to dom interface this element implements the svganimatecolorelement interface. example svg <svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="60" r="50"> <animatecolor attributename="fill" attributetype="xml" from="black" to="red" dur="6s" repeatcount="indefinite"/> </circle> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatecolor>' in that specification. recommendation initial definition ...
<animateMotion> - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatemotion>' in that specification. recommendation initial definition ...
<animateTransform> - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatetransform>' in that specification. recommendation initial definition ...
<circle> - SVG: Scalable Vector Graphics
Web › SVG › Element › circle
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<circle>' in that specification. recommendation initial definition ...
<clipPath> - SVG: Scalable Vector Graphics
Web › SVG › Element › clipPath
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<clippath>' in that specification. recommendation initial definition ...
<color-profile> - SVG: Scalable Vector Graphics
ed for the image. usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes core attributes » xlink attributes » specific attributes local name rendering-intent xlink:href dom interface this element implements the svgcolorprofileelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<color-profile>' in that specification. recommendation initial definition ...
<cursor> - SVG: Scalable Vector Graphics
Web › SVG › Element › cursor
candidate recommendation replaced xlink:href by href attribute. scalable vector graphics (svg) 1.1 (second edition)the definition of '<cursor>' in that specification. recommendation initial definition ...
<defs> - SVG: Scalable Vector Graphics
Web › SVG › Element › defs
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<defs>' in that specification. recommendation initial definition ...
<desc> - SVG: Scalable Vector Graphics
Web › SVG › Element › desc
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<desc>' in that specification. recommendation initial definition ...
<discard> - SVG: Scalable Vector Graphics
Web › SVG › Element › discard
imate> element may. usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that specification. editor's draft initial definition ...
<ellipse> - SVG: Scalable Vector Graphics
Web › SVG › Element › ellipse
candidate recommendation added auto value for rx and ry scalable vector graphics (svg) 1.1 (second edition)the definition of '<ellipse>' in that specification. recommendation initial definition ...
<feBlend> - SVG: Scalable Vector Graphics
Web › SVG › Element › feBlend
working draft outsourced blend modes to compositing and blending level 1 scalable vector graphics (svg) 1.1 (second edition)the definition of '<feblend>' in that specification. recommendation initial definition ...
<feColorMatrix> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecolormatrix>' in that specification. recommendation initial definition ...
<feComponentTransfer> - SVG: Scalable Vector Graphics
working draft specified that missing transfer function elements are treated like they were specified with their type attributes set to identity. scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecomponenttransfer>' in that specification. re...
<feComposite> - SVG: Scalable Vector Graphics
working draft added lighter value for operator attribute. scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecomposite>' in that specification. recommendation initial definition ...
<feConvolveMatrix> - SVG: Scalable Vector Graphics
working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<feconvolvematrix>' in that specification. recommendation initial definition ...
<feDiffuseLighting> - SVG: Scalable Vector Graphics
working draft deprecated kernelunitlength attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<fediffuselighting>' in that specification. recommendation initial definition ...
<feDisplacementMap> - SVG: Scalable Vector Graphics
working draft no changes scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedisplacementmap>' in that specification. recommendation initial definition ...
<feDistantLight> - SVG: Scalable Vector Graphics
tive: <fediffuselighting> or <fespecularlighting>. usage context categorieslight source elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes specific attributes azimuth elevation dom interface this element implements the svgfedistantlightelement interface. specifications specification status comment filter effects module level 1the definition of '<fedistantlight>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedistantlight>' in that specification. recommendation initial definition ...
<feDropShadow> - SVG: Scalable Vector Graphics
working draft initial definition ...
<feFlood> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFlood
rface. example html content <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> <defs> <filter id="floodfilter" filterunits="userspaceonuse"> <feflood x="50" y="50" width="100" height="100" flood-color="green" flood-opacity="0.5"/> </filter> </defs> <use style="filter: url(#floodfilter);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feflood>' in that specification. working draft removed <icccolor> value from flood-color property and defined that the alpha channel of it gets multiplied with the computed value of the flood-opacity property. clarified value of flood-opacity property. scalable vector graphics (svg) 1.1 (second edition)the def...
<feFuncA> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFuncA
e input graphic of its parent <fecomponenttransfer> element. usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncaelement interface. specifications specification status comment filter effects module level 1the definition of '<fefunca>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefunca>' in that specification. recommendation initial definition ...
<feFuncB> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFuncB
e input graphic of its parent <fecomponenttransfer> element. usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncbelement interface. specifications specification status comment filter effects module level 1the definition of '<fefuncb>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncb>' in that specification. recommendation initial definition ...
<feFuncG> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFuncG
e input graphic of its parent <fecomponenttransfer> element. usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncgelement interface. specifications specification status comment filter effects module level 1the definition of '<fefuncg>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncg>' in that specification. recommendation initial definition ...
<feFuncR> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFuncR
e input graphic of its parent <fecomponenttransfer> element. usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes transfer function attributes specific attributes none dom interface this element implements the svgfefuncrelement interface. specifications specification status comment filter effects module level 1the definition of '<fefuncr>' in that specification. working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncr>' in that specification. recommendation initial definition ...
<feGaussianBlur> - SVG: Scalable Vector Graphics
working draft added edgemode attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<fegaussianblur>' in that specification. recommendation initial definition ...
<feImage> - SVG: Scalable Vector Graphics
Web › SVG › Element › feImage
face. example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xlink:href="/files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feimage>' in that specification. working draft added href attribute and deprecated xlink:href. added crossorigin attribute. scalable vector graphics (svg) 1.1 (second edition)the definition of '<feimage>' in that specification. recommendation initial definition ...
<feMerge> - SVG: Scalable Vector Graphics
Web › SVG › Element › feMerge
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femerge>' in that specification. recommendation initial definition ...
<feMergeNode> - SVG: Scalable Vector Graphics
working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergenode>' in that specification. recommendation initial definition ...
<feMorphology> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femorphology>' in that specification. recommendation initial definition ...
<feOffset> - SVG: Scalable Vector Graphics
Web › SVG › Element › feOffset
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feoffset>' in that specification. recommendation initial definition ...
<fePointLight> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fepointlight>' in that specification. recommendation initial definition ...
<feSpecularLighting> - SVG: Scalable Vector Graphics
working draft removed limitation of specularexponent attribute. scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespecularlighting>' in that specification. recommendation initial definition ...
<feSpotLight> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespotlight>' in that specification. recommendation initial definition ...
<feTile> - SVG: Scalable Vector Graphics
Web › SVG › Element › feTile
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fetile>' in that specification. recommendation initial definition ...
<feTurbulence> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feturbulence>' in that specification. recommendation initial definition ...
<filter> - SVG: Scalable Vector Graphics
Web › SVG › Element › filter
nts the svgfilterelement interface. example svg <svg width="230" height="120" xmlns="http://www.w3.org/2000/svg"> <filter id="blurme"> <fegaussianblur stddeviation="5"/> </filter> <circle cx="60" cy="60" r="50" fill="green" /> <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurme)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<filter>' in that specification. working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<filter>' in that specification. recommendation initial definition ...
<font-face-format> - SVG: Scalable Vector Graphics
the <font-face-format> svg element describes the type of font referenced by its parent <font-face-uri>. usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes string dom interface this element implements the svgfontfaceformatelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-format>' in that specification. recommendation initial definition ...
<font-face-name> - SVG: Scalable Vector Graphics
the <font-face-name> element points to a locally installed copy of this font, identified by its name. usage context categoriesnonepermitted contentempty attributes global attributes core attributes » specific attributes name dom interface this element implements the svgfontfacenameelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-name>' in that specification. recommendation initial definition ...
<font-face-src> - SVG: Scalable Vector Graphics
font, and <font-face-uri>, utilizing remotely defined fonts. usage context categoriesfont elementpermitted contentone or more of the following elements, in any order:<font-face-name>, <font-face-uri> attributes global attributes core attributes specific attributes none dom interface this element implements the svgfontfacesrcelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-src>' in that specification. recommendation initial definition ...
<font-face-uri> - SVG: Scalable Vector Graphics
oints to a remote definition of the current font. usage context categoriesfont elementpermitted contentany number of the following elements, in any order:<font-face-format> attributes global attributes core attributes xlink attributes specific attributes xlink:href dom interface this element implements the svgfontfaceurielement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-uri>' in that specification. recommendation initial definition ...
<font-face> - SVG: Scalable Vector Graphics
Web › SVG › Element › font-face
recommendation initial definition ...
<font> - SVG: Scalable Vector Graphics
Web › SVG › Element › font
recommendation initial definition ...
<foreignObject> - SVG: Scalable Vector Graphics
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<foreignobject>' in that specification. recommendation initial definition ...
<g> - SVG: Scalable Vector Graphics
Web › SVG › Element › g
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<g>' in that specification. recommendation initial definition ...
<glyph> - SVG: Scalable Vector Graphics
Web › SVG › Element › glyph
recommendation initial definition ...
<glyphRef> - SVG: Scalable Vector Graphics
Web › SVG › Element › glyphRef
ing <altglyph> substitution. usage context categoriestext content elementpermitted contentempty attributes global attributes core attributes » presentation attributes » xlink attributes » class style specific attributes x y dx dy glyphref format xlink:href dom interface this element implements the svgglyphrefelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyphref>' in that specification. recommendation initial definition ...
<hkern> - SVG: Scalable Vector Graphics
Web › SVG › Element › hkern
the <hkern> svg element allows to fine-tweak the horizontal distance between two glyphs. this process is known as kerning. usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes u1 g1 u2 g2 k dom interface this element implements the svghkernelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<hkern>' in that specification. recommendation initial definition ...
<image> - SVG: Scalable Vector Graphics
Web › SVG › Element › image
dom interface <image> implements the svgimageelement interface. example basic rendering of a png image in svg: svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="200" width="200"/> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<image>' in that specification. candidate recommendation allows omitting height and width scalable vector graphics (svg) 1.1 (second edition)the definition of '<image>' in that specification. recommendation initial definition ...
<line> - SVG: Scalable Vector Graphics
Web › SVG › Element › line
candidate recommendation changed the x1, y1, x2 and y2 attributes to take <length>s, <percentage>s and <number>s scalable vector graphics (svg) 1.1 (second edition)the definition of '<line>' in that specification. recommendation initial definition ...
<linearGradient> - SVG: Scalable Vector Graphics
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<lineargradient>' in that specification. recommendation initial definition ...
<marker> - SVG: Scalable Vector Graphics
Web › SVG › Element › marker
working draft scalable vector graphics (svg) 2the definition of '<marker>' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<marker>' in that specification. recommendation initial definition ...
<mask> - SVG: Scalable Vector Graphics
Web › SVG › Element › mask
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<mask>' in that specification. recommendation initial definition ...
<metadata> - SVG: Scalable Vector Graphics
Web › SVG › Element › metadata
nsform="translate(142 88)"> <title>cable b</title> <desc>10baset twisted pair cable</desc> <path d="m0,0c100,180 110,160 159,160"/> </g> <!-- draw cable n. --> <g id="cablen" transform="translate(242 88)"> <title>cable n</title> <desc>10baset twisted pair cable</desc> <path d="m0,0c0,-70 20,-50 60,-50"/> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of '<metadata>' in that specification. candidate recommendation allowed global event attributes on the element. scalable vector graphics (svg) 1.1 (second edition)the definition of '<metadata>' in that specification. recommendation initial definition ...
<missing-glyph> - SVG: Scalable Vector Graphics
recommendation initial definition ...
<mpath> - SVG: Scalable Vector Graphics
Web › SVG › Element › mpath
ngle centered horizontally just above the origin. --> <path d="m-25,-12.5 l25,-12.5 l 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06" > <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto" > <mpath xlink:href="#path1"/> </animatemotion> </path> </svg> result specifications specification status comment svg animations level 2the definition of '<mpath>' in that specification. editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<mpath>' in that specification. recommendation initial definition ...
<path> - SVG: Scalable Vector Graphics
Web › SVG › Element › path
working draft scalable vector graphics (svg) 2the definition of '<path>' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<path>' in that specification. recommendation initial definition ...
<pattern> - SVG: Scalable Vector Graphics
Web › SVG › Element › pattern
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<pattern>' in that specification. recommendation initial definition ...
<polygon> - SVG: Scalable Vector Graphics
Web › SVG › Element › polygon
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<polygon>' in that specification. recommendation initial definition ...
<polyline> - SVG: Scalable Vector Graphics
Web › SVG › Element › polyline
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<polyline>' in that specification. recommendation initial definition ...
<radialGradient> - SVG: Scalable Vector Graphics
candidate recommendation added fr attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<radialgradient>' in that specification. recommendation initial definition ...
<rect> - SVG: Scalable Vector Graphics
Web › SVG › Element › rect
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<rect>' in that specification. recommendation initial definition ...
<script> - SVG: Scalable Vector Graphics
Web › SVG › Element › script
eprecated since svg 2 the url to the script to load. value type: <url> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<script>' in that specification. recommendation initial definition ...
<set> - SVG: Scalable Vector Graphics
Web › SVG › Element › set
editor's draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<set>' in that specification. recommendation initial definition ...
<stop> - SVG: Scalable Vector Graphics
Web › SVG › Element › stop
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<stop>' in that specification. recommendation initial definition ...
<style> - SVG: Scalable Vector Graphics
Web › SVG › Element › style
n be used to switch between alternate style sheets. value type: <string>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification. candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<style>' in that specification. recommendation initial definition ...
<svg> - SVG: Scalable Vector Graphics
Web › SVG › Element › svg
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<svg>' in that specification. recommendation initial definition ...
<switch> - SVG: Scalable Vector Graphics
Web › SVG › Element › switch
candidate recommendation clarified the evaluation of the systemlanguage attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<switch>' in that specification. recommendation initial definition ...
<symbol> - SVG: Scalable Vector Graphics
Web › SVG › Element › symbol
k>, <pattern>, <script>, <style>, <switch>, <text>, <view> note: a <symbol> element itself is not meant to be rendered. only instances of a <symbol> element (i.e., a reference to a <symbol> by a <use> element) are rendered. that means that some browsers could refuse to directly display a <symbol> element even if the css display property tells otherwise. specifications specification status comment scalable vector graphics (svg) 2the definition of '<symbol>' in that specification. candidate recommendation allowed geometry properties to be specified on a symbol scalable vector graphics (svg) 1.1 (second edition)the definition of '<symbol>' in that specification. recommendation initial definition ...
<text> - SVG: Scalable Vector Graphics
Web › SVG › Element › text
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<text>' in that specification. recommendation initial definition ...
<textPath> - SVG: Scalable Vector Graphics
Web › SVG › Element › textPath
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<textpath>' in that specification. recommendation initial definition ...
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
Web › SVG › Element › title
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<title>' in that specification. recommendation initial definition ...
<tref> - SVG: Scalable Vector Graphics
Web › SVG › Element › tref
recommendation initial definition ...
<tspan> - SVG: Scalable Vector Graphics
Web › SVG › Element › tspan
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<tspan>' in that specification. recommendation initial definition ...
<use> - SVG: Scalable Vector Graphics
Web › SVG › Element › use
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<use>' in that specification. recommendation initial definition ...
<view> - SVG: Scalable Vector Graphics
Web › SVG › Element › view
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<view>' in that specification. recommendation initial definition ...
<vkern> - SVG: Scalable Vector Graphics
Web › SVG › Element › vkern
vg element allows to fine-tweak the vertical distance between two glyphs in top-to-bottom fonts. this process is known as kerning. usage context categoriesfont elementpermitted contentempty attributes global attributes core attributes specific attributes u1 g1 u2 g2 k dom interface this element implements the svgvkernelement interface. specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<vkern>' in that specification. recommendation initial definition ...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
you can find some basic examples of svg syntax and usage in the w3c svg test suite. note: as of gecko 2.0, gecko supports svg animation using smil. see svg animation with smil for a brief overview. full documentation for svg is forthcoming. someday. there is also a description of the mozilla support of the changes in svg 2. element implementation status a quick overview of the svg 1.1 elements and the current status of the native support. element notes structure module svg implemented. currentscale and currenttranslate dom attributes are implemented, but there is no pan and zoom user interface. svgsvgelement unimplemented attributes: contentscripttype, contentstyletype, viewport, currentview unimplemented b...
SVG as an Image - SVG: Scalable Vector Graphics
hey can be used if inlined through data: uris. :visited-link styles aren't rendered. platform-native widget styling (based on os theme) is disabled. note that the above restrictions are specific to image contexts; they don't apply when svg content is viewed directly, or when it's embedded as a document via the <iframe>, <object>, or <embed> elements. specifications specification status comment html5the definition of 'svg within <img> element' in that specification. recommendation defines the usage of svg within <img> elements. css backgrounds and borders module level 3the definition of 'svg within 'background-image' css property' in that specification. candidate recommendation defines the usage of svg within the background-image property. ...
Secure contexts - Web security
tion pages can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean, which is exposed on the global scope. if (window.issecurecontext) { // page is a secure context so service workers are now available navigator.serviceworker.register("/offline-worker.js").then(function () { ... }); } specifications specification status comment secure contexts candidate recommendation editor’s draft ...
Subresource Integrity - Web security
ng (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin. ...
Web Components
elating specifically to slots: ::slotted: matches any content that is inserted into a slot. the slotchange event fired on an htmlslotelement instance (<slot> element) when the node(s) contained in that slot change. examples we are building up a number of examples in our web-components-examples github repo. more will be added as time goes on. specifications specification status comment html living standardthe definition of '<template> element' in that specification. living standard the definition of <template>. html living standardthe definition of 'custom elements' in that specification. living standard the definition of html custom elements. domthe definition of 'shadow trees' in that specification. living standard the d...
xml:base - XML: Extensible Markup Language
Web › XML › xml:base
_ghr; src: url("fonts/zapfdingbats_ghr.woff") format("woff"); } ]]></style> </svg> setting the xml:base on the svg element means you can inline the svg and thereby bypass cors issue while not changing the base uri for your entire document. work-arounds xml:base support in old browsers https://gist.github.com/leonderijke/c5cf7c5b2e424c0061d2 specifications specification status comment xml base (second edition) recommendation ...
child - XPath
Web › XPath › Axes › child
the child axis indicates the children of the context node. if an xpath expression does not specify an axis, the child axis is understood by default. since only the root node or element nodes have children, any other use will select nothing. specifications specification status comment xpath 3.1the definition of 'child' in that specification. recommendation xpath 3.0the definition of 'child' in that specification. recommendation xpath 2.0the definition of 'child' in that specification. recommendation xpath 1.0the definition of 'child' in that specification. recommendation initial definition. ...
self - XPath
Web › XPath › Axes › self
recommendation xpath 3.0the definition of 'self' in that specification. ...
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
dated against a schema or not. use-when determines whether the element and all the nodes that have it as ancestor are excluded from the stylesheet. xpath-default-namespace specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an xpath expression. type required outermost element of stylesheet. specifications specification status comment xslt 3.0the definition of '<xsl:stylesheet>' in that specification. recommendation added the attributes default-mode, expand-text, and use-when. xslt 2.0 added the attributes xpath-default-namespace, default-validation, default-collation, and input-type-annotations and made all attributes except version optional. xslt 1.0 initial defin...
WebAssembly
ences, that are accessed by an instance. webassembly.compileerror() creates a new webassembly compileerror object. webassembly.linkerror() creates a new webassembly linkerror object. webassembly.runtimeerror() creates a new webassembly runtimeerror object. examples wasmsobel see our webassembly-examples repo for a number of other examples. specifications specification status comment webassembly javascript interface working draft initial draft definition of the javascript api. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobileserverchromeedgefirefoxintern...