mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
16075 lines
1.4 MiB
16075 lines
1.4 MiB
{
|
||
"license": {
|
||
"name": "CC-BY-SA 2.5",
|
||
"url": "https://creativecommons.org/licenses/by-sa/2.5/"
|
||
},
|
||
"author": {
|
||
"name": "Mozzila Contributors",
|
||
"url": "https://github.com/mdn/content"
|
||
},
|
||
"lang": "en-us",
|
||
"symbols": {
|
||
"largestcontentfulpaint": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <code>LargestContentfulPaint</code> interface provides timing information about the largest image or text paint before user input on a web page."
|
||
},
|
||
"largestcontentfulpaint.element": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/element",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>element</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface returns an object representing the <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> that is the largest contentful paint."
|
||
},
|
||
"largestcontentfulpaint.id": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/id",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface returns the ID of the element that is the largest contentful paint."
|
||
},
|
||
"largestcontentfulpaint.loadtime": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/loadtime",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>loadTime</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface returns the time that the element was loaded."
|
||
},
|
||
"largestcontentfulpaint.rendertime": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/rendertime",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>renderTime</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface represents the time that the element was rendered to the screen."
|
||
},
|
||
"largestcontentfulpaint.size": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/size",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>size</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface returns the intrinsic size of the element that is the largest contentful paint.\n<p>The <code>size</code> of the element is the <code>width</code> times <code>height</code> of the <a href=\"$MDN_URL$/Web/API/DOMRectReadOnly\" ><code>rectangle</code></a> that this element creates on the screen."
|
||
},
|
||
"largestcontentfulpaint.tojson": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> object.\n<p>The JSON doesn't contain the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint/element\" title=\"element\"><code>element</code></a> property because it is of type <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, which doesn't provide a <code>toJSON()</code> operation."
|
||
},
|
||
"largestcontentfulpaint.url": {
|
||
"url": "$MDN_URL$/web/api/largestcontentfulpaint/url",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "122",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>url</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> interface returns the request URL of the element, if the element is an image."
|
||
},
|
||
"launchparams": {
|
||
"url": "$MDN_URL$/web/api/launchparams",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>LaunchParams</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Launch_Handler_API\" >Launch Handler API</a> is used when implementing custom launch navigation handling in a PWA. When <a href=\"$MDN_URL$/Web/API/LaunchQueue/setConsumer\" ><code>window.launchQueue.setConsumer()</code></a> is invoked to set up the launch navigation handling functionality, the callback function inside <code>setConsumer()</code> is passed a <code>LaunchParams</code> object instance.\n<p>Such custom navigation handling is initiated via <a href=\"$MDN_URL$/Web/API/Window/launchQueue\"><code>Window.launchQueue</code></a> when a PWA has been launched with a <a href=\"$MDN_URL$/Web/Manifest/launch_handler\"><code>launch_handler</code></a> <code>client_mode</code> value of <code>focus-existing</code>, <code>navigate-new</code>, or <code>navigate-existing</code>."
|
||
},
|
||
"launchparams.files": {
|
||
"url": "$MDN_URL$/web/api/launchparams/files",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>files</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LaunchParams\"><code>LaunchParams</code></a> interface returns an array of <a href=\"$MDN_URL$/Web/API/FileSystemHandle\"><code>FileSystemHandle</code></a> objects representing any files passed along with the launch navigation via the <a href=\"$MDN_URL$/Web/HTTP/Methods/POST\"><code>POST</code></a> method."
|
||
},
|
||
"launchparams.targeturl": {
|
||
"url": "$MDN_URL$/web/api/launchparams/targeturl",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "110",
|
||
"ChromeAndroid": "110",
|
||
"Edge": "110",
|
||
"Opera": "96"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>targetURL</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LaunchParams\"><code>LaunchParams</code></a> interface returns the target URL of the associated web app launch."
|
||
},
|
||
"launchqueue": {
|
||
"url": "$MDN_URL$/web/api/launchqueue",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>LaunchQueue</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Launch_Handler_API\" >Launch Handler API</a> is available via the <a href=\"$MDN_URL$/Web/API/Window/launchQueue\"><code>Window.launchQueue</code></a> property. When a <a href=\"$MDN_URL$/Web/Progressive_web_apps\">progressive web app</a> (PWA) is launched with a <a href=\"$MDN_URL$/Web/Manifest/launch_handler\"><code>launch_handler</code></a> <code>client_mode</code> value of <code>focus-existing</code>, <code>navigate-new</code>, or <code>navigate-existing</code>, <a href=\"$MDN_URL$/Web/API/LaunchQueue\" aria-current=\"page\"><code>LaunchQueue</code></a> provides access to functionality that allows custom launch navigation handling to be implemented in the PWA. This functionality is controlled by the properties of the <a href=\"$MDN_URL$/Web/API/LaunchParams\"><code>LaunchParams</code></a> object passed into the <a href=\"$MDN_URL$/Web/API/LaunchQueue/setConsumer\" ><code>setConsumer()</code></a> callback function."
|
||
},
|
||
"launchqueue.setconsumer": {
|
||
"url": "$MDN_URL$/web/api/launchqueue/setconsumer",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>setConsumer()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LaunchQueue\"><code>LaunchQueue</code></a> interface is used to declare the callback that will handle custom launch navigation handling in a <a href=\"$MDN_URL$/Web/Progressive_web_apps\">progressive web app</a> (PWA). Such custom navigation is initiated via <a href=\"$MDN_URL$/Web/API/Window/launchQueue\"><code>Window.launchQueue</code></a> when a PWA has been launched with a <a href=\"$MDN_URL$/Web/Manifest/launch_handler\"><code>launch_handler</code></a> <code>client_mode</code> value of <code>focus-existing</code>, <code>navigate-new</code>, or <code>navigate-existing</code>.",
|
||
"parameters": {
|
||
"callback": "A callback function that handles custom navigation for the PWA. The callback is passed a <a href=\"$MDN_URL$/Web/API/LaunchParams\"><code>LaunchParams</code></a> object instance as a parameter."
|
||
},
|
||
"returns": "<code>undefined</code>."
|
||
},
|
||
"layoutshift": {
|
||
"url": "$MDN_URL$/web/api/layoutshift",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <code>LayoutShift</code> interface of the <a href=\"$MDN_URL$/Web/API/Performance_API\">Performance API</a> provides insights into the layout stability of web pages based on movements of the elements on the page."
|
||
},
|
||
"layoutshift.hadrecentinput": {
|
||
"url": "$MDN_URL$/web/api/layoutshift/hadrecentinput",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>hadRecentInput</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> interface returns <code>true</code> if <a href=\"$MDN_URL$/Web/API/LayoutShift/lastInputTime\" ><code>lastInputTime</code></a> is less than 500 milliseconds in the past.\n<p>Layout shifts are only a problem if the user is not expecting them, so layout shifts that are the result of user interactions (such as a user expanding a UI element) are often not considered in layout shift metrics. The <code>hadRecentInput</code> property allows you to exclude these shifts."
|
||
},
|
||
"layoutshift.lastinputtime": {
|
||
"url": "$MDN_URL$/web/api/layoutshift/lastinputtime",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>lastInputTime</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> interface returns the time of the most recent excluding input or <code>0</code> if no excluding input has occurred.\n<p>Layout shifts are only bad if the user wasn't expecting them. Many layout shift metrics (like <a href=\"https://web.dev/articles/cls\" class=\"external\" target=\"_blank\">Cumulative Layout Shift (CLS)</a>) exclude shifts that occurred soon after certain user interactions. These interactions are called <em>excluding inputs</em>. Excluding inputs are:\n<ul>\n<li>Any events which signal a user's active interaction with the document: (<a href=\"$MDN_URL$/Web/API/Element/mousedown_event\"><code>mousedown</code></a>, <a href=\"$MDN_URL$/Web/API/Element/keydown_event\"><code>keydown</code></a>, and <a href=\"$MDN_URL$/Web/API/Element/pointerdown_event\"><code>pointerdown</code></a>)</li>\n<li>Any events which directly changes the size of the viewport.</li>\n<li><a href=\"$MDN_URL$/Web/API/HTMLElement/change_event\"><code>change</code></a> events.</li>\n</ul>\n<p>The <a href=\"$MDN_URL$/Web/API/Element/mousemove_event\"><code>mousemove</code></a> and <a href=\"$MDN_URL$/Web/API/Element/pointermove_event\"><code>pointermove</code></a> events are <strong>not</strong> excluding inputs."
|
||
},
|
||
"layoutshift.sources": {
|
||
"url": "$MDN_URL$/web/api/layoutshift/sources",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>sources</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> interface returns an array of <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> objects that indicate the DOM elements that moved during the layout shift."
|
||
},
|
||
"layoutshift.tojson": {
|
||
"url": "$MDN_URL$/web/api/layoutshift/toJSON",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> object."
|
||
},
|
||
"layoutshift.value": {
|
||
"url": "$MDN_URL$/web/api/layoutshift/value",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>value</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a> interface returns the layout shift score calculated as the impact fraction (fraction of the viewport that was shifted) multiplied by the distance fraction (distance moved as a fraction of viewport)."
|
||
},
|
||
"layoutshiftattribution": {
|
||
"url": "$MDN_URL$/web/api/layoutshiftattribution",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <code>LayoutShiftAttribution</code> interface provides debugging information about elements which have shifted.\n<p>Instances of <code>LayoutShiftAttribution</code> are returned in an array by calling <a href=\"$MDN_URL$/Web/API/LayoutShift/sources\"><code>LayoutShift.sources</code></a>."
|
||
},
|
||
"layoutshiftattribution.currentrect": {
|
||
"url": "$MDN_URL$/web/api/layoutshiftattribution/currentrect",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>currentRect</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/DOMRectReadOnly\"><code>DOMRectReadOnly</code></a> object representing the position of the element after the shift."
|
||
},
|
||
"layoutshiftattribution.node": {
|
||
"url": "$MDN_URL$/web/api/layoutshiftattribution/node",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>node</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> representing the object that has shifted."
|
||
},
|
||
"layoutshiftattribution.previousrect": {
|
||
"url": "$MDN_URL$/web/api/layoutshiftattribution/previousrect",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>previousRect</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/DOMRectReadOnly\"><code>DOMRectReadOnly</code></a> object representing the position of the element before the shift."
|
||
},
|
||
"layoutshiftattribution.tojson": {
|
||
"url": "$MDN_URL$/web/api/layoutshiftattribution/tojson",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Opera": "70"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> interface is a <em>serializer</em> that returns a JSON representation of the <code>LayoutShiftAttribution</code> object.",
|
||
"returns": "A JSON object that is the serialization of the <a href=\"$MDN_URL$/Web/API/LayoutShiftAttribution\"><code>LayoutShiftAttribution</code></a> object."
|
||
},
|
||
"linearaccelerationsensor": {
|
||
"url": "$MDN_URL$/web/api/linearaccelerationsensor",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <strong><code>LinearAccelerationSensor</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Sensor_APIs\">Sensor APIs</a> provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity.\n<p>To use this sensor, the user must grant permission to the <code>'accelerometer'</code> device sensor through the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a>. In addition, this feature may be blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> set on your server."
|
||
},
|
||
"linearaccelerationsensor.linearaccelerationsensor": {
|
||
"url": "$MDN_URL$/web/api/linearaccelerationsensor/linearaccelerationsensor",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <strong><code>LinearAccelerationSensor()</code></strong>\nconstructor creates a new <a href=\"$MDN_URL$/Web/API/LinearAccelerationSensor\"><code>LinearAccelerationSensor</code></a> object which\nprovides on each reading the acceleration applied to the device along all three axes,\nbut without the contribution of gravity.",
|
||
"parameters": {
|
||
"options": "Options are as follows: <dl> <dt id=\"frequency\"><a href=\"#frequency\"><code>frequency</code></a></dt> <dd> <p>The desired number of times per second a sample should be taken, meaning the number of times per second that the <a href=\"$MDN_URL$/Web/API/Sensor/reading_event\" ><code>reading</code></a> event 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. </dd> <dt id=\"referenceframe\"><a href=\"#referenceframe\"><code>referenceFrame</code></a></dt> <dd> <p>Either <code>'device'</code> or <code>'screen'</code>. The default is <code>'device'</code>. </dd> </dl>"
|
||
},
|
||
"throws": {
|
||
"SecurityError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>."
|
||
}
|
||
},
|
||
"location": {
|
||
"url": "$MDN_URL$/web/api/location",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "3",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>Location</code></strong> interface represents the location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Both the <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> and <a href=\"$MDN_URL$/Web/API/Window\"><code>Window</code></a> interface have such a linked <code>Location</code>, accessible via <a href=\"$MDN_URL$/Web/API/Document/location\"><code>Document.location</code></a> and <a href=\"$MDN_URL$/Web/API/Window/location\"><code>Window.location</code></a> respectively."
|
||
},
|
||
"location.ancestororigins": {
|
||
"url": "$MDN_URL$/web/api/location/ancestororigins",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "79",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>ancestorOrigins</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> interface is a static\n<a href=\"$MDN_URL$/Web/API/DOMStringList\"><code>DOMStringList</code></a> containing, in reverse order, the origins of all ancestor\nbrowsing contexts of the document associated with the given <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\nobject.\n<p>You can use <code>location.ancestorOrigins</code> in the script for a document to\ndetermine, for example, whenever the document is being framed by a site which you don't\nexpect it to be framed by. You can also use it to vary the behavior of the document\nbased on what site or list of sites is framing it."
|
||
},
|
||
"location.assign": {
|
||
"url": "$MDN_URL$/web/api/location/assign",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "3",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>assign()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface causes the window to load\nand display the document at the URL specified. After the navigation occurs, the user can\nnavigate back to the page that called <code>Location.assign()</code> by pressing the \"back\" button.",
|
||
"parameters": {
|
||
"url": "A string containing the URL of the page to navigate to; for example, an absolute URL such as <code>https://developer.mozilla.org$MDN_URL$/Web/API/Location/reload</code>, or a relative URL — such as <code>\"/Web</code> (just a path, for navigating to another document at the same origin) or <code>#specifications</code> (just a fragment string, for navigating to some part of the same page), and so on."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"SecurityError DOMException": "Thrown if the <a href=\"$MDN_URL$/Glossary/Origin\">origin</a> of the script calling the method is not the <a href=\"$MDN_URL$/Glossary/Same-origin_policy\">same origin</a> of the page originally described by the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> object, mostly when the script is hosted on a different domain.",
|
||
"SyntaxError DOMException": "Thrown if the provided <code>url</code> parameter is not a valid URL."
|
||
}
|
||
},
|
||
"location.hash": {
|
||
"url": "$MDN_URL$/web/api/location/hash",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>hash</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> interface returns a string containing a\n<code>'#'</code> followed by the fragment identifier of the URL — the ID on the page\nthat the URL is trying to target.\n<p>The fragment is not <a href=\"https://en.wikipedia.org/wiki/URL_encoding\" class=\"external\" target=\"_blank\">URL decoded</a>. If the URL does not\nhave a fragment identifier, this property contains an empty string, <code>\"\"</code>."
|
||
},
|
||
"location.host": {
|
||
"url": "$MDN_URL$/web/api/location/host",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>host</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a string containing the host, that is the\n<em>hostname</em>, and then, if the <em>port</em> of the URL is nonempty, a\n<code>':'</code>, and the <em>port</em> of the URL."
|
||
},
|
||
"location.hostname": {
|
||
"url": "$MDN_URL$/web/api/location/hostname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>hostname</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a string containing the domain of the URL."
|
||
},
|
||
"location.href": {
|
||
"url": "$MDN_URL$/web/api/location/href",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>href</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a <a href=\"$MDN_URL$/Glossary/Stringifier\">stringifier</a> that returns a string containing the whole\nURL, and allows the href to be updated.\n<p>Setting the value of <code>href</code> <em>navigates</em> to the provided URL. If you\nwant <em>redirection</em>, use <a href=\"$MDN_URL$/Web/API/Location/replace\" ><code>location.replace()</code></a>. The difference from setting the <code>href</code> property value is that when using the <code>location.replace()</code> method, after navigating to the given URL, the current page will not be saved in session <a href=\"$MDN_URL$/Web/API/History_API\">history</a> — meaning the user won't be able to use the back button to navigate to it."
|
||
},
|
||
"location.origin": {
|
||
"url": "$MDN_URL$/web/api/location/origin",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "8",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "21",
|
||
"Opera": "15",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>origin</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> interface is a string containing the\nUnicode serialization of the origin of the represented URL.\n<p>That is:\n<ul>\n<li>\nfor URL using the <code>http</code> or <code>https</code>, the scheme followed by\n<code>'://'</code>, followed by the domain, followed by <code>':'</code>, followed by\nthe port (the default port, <code>80</code> and <code>443</code> respectively, if\nexplicitly specified);\n</li>\n<li>for URL using <code>file:</code> scheme, the value is browser dependent;</li>\n<li>\nfor URL using the <code>blob:</code> scheme, the origin of the URL following\n<code>blob:</code>. E.g <code>\"blob:https://mozilla.org\"</code> will have\n<code>\"https://mozilla.org\".</code>\n</li>\n</ul><div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"location.pathname": {
|
||
"url": "$MDN_URL$/web/api/location/pathname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>pathname</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a string containing the path of the URL for the location. If there is no path, <code>pathname</code> will be empty: otherwise, <code>pathname</code> contains an initial '/' followed by the path of the URL, not including the query string or fragment."
|
||
},
|
||
"location.port": {
|
||
"url": "$MDN_URL$/web/api/location/port",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>port</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a string containing the port number of the URL. If the\nURL does not contain an explicit port number, it will be set to <code>''</code>."
|
||
},
|
||
"location.protocol": {
|
||
"url": "$MDN_URL$/web/api/location/protocol",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>protocol</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a string representing the protocol scheme of the URL,\nincluding the final <code>':'</code>."
|
||
},
|
||
"location.reload": {
|
||
"url": "$MDN_URL$/web/api/location/reload",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "3",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>reload()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> interface reloads the current URL, like the Refresh button.",
|
||
"parameters": {
|
||
"forceGet": "Pass <code>true</code> to force a reload bypassing the cache. Defaults to <code>false</code>. Only supported in Firefox."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"SecurityError DOMException": "Thrown if the <a href=\"$MDN_URL$/Glossary/Origin\">origin</a> of the script calling the method is not the <a href=\"$MDN_URL$/Glossary/Same-origin_policy\">same origin</a> of the page originally described by the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> object, mostly when the script is hosted on a different domain."
|
||
}
|
||
},
|
||
"location.replace": {
|
||
"url": "$MDN_URL$/web/api/location/replace",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "3",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>replace()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface replaces the current resource with the one at the provided URL. The difference\nfrom the <a href=\"$MDN_URL$/Web/API/Location/assign\" ><code>assign()</code></a> method is that after using\n<code>replace()</code> the current page will not be saved in session <a href=\"$MDN_URL$/Web/API/History\"><code>History</code></a>,\nmeaning the user won't be able to use the <em>back</em> button to navigate to it.",
|
||
"parameters": {
|
||
"url": "A string containing the URL of the page to navigate to."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"SyntaxError DOMException": "Thrown if the provided <code>url</code> parameter is not a valid URL."
|
||
}
|
||
},
|
||
"location.search": {
|
||
"url": "$MDN_URL$/web/api/location/search",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>search</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a>\ninterface is a search string, also called a <em>query string</em>; that is, a\nstring containing a <code>'?'</code> followed by the parameters of the\nURL.\n<p>Modern browsers provide\n<a href=\"$MDN_URL$/Web/API/URLSearchParams/get#examples\"><code>URLSearchParams</code></a>\nand\n<a href=\"$MDN_URL$/Web/API/URL/searchParams#examples\"><code>URL.searchParams</code></a>\nto make it easy to parse out the parameters from the querystring."
|
||
},
|
||
"location.tostring": {
|
||
"url": "$MDN_URL$/web/api/location/tostring",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "39",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.7"
|
||
},
|
||
"doc": "The <strong><code>toString()</code></strong> <a href=\"$MDN_URL$/Glossary/Stringifier\">stringifier</a> method of the\n<a href=\"$MDN_URL$/Web/API/Location\"><code>Location</code></a> interface returns a string containing the\nwhole URL. It is a read-only version of <a href=\"$MDN_URL$/Web/API/Location/href\"><code>Location.href</code></a>.",
|
||
"returns": "A string representing the object's URL."
|
||
},
|
||
"lock": {
|
||
"url": "$MDN_URL$/web/api/lock",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Lock</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_Locks_API\">Web Locks API</a> provides the name and mode of a lock.\nThis may be a newly requested lock that is received in the callback to <a href=\"$MDN_URL$/Web/API/LockManager/request\" ><code>LockManager.request()</code></a>, or a record of an active or queued lock returned by <a href=\"$MDN_URL$/Web/API/LockManager/query\"><code>LockManager.query()</code></a>.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"lock.mode": {
|
||
"url": "$MDN_URL$/web/api/lock/mode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>mode</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Lock\"><code>Lock</code></a> interface returns the access mode passed to <a href=\"$MDN_URL$/Web/API/LockManager/request\"><code>LockManager.request()</code></a> when the lock was requested.\nThe mode is either <code>\"exclusive\"</code> (the default) or <code>\"shared\"</code>.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"lock.name": {
|
||
"url": "$MDN_URL$/web/api/lock/name",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>name</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/Lock\"><code>Lock</code></a> interface returns the <em>name</em> passed to\n<a href=\"$MDN_URL$/Web/API/LockManager/request\"><code>LockManager.request</code></a> selected when the lock was requested.\n<p>The name of a lock is passed by script when the lock is requested. The name is selected\nby the developer to represent an abstract resource for which use is being coordinated\nacross multiple tabs, workers, or other code within the origin. For example, if only one\ntab of a web application should be synchronizing network resources with an offline\ndatabase, it could use a lock name such as <code>\"net_db_sync\"</code>.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"lockmanager": {
|
||
"url": "$MDN_URL$/web/api/lockmanager",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>LockManager</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_Locks_API\">Web Locks API</a> provides methods for requesting a new <a href=\"$MDN_URL$/Web/API/Lock\"><code>Lock</code></a> object and querying for an existing <code>Lock</code> object. To get an instance of <code>LockManager</code>, call <a href=\"$MDN_URL$/Web/API/Navigator/locks\"><code>navigator.locks</code></a>.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"lockmanager.query": {
|
||
"url": "$MDN_URL$/web/api/lockmanager/query",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>query()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LockManager\"><code>LockManager</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with an object containing information about held and pending locks.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with an object containing a snapshot of the <a href=\"$MDN_URL$/Web/API/LockManager\"><code>LockManager</code></a> state.\n The object has the following properties:\n<dl>\n <dt id=\"held\"><a href=\"#held\"><code>held</code></a></dt>\n <dd>\n <p>An array of <code>LockInfo</code> objects for held locks.\n </dd>\n <dt id=\"pending\"><a href=\"#pending\"><code>pending</code></a></dt>\n <dd>\n <p>An array of <code>LockInfo</code> objects for pending lock requests.\n </dd>\n</dl>\n<p>The <code>LockInfo</code> object can have the following properties:\n<dl>\n <dt id=\"name\"><a href=\"#name\"><code>name</code></a></dt>\n <dd>\n <p>The name passed to <a href=\"$MDN_URL$/Web/API/LockManager/request\"><code>LockManager.request()</code></a> when the lock was requested.\n </dd>\n <dt id=\"mode\"><a href=\"#mode\"><code>mode</code></a></dt>\n <dd>\n <p>The access mode passed to <a href=\"$MDN_URL$/Web/API/LockManager/request\"><code>LockManager.request()</code></a> when the lock was requested. The mode is either <code>\"exclusive\"</code> or <code>\"shared\"</code>.\n </dd>\n <dt id=\"clientid\"><a href=\"#clientid\"><code>clientId</code></a></dt>\n <dd>\n <p>The unique identity of the context where <a href=\"$MDN_URL$/Web/API/LockManager/request\"><code>LockManager.request()</code></a> is called. This is the same value as <a href=\"$MDN_URL$/Web/API/Client/id\"><code>Client.id</code></a>.\n </dd>\n</dl>",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the environments document is not fully active.",
|
||
"SecurityError DOMException": "Thrown if a lock manager cannot be obtained for the current environment."
|
||
}
|
||
},
|
||
"lockmanager.request": {
|
||
"url": "$MDN_URL$/web/api/lockmanager/request",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>request()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/LockManager\"><code>LockManager</code></a> interface requests a <a href=\"$MDN_URL$/Web/API/Lock\"><code>Lock</code></a> object with parameters specifying its name and characteristics.\nThe requested <code>Lock</code> is passed to a callback, while the function itself returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves (or rejects) with the result of the callback after the lock is released, or rejects if the request is aborted.\n<p>The <code>mode</code> property of the <code>options</code> parameter may be either <code>\"exclusive\"</code> or <code>\"shared\"</code>.\n<p>Request an <code>\"exclusive\"</code> lock when it should only be held by one code instance at a time.\nThis applies to code in both tabs and workers. Use this to represent mutually exclusive access to a resource.\nWhen an <code>\"exclusive\"</code> lock for a given name is held, no other lock with the same name can be held.\n<p>Request a <code>\"shared\"</code> lock when multiple instances of the code can share access to a resource.\nWhen a <code>\"shared\"</code> lock for a given name is held, other <code>\"shared\"</code> locks for the same name can be granted, but no <code>\"exclusive\"</code> locks with that name can be held or granted.\n<p>This shared/exclusive lock pattern is common in database transaction architecture, for example to allow multiple simultaneous readers (each requests a <code>\"shared\"</code> lock) but only one writer (a single <code>\"exclusive\"</code> lock).\nThis is known as the readers-writer pattern.\nIn the <a href=\"$MDN_URL$/Web/API/IndexedDB_API\">IndexedDB API</a>, this is exposed as <code>\"readonly\"</code> and <code>\"readwrite\"</code> transactions which have the same semantics.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"parameters": {
|
||
"name": "An identifier for the lock you want to request.",
|
||
"options": "An object describing characteristics of the lock you want to create. Valid values are: <dl> <dt id=\"mode\"><a href=\"#mode\"><code>mode</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Either <code>\"exclusive\"</code> or <code>\"shared\"</code>. The default value is <code>\"exclusive\"</code>. </dd> <dt id=\"ifavailable\"><a href=\"#ifavailable\"><code>ifAvailable</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>If <code>true</code>, the lock request will only be granted if it is not already held. If it cannot be granted, the callback will be invoked with <code>null</code> instead of a <code>Lock</code> instance. The default value is <code>false</code>. </dd> <dt id=\"steal\"><a href=\"#steal\"><code>steal</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>If <code>true</code>, then any held locks with the same name will be released, and the request will be granted, preempting any queued requests for it. The default value is <code>false</code>. <div class=\"notecard warning\" id=\"sect3\"> <p><strong>Warning:</strong> Use with care! Code that was previously running inside the lock continues to run, and may clash with the code that now holds the lock. </div> </dd> <dt id=\"signal\"><a href=\"#signal\"><code>signal</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a> (the <a href=\"$MDN_URL$/Web/API/AbortController/signal\" ><code>signal</code></a> property of an <a href=\"$MDN_URL$/Web/API/AbortController\"><code>AbortController</code></a>); if specified and the <a href=\"$MDN_URL$/Web/API/AbortController\"><code>AbortController</code></a> is aborted, the lock request is dropped if it was not already granted. </dd> </dl>",
|
||
"callback": "Method called when the lock is granted. The lock is automatically released when the callback returns (or an exception is thrown). Usually the callback is an async function, which causes the lock to be released only when the async function has completely finished."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves (or rejects) with the result of the callback after the lock is released, or rejects if the request is aborted.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the environments document is not fully active.",
|
||
"SecurityError DOMException": "Thrown if a lock manager cannot be obtained for the current environment.",
|
||
"NotSupportedError DOMException": "Thrown if <code>name</code> starts with a hyphen (<code>-</code>), both options <code>steal</code> and <code>ifAvailable</code> are <code>true</code>, or if option <code>signal</code> exists and <em>either</em> option <code>steal</code> or <code>ifAvailable</code> is <code>true</code>.",
|
||
"AbortError DOMException": "Thrown if the option <code>signal</code> exists and is aborted."
|
||
}
|
||
},
|
||
"magnetometer": {
|
||
"url": "$MDN_URL$/web/api/magnetometer",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Magnetometer</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Sensor_APIs\">Sensor APIs</a> provides information about the magnetic field as detected by the device's primary magnetometer sensor.\n<p>To use this sensor, the user must grant permission to the <code>'magnetometer'</code> device sensor through the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a>. In addition, this feature may be blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> set on your server."
|
||
},
|
||
"magnetometer.magnetometer": {
|
||
"url": "$MDN_URL$/web/api/magnetometer/magnetometer",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Magnetometer()</code></strong> constructor\ncreates a new <a href=\"$MDN_URL$/Web/API/Magnetometer\"><code>Magnetometer</code></a> object which returns information about the\nmagnetic field as detected by a device's primary magnetometer sensor.",
|
||
"parameters": {
|
||
"options": "Options are as follows: <dl> <dt id=\"frequency\"><a href=\"#frequency\"><code>frequency</code></a></dt> <dd> <p>The desired number of times per second a sample should be taken, meaning the number of times per second that the <a href=\"$MDN_URL$/Web/API/Sensor/reading_event\" ><code>reading</code></a> event 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. </dd> <dt id=\"referenceframe\"><a href=\"#referenceframe\"><code>referenceFrame</code></a></dt> <dd> <p>Either <code>'device'</code> or <code>'screen'</code>. The default is <code>'device'</code>. </dd> </dl>"
|
||
},
|
||
"throws": {
|
||
"SecurityError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>."
|
||
}
|
||
},
|
||
"magnetometer.x": {
|
||
"url": "$MDN_URL$/web/api/magnetometer/x",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>x</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Magnetometer\"><code>Magnetometer</code></a> interface returns a number specifying\nthe magnetic field around the device's x-axis."
|
||
},
|
||
"magnetometer.y": {
|
||
"url": "$MDN_URL$/web/api/magnetometer/y",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>y</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Magnetometer\"><code>Magnetometer</code></a> interface returns a number specifying\nthe magnetic field around the device's y-axis."
|
||
},
|
||
"magnetometer.z": {
|
||
"url": "$MDN_URL$/web/api/magnetometer/z",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>z</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Magnetometer\"><code>Magnetometer</code></a> interface returns a number specifying\nthe magnetic field around the device's z-axis."
|
||
},
|
||
"mathmlelement": {
|
||
"url": "$MDN_URL$/web/api/mathmlelement",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Firefox": "71",
|
||
"Opera": "95",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The <strong><code>MathMLElement</code></strong> interface represents any <a href=\"$MDN_URL$/Web/MathML\">MathML</a> element."
|
||
},
|
||
"mathmlelement.style": {
|
||
"url": "$MDN_URL$/web/api/mathmlelement/style",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Firefox": "71",
|
||
"Opera": "95",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The read-only <strong><code>style</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MathMLElement\"><code>MathMLElement</code></a> returns the <em>inline</em> style of an element in the form of a live <a href=\"$MDN_URL$/Web/API/CSSStyleDeclaration\"><code>CSSStyleDeclaration</code></a> object that contains a list of all styles properties for that element with values assigned only for the attributes that are defined in the element's inline <a href=\"$MDN_URL$/Web/HTML/Global_attributes/style\"><code>style</code></a> attribute.\n<p>Shorthand properties are expanded. If you set <code>style=\"border-top: 1px solid black\"</code>, the longhand properties (<a href=\"$MDN_URL$/Web/CSS/border-top-color\"><code>border-top-color</code></a>, <a href=\"$MDN_URL$/Web/CSS/border-top-style\"><code>border-top-style</code></a>, and <a href=\"$MDN_URL$/Web/CSS/border-top-width\"><code>border-top-width</code></a>) are set instead.\n<p>This property is read-only, meaning it is not possible to assign a <a href=\"$MDN_URL$/Web/API/CSSStyleDeclaration\"><code>CSSStyleDeclaration</code></a> object to it. Nevertheless, it is possible to set an inline style by assigning a <em>string</em> directly to the <code>style</code> property. In this case the string is forwarded to <a href=\"$MDN_URL$/Web/API/CSSStyleDeclaration/cssText\"><code>CSSStyleDeclaration.cssText</code></a>. Using <code>style</code> in this manner will completely overwrite all inline styles on the element.\n<p>Therefore, to add specific styles to an element without altering other style values, it is generally preferable to set individual properties on the <a href=\"$MDN_URL$/Web/API/CSSStyleDeclaration\"><code>CSSStyleDeclaration</code></a> object. For example, you can write <code>element.style.backgroundColor = \"red\"</code>.\n<p>A style declaration is reset by setting it to <code>null</code> or an empty string, e.g., <code>elt.style.color = null</code>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> CSS property names are converted to JavaScript identifier with these rules:\n<ul>\n<li>If the property is made of one word, it remains as it is: <code>height</code> stays as is (in lowercase).</li>\n<li>If the property is made of several words, separated by dashes, the dashes are removed and it is converted to <a href=\"$MDN_URL$/Glossary/Camel_case\">camel case</a>: <code>background-attachment</code> becomes <code>backgroundAttachment</code>.</li>\n<li>The property <code>float</code>, being a reserved JavaScript keyword, is converted to <code>cssFloat</code>.</li>\n</ul>\n<p>The <code>style</code> property has the same priority in the CSS cascade as an inline style declaration set via the <code>style</code> attribute.\n</div>"
|
||
},
|
||
"mediacapabilities": {
|
||
"url": "$MDN_URL$/web/api/mediacapabilities",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "66",
|
||
"ChromeAndroid": "66",
|
||
"Edge": "79",
|
||
"Firefox": "63",
|
||
"Opera": "53",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>MediaCapabilities</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capabilities_API\">Media Capabilities API</a> provides information about the decoding abilities of the device, system and browser. The API can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates. The information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient.\n<p>The information is accessed through the <strong><code>mediaCapabilities</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface."
|
||
},
|
||
"mediacapabilities.decodinginfo": {
|
||
"url": "$MDN_URL$/web/api/mediacapabilities/decodinginfo",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "66",
|
||
"ChromeAndroid": "66",
|
||
"Edge": "79",
|
||
"Firefox": "63",
|
||
"Opera": "53",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>MediaCapabilities.decodingInfo()</code></strong> method, part of the <a href=\"$MDN_URL$/Web/API/MediaCapabilities\">Media Capabilities API</a>, returns a promise with the tested media configuration's capabilities info.\nThis contains the three boolean properties <code>supported</code>, <code>smooth</code>, and <code>powerefficient</code>, which describe whether decoding the media described would be supported, smooth, and powerefficient.",
|
||
"parameters": {
|
||
"configuration": "An object with a property <code>type</code> and <em>either</em> a <code>video</code> or <code>audio</code> property containing a configuration of the appropriate type: <dl> <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt> <dd> <p>The type of media being tested. This takes one of three values: <dl> <dt id=\"file\"><a href=\"#file\"><code>file</code></a></dt> <dd> <p>Represents a configuration that is meant to be used for a plain file playback. </dd> <dt id=\"media-source\"><a href=\"#media-source\"><code>media-source</code></a></dt> <dd> <p>Represents a configuration that is meant to be used for playback of a <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a>. </dd> <dt id=\"webrtc\"><a href=\"#webrtc\"><code>webrtc</code></a></dt> <dd> <p>Represents a configuration that is meant to be received using <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>. </dd> </dl> </dd> <dt id=\"video\"><a href=\"#video\"><code>video</code></a></dt> <dd> <p>Configuration object for a video media source. This has the following properties: <dl> <dt id=\"contenttype\"><a href=\"#contenttype\"><code>contentType</code></a></dt> <dd> <p>String containing a valid video MIME type, and (optionally) a <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\"><code>codecs</code> parameter</a>. </dd> <dt id=\"width\"><a href=\"#width\"><code>width</code></a></dt> <dd> <p>The width of the video. </dd> <dt id=\"height\"><a href=\"#height\"><code>height</code></a></dt> <dd> <p>The height of the video. </dd> <dt id=\"bitrate\"><a href=\"#bitrate\"><code>bitrate</code></a></dt> <dd> <p>The number of bits used to encode one second of the video file. </dd> <dt id=\"framerate\"><a href=\"#framerate\"><code>framerate</code></a></dt> <dd> <p>The number of frames making up one second of video playback. </dd> </dl> </dd> <dt id=\"audio\"><a href=\"#audio\"><code>audio</code></a></dt> <dd> <p>Configuration object for an audio media source. This has the following properties: <dl> <dt id=\"contenttype_2\"><a href=\"#contenttype_2\"><code>contentType</code></a></dt> <dd> <p>String containing a valid audio MIME type, and (optionally) a <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\"><code>codecs</code> parameter</a>. </dd> <dt id=\"channels\"><a href=\"#channels\"><code>channels</code></a></dt> <dd> <p>The number of channels used by the audio track. </dd> <dt id=\"bitrate_2\"><a href=\"#bitrate_2\"><code>bitrate</code></a></dt> <dd> <p>The number of bits used to encode one second of the audio file. </dd> <dt id=\"samplerate\"><a href=\"#samplerate\"><code>samplerate</code></a></dt> <dd> <p>The number of audio samples making up one second of the audio file. </dd> </dl> </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> fulfilling with an object containing three Boolean attributes:\n<dl>\n <dt id=\"supported\"><a href=\"#supported\"><code>supported</code></a></dt>\n <dd>\n <p><code>true</code> if the media content can be decoded at all. Otherwise, it is <code>false</code>.\n </dd>\n <dt id=\"smooth\"><a href=\"#smooth\"><code>smooth</code></a></dt>\n <dd>\n <p><code>true</code> if playback of the media will be smooth (of high quality). Otherwise it is <code>false</code>.\n </dd>\n <dt id=\"powerefficient\"><a href=\"#powerefficient\"><code>powerEfficient</code></a></dt>\n <dd>\n <p><code>true</code> if playback of the media will be power efficient. Otherwise, it is <code>false</code>.\n </dd>\n</dl>\n<p>Browsers will report a supported media configuration as <code>smooth</code> and <code>powerEfficient</code> until stats on this device have been recorded.\n All supported audio codecs are reported to be power efficient.",
|
||
"throws": {
|
||
"TypeError": "Thrown if the <code>configuration</code> passed to the <code>decodingInfo()</code> method is invalid, either because the type is not video or audio, the <code>contentType</code> is not a valid codec MIME type, the media decoding configuration is not a valid value for the <code>type</code> (file, media-source, or webrtc), or any other error in the media configuration passed to the method, including omitting any values."
|
||
}
|
||
},
|
||
"mediacapabilities.encodinginfo": {
|
||
"url": "$MDN_URL$/web/api/mediacapabilities/encodinginfo",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "101",
|
||
"ChromeAndroid": "101",
|
||
"Edge": "101",
|
||
"Firefox": "63",
|
||
"Opera": "87",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>MediaCapabilities.encodingInfo()</code></strong> method, part of the <a href=\"$MDN_URL$/Web/API/MediaCapabilities\"><code>MediaCapabilities</code></a> interface of the <a href=\"$MDN_URL$/Web/API/MediaCapabilities\">Media Capabilities API</a>, returns a promise with the tested media configuration's capabilities information.\nThis contains the three boolean properties <code>supported</code>, <code>smooth</code>, and <code>powerefficient</code>, which describe how compatible the device is with the type of media.",
|
||
"parameters": {
|
||
"configuration": "An object with a property <code>type</code> and <em>either</em> a <code>video</code> or <code>audio</code> property containing a configuration of the appropriate type: <dl> <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt> <dd> <p>The type of media being tested. This takes one of two values: <dl> <dt id=\"record\"><a href=\"#record\"><code>record</code></a></dt> <dd> <p>Represents a configuration for recording of media, e.g. using <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a>. </dd> <dt id=\"webrtc\"><a href=\"#webrtc\"><code>webrtc</code></a></dt> <dd> <p>Represents a configuration meant to be transmitted over electronic means (e.g. using <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>). <strong>Note:</strong> Firefox uses <code>transmission</code> for this type, and <code>webrtc</code> does not work. </dd> <dt id=\"transmission\"><a href=\"#transmission\"><code>transmission</code></a> </dt> <dd> <p>The synonym of <code>webrtc</code> to be used in Firefox. </dd> </dl> </dd> <dt id=\"video\"><a href=\"#video\"><code>video</code></a></dt> <dd> <p>Configuration object for a video media source. This has the following properties: <dl> <dt id=\"contenttype\"><a href=\"#contenttype\"><code>contentType</code></a></dt> <dd> <p>String containing a valid video MIME type, and (optionally) a <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\"><code>codecs</code> parameter</a>. </dd> <dt id=\"width\"><a href=\"#width\"><code>width</code></a></dt> <dd> <p>The width of the video. </dd> <dt id=\"height\"><a href=\"#height\"><code>height</code></a></dt> <dd> <p>The height of the video. </dd> <dt id=\"bitrate\"><a href=\"#bitrate\"><code>bitrate</code></a></dt> <dd> <p>The number of bits used to encode one second of the video file. </dd> <dt id=\"framerate\"><a href=\"#framerate\"><code>framerate</code></a></dt> <dd> <p>The number of frames making up one second of video playback. </dd> </dl> </dd> <dt id=\"audio\"><a href=\"#audio\"><code>audio</code></a></dt> <dd> <p>Configuration object for an audio media source. This has the following properties: <dl> <dt id=\"contenttype_2\"><a href=\"#contenttype_2\"><code>contentType</code></a></dt> <dd> <p>String containing a valid audio MIME type, and (optionally) a <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\"><code>codecs</code> parameter</a>. </dd> <dt id=\"channels\"><a href=\"#channels\"><code>channels</code></a></dt> <dd> <p>The number of channels used by the audio track. </dd> <dt id=\"bitrate_2\"><a href=\"#bitrate_2\"><code>bitrate</code></a></dt> <dd> <p>The number of bits used to encode one second of the audio file. </dd> <dt id=\"samplerate\"><a href=\"#samplerate\"><code>samplerate</code></a></dt> <dd> <p>The number of audio samples making up one second of the audio file. </dd> </dl> </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> fulfilling with an object containing three Boolean attributes:\n<dl>\n <dt id=\"supported\"><a href=\"#supported\"><code>supported</code></a></dt>\n <dd>\n <p><code>true</code> if the media content can be decoded at all. Otherwise, it is <code>false</code>.\n </dd>\n <dt id=\"smooth\"><a href=\"#smooth\"><code>smooth</code></a></dt>\n <dd>\n <p><code>true</code> if playback of the media will be smooth (of high quality). Otherwise it is <code>false</code>.\n </dd>\n <dt id=\"powerefficient\"><a href=\"#powerefficient\"><code>powerEfficient</code></a></dt>\n <dd>\n <p><code>true</code> if playback of the media will be power efficient. Otherwise, it is <code>false</code>.\n </dd>\n</dl>\n<p>Browsers will report a supported media configuration as <code>smooth</code> and <code>powerEfficient</code> until stats on this device have been recorded.\n All supported audio codecs are reported to be power efficient.",
|
||
"throws": {
|
||
"TypeError": "Thrown if the <code>configuration</code> passed to the <code>encodingInfo()</code> method is invalid, which may be for any of the following reasons: <ul> <li>the type is not video or audio,</li> <li>the <code>contentType</code> is not a valid codec MIME type,</li> <li>there is some other error in the media configuration passed to the method, including omitting any of the <code>configuration</code> elements.</li> </ul>"
|
||
}
|
||
},
|
||
"mediadeviceinfo": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "14",
|
||
"Firefox": "39",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MediaDeviceInfo</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> contains information that describes a single media input or output device.\n<p>The list of devices obtained by calling <a href=\"$MDN_URL$/Web/API/MediaDevices/enumerateDevices\" ><code>navigator.mediaDevices.enumerateDevices()</code></a> is an array of <code>MediaDeviceInfo</code> objects, one per media device."
|
||
},
|
||
"mediadeviceinfo.deviceid": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo/deviceid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "14",
|
||
"Firefox": "39",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>deviceId</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> interface returns a string\nthat is an identifier for the represented device and is persisted across\nsessions.\n<p>It is un-guessable by other applications, and unique to the origin of\nthe calling application. It is reset when the user clears cookies. For private browsing,\na different identifier is used that is not persisted across sessions."
|
||
},
|
||
"mediadeviceinfo.groupid": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo/groupid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "14",
|
||
"Firefox": "39",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>groupId</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> interface returns a string that\nis a group identifier.\n<p>Two devices have the same group identifier if they\nbelong to the same physical device; for example, a monitor with both a built-in camera\nand microphone."
|
||
},
|
||
"mediadeviceinfo.kind": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo/kind",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "14",
|
||
"Firefox": "39",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>kind</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> interface returns an enumerated value, that is\neither <code>\"videoinput\"</code>, <code>\"audioinput\"</code> or <code>\"audiooutput\"</code>."
|
||
},
|
||
"mediadeviceinfo.label": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo/label",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "14",
|
||
"Firefox": "39",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>label</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> interface returns a\nstring describing this device (for example\n\"External USB Webcam\").\n<p>Only available during active <code>MediaStream</code>\nuse, or when persistent permissions have been granted."
|
||
},
|
||
"mediadeviceinfo.tojson": {
|
||
"url": "$MDN_URL$/web/api/mediadeviceinfo/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "18",
|
||
"Firefox": "42",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> object."
|
||
},
|
||
"mediadevices": {
|
||
"url": "$MDN_URL$/web/api/mediadevices",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "",
|
||
"Firefox": "33",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaDevices</code></strong> interface provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data."
|
||
},
|
||
"mediadevices.enumeratedevices": {
|
||
"url": "$MDN_URL$/web/api/mediadevices/enumeratedevices",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "",
|
||
"Firefox": "116",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> method <strong><code>enumerateDevices()</code></strong> requests a list of the currently available media input and output devices, such as microphones, cameras, headsets, and so forth.\nThe returned <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> is resolved with an array of <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> objects describing the devices.\n<p>The returned list will omit any devices that are blocked by the document <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy\">Permission Policy</a>: <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/microphone\"><code>microphone</code></a>, <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/camera\"><code>camera</code></a>, <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/speaker-selection\"><code>speaker-selection</code></a> (for output devices), and so on.\nAccess to particular non-default devices is also gated by the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a>, and the list will omit devices for which the user has not granted explicit permission.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that is fulfilled with an array of <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> objects.\n Each object in the array describes one of the available media input and output devices.\n The order is significant — the default capture devices will be listed first.\n<p>Other than default devices, only devices for which permission has been granted are \"available\".\n<p>If enumeration fails, the promise is rejected."
|
||
},
|
||
"mediadevices.getdisplaymedia": {
|
||
"url": "$MDN_URL$/web/api/mediadevices/getdisplaymedia",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "72",
|
||
"Edge": "79",
|
||
"Firefox": "66",
|
||
"Opera": "60",
|
||
"Safari": "13"
|
||
},
|
||
"doc": "The <strong><code>getDisplayMedia()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> interface prompts the user to select and\ngrant permission to capture the contents of a display or portion thereof (such as a window) as a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>.\n<p>The resulting stream can then be\nrecorded using the <a href=\"$MDN_URL$/Web/API/MediaStream_Recording_API\">MediaStream Recording API</a> or transmitted as part of a <a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> session.\n<p>See <a href=\"$MDN_URL$/Web/API/Screen_Capture_API/Using_Screen_Capture\">Using the Screen Capture API</a> for more details and an example.",
|
||
"parameters": {
|
||
"options": "An optional object specifying requirements for the returned <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>. The options for <code>getDisplayMedia()</code> work in the same as the <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia#parameters\">constraints</a> for the <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\"><code>MediaDevices.getUserMedia()</code></a> method, although in that case only <code>audio</code> and <code>video</code> can be specified. The list of possible option properties for <code>getDisplayMedia()</code> is as follows: <dl> <dt id=\"video\"><a href=\"#video\"><code>video</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean or a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> instance; the default value is <code>true</code>. If this option is omitted or set to <code>true</code>, the stream will contain a video track A value of <code>true</code> indicates that the returned <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> will contain a video track. Since <code>getDisplayMedia()</code> requires a video track, if this option is set to <code>false</code> the promise will reject with a <code>TypeError</code>. </dd> <dt id=\"audio\"><a href=\"#audio\"><code>audio</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean or a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> instance; the default value is <code>false</code>. A value of <code>true</code> indicates that the returned <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> will contain an audio track, if audio is supported and available for the display surface chosen by the user. </dd> <dt id=\"controller\"><a href=\"#controller\"><code>controller</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/CaptureController\"><code>CaptureController</code></a> object instance containing methods that can be used to further manipulate the capture session if included. </dd> <dt id=\"monitortypesurfaces\"><a href=\"#monitortypesurfaces\"><code>monitorTypeSurfaces</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value specifying whether the browser should offer entire screens in the screen capture options presented to the user alongside tab and window options. This option is intended to protect companies from leakage of private information through employee error when using video conferencing apps. Possible values are <code>include</code>, which hints that the browser should include screen options, and <code>exclude</code>, which hints that they should be excluded. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> You cannot set <code>monitorTypeSurfaces: \"exclude\"</code> at the same time as <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/displaySurface\"><code>displaySurface: \"monitor\"</code></a> as the two settings are contradictory. Trying to do so will result in the <code>getDisplayMedia()</code> call failing with a <code>TypeError</code>. </div> </dd> <dt id=\"prefercurrenttab\"><a href=\"#prefercurrenttab\"><code>preferCurrentTab</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean; a value of <code>true</code> instructs the browser to offer the current tab as the most prominent capture source, i.e. as a separate \"This Tab\" option in the \"Choose what to share\" options presented to the user. This is useful as many app types generally just want to share the current tab. For example, a slide deck app might want to let the user stream the current tab containing the presentation to a virtual conference. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. </dd> <dt id=\"selfbrowsersurface\"><a href=\"#selfbrowsersurface\"><code>selfBrowserSurface</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value specifying whether the browser should allow the user to select the current tab for capture. This helps to avoid the \"infinite hall of mirrors\" effect experienced when a video conferencing app inadvertently shares its own display. Possible values are <code>include</code>, which hints that the browser should include the current tab in the choices offered for capture, and <code>exclude</code>, which hints that it should be excluded. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. </dd> <dt id=\"surfaceswitching\"><a href=\"#surfaceswitching\"><code>surfaceSwitching</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value specifying whether the browser should display a control to allow the user to dynamically switch the shared tab during screen-sharing. This is much more convenient than having to go through the whole sharing process again each time a user wants to switch the shared tab. Possible values are <code>include</code>, which hints that the browser should include the control, and <code>exclude</code>, which hints that it should not be shown. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. </dd> <dt id=\"systemaudio\"><a href=\"#systemaudio\"><code>systemAudio</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value specifying whether the browser should include the system audio among the possible audio sources offered to the user. Possible values are <code>include</code>, which hints that the browser should include the system audio in the list of choices, and <code>exclude</code>, which hints that it should be excluded. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. </dd> <dt id=\"monitortypesurfaces_2\"><a href=\"#monitortypesurfaces_2\"><code>monitorTypeSurfaces</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value specifying whether the application would like the user agent to offer the user the option to choose display surfaces whose type is monitor. Possible values are <code>include</code>, which hints that the browser should include the display surfaces whose type is monitor, and <code>exclude</code>, which hints that it should be excluded. A default value is not mandated by the spec; see the <a href=\"#browser_compatibility\">Browser compatibility</a> section for browser-specific defaults. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> containing a\n video track whose contents come from a user-selected screen area, as well as an optional\n audio track.\n<div class=\"notecard note\" id=\"sect3\">\n <p><strong>Note:</strong> Browser support for audio tracks varies, both in terms of whether or not they're supported at all by the media recorder and in terms of the audio sources supported. Check the <a href=\"#browser_compatibility\">compatibility table</a> for details for each browser.\n</div>",
|
||
"throws": {
|
||
"AbortError DOMException": "Thrown if an error or failure does not match any of the other exceptions listed here.",
|
||
"InvalidStateError DOMException": "Thrown if the call to <code>getDisplayMedia()</code> was not made from code running due to a <a href=\"$MDN_URL$/Glossary/Transient_activation\">transient activation</a>, such as an event handler. Or if the browser context is not fully active or does not focused. Or if the <code>controller</code> options has been already used in creating another <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>.",
|
||
"NotAllowedError DOMException": "Thrown if the permission to access a screen area was denied by the user, or the current browsing instance is not permitted access to screen sharing (for example by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>).",
|
||
"NotFoundError DOMException": "Thrown if no sources of screen video are available for capture.",
|
||
"NotReadableError DOMException": "Thrown if the user selected a screen, window, tab, or another source of screen data, but a hardware or operating system level error or lockout occurred, preventing the sharing of the selected source.",
|
||
"OverconstrainedError DOMException": "Thrown if, after creating the stream, applying any specified constraints fails because no compatible stream could be generated.",
|
||
"TypeError": "Thrown if the specified <code>options</code> include values that are not permitted when calling <code>getDisplayMedia()</code>, for example a <code>video</code> property set to false, or if any specified <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> are not permitted. <code>min</code> and <code>exact</code> values are not permitted in constraints used in <code>getDisplayMedia()</code> calls."
|
||
}
|
||
},
|
||
"mediadevices.getsupportedconstraints": {
|
||
"url": "$MDN_URL$/web/api/mediadevices/getsupportedconstraints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "",
|
||
"Firefox": "44",
|
||
"Opera": "40",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The\n<strong><code>getSupportedConstraints()</code></strong>\nmethod of the <a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> interface returns an object based on the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary, whose member fields each\nspecify one of the constrainable properties the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> understands.",
|
||
"returns": "A new object based on the <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary\n listing the constraints supported by the user agent. Because only constraints supported\n by the user agent are included in the list, each of these Boolean properties has the\n value <code>true</code>."
|
||
},
|
||
"mediadevices.getusermedia": {
|
||
"url": "$MDN_URL$/web/api/mediadevices/getusermedia",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "",
|
||
"Firefox": "36",
|
||
"Opera": "40",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>getUserMedia()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> interface prompts the user for permission to use a media input which produces a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> with tracks containing the requested types of media.\n<p>That stream can include, for example, a video track (produced by either a hardware or virtual video source such as a camera, video recording device, screen sharing service, and so forth), an audio track (similarly, produced by a physical or virtual audio source like a microphone, A/D converter, or the like), and possibly other track types.\n<p>It returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> object.\nIf the user denies permission, or matching media is not available, then the promise is rejected with <code>NotAllowedError</code> or <code>NotFoundError</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> respectively.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> It's possible for the returned promise to <em>neither</em> resolve nor reject, as the user is not required to make a choice at all and may ignore the request.\n</div>",
|
||
"parameters": {
|
||
"constraints": "An object specifying the types of media to request, along with any requirements for each type. <p>The <code>constraints</code> parameter is an object with two members: <code>video</code> and <code>audio</code>, describing the media types requested. Either or both must be specified. If the browser cannot find all media tracks with the specified types that meet the constraints given, then the returned promise is rejected with <code>NotFoundError</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a>. <p>For both <code>video</code> and <code>audio</code>, its value is either a boolean or an object. The default value is <code>false</code>. <ul> <li>If <code>true</code> is specified for a media type, the resulting stream is <em>required</em> to have that type of track in it. If one cannot be included for any reason, the returned promise will reject.</li> <li>If <code>false</code> is specified for a media type, the resulting stream <em>must not</em> have that type of track, or the returned promise will reject. Because both <code>video</code> and <code>audio</code> default to <code>false</code>, if the <code>constraints</code> object contains neither property or if it's not present at all, the returned promise will always reject.</li> <li>If an object is specified for a media type, the object is read as a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary.</li> </ul>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> whose fulfillment handler receives a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>\n object when the requested media has successfully been obtained.",
|
||
"throws": {
|
||
"AbortError DOMException": "Although the user and operating system both granted access to the hardware device, and no hardware issues occurred that would cause a <code>NotReadableError</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a>, throw if some problem occurred which prevented the device from being used.",
|
||
"InvalidStateError DOMException": "Thrown if current document is not fully active.",
|
||
"NotAllowedError DOMException": "Thrown if one or more of the requested source devices cannot be used at this time. This will happen if the browsing context is insecure (that is, the page was loaded using HTTP rather than HTTPS). It also happens if the user has specified that the current browsing instance is not permitted access to the device, the user has denied access for the current session, or the user has denied all access to user media devices globally. On browsers that support managing media permissions with <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>, this error is returned if Permissions Policy is not configured to allow access to the input source(s). <div class=\"notecard note\" id=\"sect3\"> <p><strong>Note:</strong> Older versions of the specification used <code>SecurityError</code> for this instead; <code>SecurityError</code> has taken on a new meaning. </div>",
|
||
"NotFoundError DOMException": "Thrown if no media tracks of the type specified were found that satisfy the given constraints.",
|
||
"NotReadableError DOMException": "Thrown if, although the user granted permission to use the matching devices, a hardware error occurred at the operating system, browser, or Web page level which prevented access to the device.",
|
||
"OverconstrainedError DOMException": "Thrown if the specified constraints resulted in no candidate devices which met the criteria requested. The error is an object of type <code>OverconstrainedError</code>, and has a <code>constraint</code> property whose string value is the name of a constraint which was impossible to meet, and a <code>message</code> property containing a human-readable string explaining the problem. <div class=\"notecard note\" id=\"sect4\"> <p><strong>Note:</strong> Because this error can occur even when the user has not yet granted permission to use the underlying device, it can potentially be used as a <a href=\"$MDN_URL$/Glossary/Fingerprinting\">fingerprinting</a> surface. </div>",
|
||
"SecurityError DOMException": "Thrown if user media support is disabled on the <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> on which <code>getUserMedia()</code> was called. The mechanism by which user media support is enabled and disabled is left up to the individual user agent.",
|
||
"TypeError": "Thrown if the list of constraints specified is empty, or has all constraints set to <code>false</code>. This can also happen if you try to call <code>getUserMedia()</code> in an insecure context, since <a href=\"$MDN_URL$/Web/API/Navigator/mediaDevices\"><code>navigator.mediaDevices</code></a> is <code>undefined</code> in an insecure context."
|
||
}
|
||
},
|
||
"mediadevices.selectaudiooutput": {
|
||
"url": "$MDN_URL$/web/api/mediadevices/selectaudiooutput",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "116"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>MediaDevices.selectAudioOutput()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Audio_Output_Devices_API\">Audio Output Devices API</a> prompts the user to select an audio output device, such as a speaker or headset. If the user selects a device, the method grants user permission to use the selected device as an audio output sink.\n<p>Following selection, if the device is available it can be enumerated using <a href=\"$MDN_URL$/Web/API/MediaDevices/enumerateDevices\"><code>MediaDevices.enumerateDevices()</code></a> and set as the audio output sink using <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/setSinkId\"><code>HTMLMediaElement.setSinkId()</code></a>.\n<p>On success, the returned <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> is resolved with a <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> describing the selected device.",
|
||
"parameters": {
|
||
"options": "An object that configures what device(s) may be offered in the user prompt. <dl> <dt id=\"deviceid\"><a href=\"#deviceid\"><code>deviceId</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing the ID of a single previously exposed/permitted device. If not set, a prompt with all available audio output devices will be displayed. <p>The option is intended for applications that want to store a device id so that the same device can be used by default in future sessions. Note that the method may return a new ID for the same device, and that persisted ids <em>must be passed</em> through <code>selectAudioOutput()</code> successfully before they will work with <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/setSinkId\" ><code>setSinkId()</code></a>. <div class=\"notecard note\" id=\"sect3\"> <p><strong>Note:</strong> A user agent may choose to skip prompting the user if a specified non-null id was previously exposed to the user by <code>selectAudioOutput()</code> in an earlier session. In this case the user agent may simply resolve with this device id, or a new id for the same device if it has changed. If permission for the specified device was previously granted but has since been revoked, the user-agent might display all allowed devices, highlighting the one with the specified ID. </div> </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that is fulfilled with a <a href=\"$MDN_URL$/Web/API/MediaDeviceInfo\"><code>MediaDeviceInfo</code></a> object that describes the audio output device selected by the user.",
|
||
"throws": {
|
||
"NotAllowedError DOMException": "Returned if a <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/speaker-selection\"><code>speaker-selection</code></a> <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> is used to block use of audio outputs (in addition the popup for selecting an audio output won't be displayed), or the user closed the selection prompt without choosing a device.",
|
||
"NotFoundError DOMException": "Returned if there are no available audio output devices.",
|
||
"InvalidStateError DOMException": "Returned if there hasn't been a <a href=\"$MDN_URL$/Glossary/Transient_activation\">transient activation</a> (you must trigger it from some kind of UI event)."
|
||
}
|
||
},
|
||
"mediaelementaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediaelementaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "15",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>MediaElementAudioSourceNode</code> interface represents an audio source consisting of an HTML <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a> element. It is an <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio source.\n<p>A <code>MediaElementAudioSourceNode</code> has no inputs and exactly one output, and is created using the <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaElementSource\"><code>AudioContext.createMediaElementSource()</code></a> method. The number of channels in the output equals the number of channels of the audio referenced by the <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> used in the creation of the node, or is 1 if the <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> has no audio.\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>0</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td>2 (but note that <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> is only used for up-mixing and down-mixing <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> inputs, and <a href=\"$MDN_URL$/Web/API/MediaElementAudioSourceNode\" aria-current=\"page\"><code>MediaElementAudioSourceNode</code></a> doesn't have any input)</td>\n</tr>\n</tbody>\n</table></figure>"
|
||
},
|
||
"mediaelementaudiosourcenode.mediaelement": {
|
||
"url": "$MDN_URL$/web/api/mediaelementaudiosourcenode/mediaelement",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "15",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79",
|
||
"Firefox": "70",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a> interface's\nread-only <strong><code>mediaElement</code></strong> property indicates the\n<a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> that contains the audio track from which the node is\nreceiving audio.\n<p>This stream was specified when the node was first created,\neither using the <a href=\"$MDN_URL$/Web/API/MediaElementAudioSourceNode/MediaElementAudioSourceNode\" ><code>MediaElementAudioSourceNode()</code></a> constructor or the\n<a href=\"$MDN_URL$/Web/API/AudioContext/createMediaElementSource\"><code>AudioContext.createMediaElementSource()</code></a> method."
|
||
},
|
||
"mediaelementaudiosourcenode.mediaelementaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediaelementaudiosourcenode/mediaelementaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "42",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>MediaElementAudioSourceNode()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a> object instance.",
|
||
"parameters": {
|
||
"context": "An <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "An object defining the properties you want the <code>MediaElementAudioSourceNode</code> to have: <dl> <dt id=\"mediaelement\"><a href=\"#mediaelement\"><code>mediaElement</code></a></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> that will be used as the source for the audio. </dd> <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt> <dd> <p>An integer used to determine how many channels are used when <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> connections to any inputs to the node. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> for more information.) Its usage and precise definition depend on the value of <code>channelCountMode</code>. </dd> <dt id=\"channelcountmode\"><a href=\"#channelcountmode\"><code>channelCountMode</code></a></dt> <dd> <p>A string describing the way channels must be matched between the node's inputs and outputs. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> <dt id=\"channelinterpretation\"><a href=\"#channelinterpretation\"><code>channelInterpretation</code></a></dt> <dd> <p>A string describing the meaning of the channels. This interpretation will define how audio <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> will happen. The possible values are <code>\"speakers\"</code> or <code>\"discrete\"</code>. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelInterpretation\"><code>AudioNode.channelInterpretation</code></a> for more information including default values.) </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaElementAudioSourceNode\"><code>MediaElementAudioSourceNode</code></a> object instance."
|
||
},
|
||
"mediaencryptedevent": {
|
||
"url": "$MDN_URL$/web/api/mediaencryptedevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaEncryptedEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> contains the information associated with an <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/encrypted_event\" ><code>encrypted</code></a> event sent to a <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> when some initialization data is encountered in the media."
|
||
},
|
||
"mediaencryptedevent.initdata": {
|
||
"url": "$MDN_URL$/web/api/mediaencryptedevent/initdata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The read-only <strong><code>initData</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaKeyMessageEvent\"><code>MediaKeyMessageEvent</code></a> returns the initialization data contained in this event, if any."
|
||
},
|
||
"mediaencryptedevent.initdatatype": {
|
||
"url": "$MDN_URL$/web/api/mediaencryptedevent/initdatatype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The read-only <strong><code>initDataType</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaKeyMessageEvent\"><code>MediaKeyMessageEvent</code></a> returns a case-sensitive string describing the type of the initialization data associated with this event."
|
||
},
|
||
"mediaencryptedevent.mediaencryptedevent": {
|
||
"url": "$MDN_URL$/web/api/mediaencryptedevent/mediaencryptedevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaEncryptedEvent</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaEncryptedEvent\"><code>MediaEncryptedEvent</code></a> object.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> In normal cases, you don't need to call this constructor in your code as such events are usually generated by the browser when needed.\n</div>",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>encrypted</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"initdatatype\"><a href=\"#initdatatype\"><code>initDataType</code></a></dt> <dd> <p>A string with the type of the initialization data contained in this object </dd> <dt id=\"message\"><a href=\"#message\"><code>message</code></a></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> with the initialization data, or <code>null</code> if there is none. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaEncryptedEvent\"><code>MediaEncryptedEvent</code></a> object."
|
||
},
|
||
"mediaerror": {
|
||
"url": "$MDN_URL$/web/api/mediaerror",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "3",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "4",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2"
|
||
},
|
||
"doc": "The <strong><code>MediaError</code></strong> interface represents an error which occurred while handling media in an HTML media element based on <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a>, such as <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a>.\n<p>A <code>MediaError</code> object describes the error in general terms using a numeric <code>code</code> categorizing the kind of error, and a <code>message</code>, which provides specific diagnostics about what went wrong."
|
||
},
|
||
"mediaerror.code": {
|
||
"url": "$MDN_URL$/web/api/mediaerror/code",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "3",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2"
|
||
},
|
||
"doc": "The read-only property <strong><code>MediaError.code</code></strong> returns a numeric\nvalue which represents the kind of error that occurred on a media element. To get a text\nstring with specific diagnostic information, see <a href=\"$MDN_URL$/Web/API/MediaError/message\"><code>MediaError.message</code></a>."
|
||
},
|
||
"mediaerror.message": {
|
||
"url": "$MDN_URL$/web/api/mediaerror/message",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "52",
|
||
"Opera": "46",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The read-only property <strong><code>MediaError.message</code></strong> returns a\nhuman-readable string offering specific\ndiagnostic details related to the error described by the <code>MediaError</code> object,\nor an empty string (<code>\"\"</code>) if no diagnostic information can be determined or\nprovided."
|
||
},
|
||
"mediaerror.msextendedcode": {
|
||
"url": "$MDN_URL$/web/api/mediaerror/msextendedcode",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p>In the event of an error, the media element's error event will be fired. The element's error property will then contain an <strong><code>msExtendedCode</code></strong> read-only property with platform-specific error code information.\n<p><strong><code>msExtendedCode</code></strong> is a read-only proprietary property specific to Internet Explorer and Microsoft Edge."
|
||
},
|
||
"mediakeymessageevent": {
|
||
"url": "$MDN_URL$/web/api/mediakeymessageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeyMessageEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> contains the content and related data when the content decryption module generates a message for the session."
|
||
},
|
||
"mediakeymessageevent.mediakeymessageevent": {
|
||
"url": "$MDN_URL$/web/api/mediakeymessageevent/mediakeymessageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeyMessageEvent</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaKeyMessageEvent\"><code>MediaKeyMessageEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>message</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"messagetype\"><a href=\"#messagetype\"><code>messageType</code></a></dt> <dd> <p>A message type that allows applications to differentiate messages without parsing them. Allowed values are: <code>license-request</code>, <code>license-renewal</code>, <code>license-renewal</code>, or <code>individualization-request</code>. </dd> <dt id=\"message\"><a href=\"#message\"><code>message</code></a></dt> <dd> <p>An array containing the message generated by the content decryption module. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaKeyMessageEvent\"><code>MediaKeyMessageEvent</code></a> object."
|
||
},
|
||
"mediakeymessageevent.message": {
|
||
"url": "$MDN_URL$/web/api/mediakeymessageevent/message",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeyMessageEvent.message</code></strong> read-only property\nreturns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> with a message from the content decryption module.\nMessages vary by key system."
|
||
},
|
||
"mediakeymessageevent.messagetype": {
|
||
"url": "$MDN_URL$/web/api/mediakeymessageevent/messagetype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeyMessageEvent.messageType</code></strong> read-only property indicates the\ntype of message. It may be one of <code>license-request</code>,\n<code>license-renewal</code>, <code>license-release</code>, or\n<code>individualization-request</code>."
|
||
},
|
||
"mediakeys": {
|
||
"url": "$MDN_URL$/web/api/mediakeys",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeys</code></strong> interface of <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> represents a set of keys that an associated <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> can use for decryption of media data during playback."
|
||
},
|
||
"mediakeys.createsession": {
|
||
"url": "$MDN_URL$/web/api/mediakeys/createsession",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeys.createSession()</code> method returns a new\n<a href=\"$MDN_URL$/Web/API/MediaKeySession\"><code>MediaKeySession</code></a> object, which represents a context for message exchange\nwith a content decryption module (CDM).",
|
||
"parameters": {
|
||
"mediaKeySessionType": "A string. Either \"temporary\" or \"persistent-license\". The default value is \"temporary\"."
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaKeySession\"><code>MediaKeySession</code></a> object."
|
||
},
|
||
"mediakeys.setservercertificate": {
|
||
"url": "$MDN_URL$/web/api/mediakeys/setservercertificate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeys.setServerCertificate()</code></strong> method provides a\nserver certificate to be used to encrypt messages to the license server.",
|
||
"parameters": {
|
||
"serverCertificate": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, or a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a> object containing the server certificate. The contents are Key System-specific. It MUST NOT contain executable code."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a boolean. If the Key System implementation represented by this object's content decryption module's implementation value does not support server certificates, return a promise resolved with false."
|
||
},
|
||
"mediakeysession": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeySession</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> represents a context for message exchange with a content decryption module (CDM)."
|
||
},
|
||
"mediakeysession.close": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/close",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.close()</code> method notifies that the current media session\nis no longer needed, and that the content decryption module should release any resources\nassociated with this object and close it. Then, it returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>."
|
||
},
|
||
"mediakeysession.closed": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/closed",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.closed</code> read-only property returns a\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> signaling when a <a href=\"$MDN_URL$/Web/API/MediaKeySession\"><code>MediaKeySession</code></a> closes. This\npromise can only be fulfilled and is never rejected. Closing a session means that\nlicenses and keys associated with it are no longer valid for decrypting media data."
|
||
},
|
||
"mediakeysession.expiration": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/expiration",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeySession.expiration</code></strong> read-only property returns\nthe time after which the keys in the current session can no longer be used to decrypt\nmedia data, or NaN if no such time exists. This value is determined by the CDM and\nmeasured in milliseconds since January 1, 1970, UTC. This value may change during a\nsession lifetime, such as when an action triggers the start of a window."
|
||
},
|
||
"mediakeysession.generaterequest": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/generaterequest",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.generateRequest()</code> method returns a\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> after generating a media request based on initialization data.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>."
|
||
},
|
||
"mediakeysession.keystatuses": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/keystatuses",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeySession.keyStatuses</code></strong> read-only property\nreturns a reference to a read-only <a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> of the current\nsession's keys and their statuses."
|
||
},
|
||
"mediakeysession.load": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/load",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.load()</code> method returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that\nresolves to a boolean value after loading data for a specified session object.",
|
||
"parameters": {
|
||
"sessionId": "A unique string generated by the content description module for the current media object and its associated keys or licenses."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a boolean indicating whether the load\n succeeded or failed."
|
||
},
|
||
"mediakeysession.remove": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/remove",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.remove()</code> method returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> after removing any session data associated with the current object.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediakeysession.sessionid": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/sessionid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeySession.sessionId</code></strong> is a read-only property\nthat contains a unique string generated by the content decryption module (CDM) for the\ncurrent media object and its associated keys or licenses."
|
||
},
|
||
"mediakeysession.update": {
|
||
"url": "$MDN_URL$/web/api/mediakeysession/update",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySession.update()</code> method loads messages and licenses to the\nCDM, and then returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> .",
|
||
"parameters": {
|
||
"response": "An instance that is either an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, or a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>."
|
||
},
|
||
"mediakeystatusmap": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeyStatusMap</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> is a read-only map of media key statuses by key IDs."
|
||
},
|
||
"mediakeystatusmap.entries": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/entries",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "16",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>entries()</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns a new Iterator object,\ncontaining an array of [key, value] pairs for each element in the status map, in\ninsertion order.",
|
||
"returns": ""
|
||
},
|
||
"mediakeystatusmap.foreach": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/foreach",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "47",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>forEach</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface calls callback once for each key-value pair\nin the status map, in insertion order. If an argument is present it will be passed to\nthe callback.",
|
||
"parameters": {
|
||
"callbackFn": "Function to execute for each element, taking three arguments: <dl> <dt id=\"currentvalue\"><a href=\"#currentvalue\"><code>currentValue</code></a></dt> <dd> <p>The current element being processed in the array. </dd> <dt id=\"index\"><a href=\"#index\"><code>index</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The index of the current element being processed in the array. </dd> <dt id=\"array\"><a href=\"#array\"><code>array</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Which array <code>forEach()</code> is being applied to. </dd> </dl>",
|
||
"thisArg": "Value used as <code>this</code> when executing <code>callback</code>."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediakeystatusmap.get": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/get",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "45",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>get</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns the value associated with the given\nkey, or <code>undefined</code> if there is none.",
|
||
"parameters": {
|
||
"key": "The key whose value you want returned."
|
||
},
|
||
"returns": "The value associated with the given key, or <code>undefined</code>."
|
||
},
|
||
"mediakeystatusmap.has": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/has",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "45",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>has</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a>, asserting\nwhether a value has been associated with the given key.",
|
||
"parameters": {
|
||
"key": "The key whose value you want returned"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a>."
|
||
},
|
||
"mediakeystatusmap.keys": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/keys",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "16",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>keys</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns a new Iterator object, containing\nkeys for each element in the status map, in insertion order.",
|
||
"returns": "A new iterator."
|
||
},
|
||
"mediakeystatusmap.size": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/size",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>size</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns the number of key/value paIrs\nin the status map."
|
||
},
|
||
"mediakeystatusmap.values": {
|
||
"url": "$MDN_URL$/web/api/mediakeystatusmap/values",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "16",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>values</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaKeyStatusMap\"><code>MediaKeyStatusMap</code></a> interface returns a new Iterator object, containing\nvalues for each element in the status map, in insertion order.",
|
||
"returns": "A new iterator."
|
||
},
|
||
"mediakeysystemaccess": {
|
||
"url": "$MDN_URL$/web/api/mediakeysystemaccess",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MediaKeySystemAccess</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a> provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the <a href=\"$MDN_URL$/Web/API/Navigator/requestMediaKeySystemAccess\" ><code>Navigator.requestMediaKeySystemAccess()</code></a> method."
|
||
},
|
||
"mediakeysystemaccess.createmediakeys": {
|
||
"url": "$MDN_URL$/web/api/mediakeysystemaccess/createmediakeys",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySystemAccess.createMediaKeys()</code> method returns a\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a new <a href=\"$MDN_URL$/Web/API/MediaKeys\"><code>MediaKeys</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>."
|
||
},
|
||
"mediakeysystemaccess.getconfiguration": {
|
||
"url": "$MDN_URL$/web/api/mediakeysystemaccess/getconfiguration",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "43",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySystemAccess.getConfiguration()</code> method returns an object with the supported combination of\nthe following configuration options:\n<dl>\n<dt id=\"initdatatypes\"><a href=\"#initdatatypes\"><code>initDataTypes</code></a> <span class=\"badge inline readonly\">Read only </span></dt>\n<dd>\n<p>Returns a list of supported initialization data type names. An initialization data type is a string indicating the format of the initialization data.\n</dd>\n<dt id=\"audiocapabilities\"><a href=\"#audiocapabilities\"><code>audioCapabilities</code></a> <span class=\"badge inline readonly\">Read only </span></dt>\n<dd>\n<p>Returns a list of supported audio type and capability pairs.\n</dd>\n<dt id=\"videocapabilities\"><a href=\"#videocapabilities\"><code>videoCapabilities</code></a> <span class=\"badge inline readonly\">Read only </span></dt>\n<dd>\n<p>Returns a list of supported video type and capability pairs.\n</dd>\n<dt id=\"distinctiveidentifier\"><a href=\"#distinctiveidentifier\"><code>distinctiveIdentifier</code></a> <span class=\"badge inline readonly\">Read only </span></dt>\n<dd>\n<p>Indicates whether a persistent distinctive identifier is required.\n</dd>\n<dt id=\"persistentstate\"><a href=\"#persistentstate\"><code>persistentState</code></a> <span class=\"badge inline readonly\">Read only </span></dt>\n<dd>\n<p>Indicates whether the ability to persist state is required.\n</dd>\n</dl>",
|
||
"returns": "An object."
|
||
},
|
||
"mediakeysystemaccess.keysystem": {
|
||
"url": "$MDN_URL$/web/api/mediakeysystemaccess/keysystem",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <code>MediaKeySystemAccess.keySystem</code> read-only property returns a\nstring identifying the key system being used."
|
||
},
|
||
"medialist": {
|
||
"url": "$MDN_URL$/web/api/medialist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MediaList</code></strong> interface represents the media queries of a stylesheet, e.g. those set using a <a href=\"$MDN_URL$/Web/HTML/Element/link\"><code><link></code></a> element's <code>media</code> attribute.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> <code>MediaList</code> is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document.\n</div>"
|
||
},
|
||
"medialist.appendmedium": {
|
||
"url": "$MDN_URL$/web/api/medialist/appendmedium",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <code>appendMedium()</code> method of the <a href=\"$MDN_URL$/Web/API/MediaList\"><code>MediaList</code></a> interface adds a media query to the list. If the media query is already in the collection, this method does nothing.",
|
||
"parameters": {
|
||
"medium": "A string containing the media query to add."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\">undefined</a>)."
|
||
},
|
||
"medialist.deletemedium": {
|
||
"url": "$MDN_URL$/web/api/medialist/deletemedium",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <code>deleteMedium()</code> method of the <a href=\"$MDN_URL$/Web/API/MediaList\"><code>MediaList</code></a> interface removes from this <code>MediaList</code> the given media query.",
|
||
"parameters": {
|
||
"medium": "A string containing the media query to remove from the list."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\">undefined</a>).",
|
||
"throws": {
|
||
"NotFoundError DOMException": "Thrown when the media query to remove is not in the list."
|
||
}
|
||
},
|
||
"medialist.item": {
|
||
"url": "$MDN_URL$/web/api/medialist/item",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>item()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaList\"><code>MediaList</code></a> interface returns the media query at the specified <code>index</code>, or <code>null</code> if the specified <code>index</code> doesn't exist.",
|
||
"parameters": {
|
||
"index": "An integer."
|
||
},
|
||
"returns": "If the bracket (<code>[]</code>) syntax is used and there is no entry for the given index, <code>undefined</code> is returned."
|
||
},
|
||
"medialist.length": {
|
||
"url": "$MDN_URL$/web/api/medialist/length",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>length</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaList\"><code>MediaList</code></a> interface returns the number of media queries in the list."
|
||
},
|
||
"medialist.mediatext": {
|
||
"url": "$MDN_URL$/web/api/medialist/mediatext",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>mediaText</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaList\"><code>MediaList</code></a>\ninterface is a <a href=\"$MDN_URL$/Glossary/Stringifier\">stringifier</a> that returns a string representing the\n<code>MediaList</code> as text, and also allows you to set a new <code>MediaList</code>."
|
||
},
|
||
"mediametadata": {
|
||
"url": "$MDN_URL$/web/api/mediametadata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>MediaMetadata</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Session_API\">Media Session API</a> allows a web page to provide rich media metadata for display in a platform UI."
|
||
},
|
||
"mediametadata.album": {
|
||
"url": "$MDN_URL$/web/api/mediametadata/album",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>album</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetaData</code></a> interface returns or sets the name of the album or\ncollection containing the media to be played."
|
||
},
|
||
"mediametadata.artist": {
|
||
"url": "$MDN_URL$/web/api/mediametadata/artist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>artist</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetaData</code></a> interface returns or sets the name of the artist, group,\ncreator, etc., of the media to be played."
|
||
},
|
||
"mediametadata.artwork": {
|
||
"url": "$MDN_URL$/web/api/mediametadata/artwork",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>artwork</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetaData</code></a> interface returns or sets an array of\nobjects representing images associated with playing\nmedia."
|
||
},
|
||
"mediametadata.mediametadata": {
|
||
"url": "$MDN_URL$/web/api/mediametadata/mediametadata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>MediaMetadata()</code></strong> constructor creates a new\n<a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetadata</code></a> object.",
|
||
"parameters": {
|
||
"metadata": "The metadata parameters are as follows: <dl> <dt id=\"title\"><a href=\"#title\"><code>title</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The title of the media to be played. It defaults to the empty string (<code>\"\"</code>). </dd> <dt id=\"artist\"><a href=\"#artist\"><code>artist</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The name of the artist, group, creator, etc. of the media to be played. It defaults to the empty string (<code>\"\"</code>). </dd> <dt id=\"album\"><a href=\"#album\"><code>album</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The name of the album, or collection, containing the media to be played. It defaults to the empty string (<code>\"\"</code>). </dd> <dt id=\"artwork\"><a href=\"#artwork\"><code>artwork</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of objects that represent images associated with the playing media that defaults to be an empty array. The object structure is: <dl> <dt id=\"src\"><a href=\"#src\"><code>src</code></a></dt> <dd> <p>The URL from which the user agent fetches the image's data. </dd> <dt id=\"sizes\"><a href=\"#sizes\"><code>sizes</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Specifies the resource in multiple sizes so the user agent doesn't have to scale a single image. It defaults to the empty string (<code>\"\"</code>). </dd> <dt id=\"type\"><a href=\"#type\"><code>type</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The <a href=\"$MDN_URL$/Glossary/MIME_type\">MIME type</a> hint for the user agent that allows it to ignore images of types that it doesn't support. However, the user agent may still use MIME type sniffing after downloading the image to determine its type. It defaults to the empty string (<code>\"\"</code>). </dd> </dl> </dd> </dl>"
|
||
}
|
||
},
|
||
"mediametadata.title": {
|
||
"url": "$MDN_URL$/web/api/mediametadata/title",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>title</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetaData</code></a> interface returns or sets the title of the media to be\nplayed."
|
||
},
|
||
"mediaquerylist": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "9",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "6",
|
||
"Opera": "12.1",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5"
|
||
},
|
||
"doc": "A <strong><code>MediaQueryList</code></strong> object stores information on a <a href=\"$MDN_URL$/Web/CSS/CSS_media_queries\">media query</a> applied to a document, with support for both immediate and event-driven matching against the state of the document.\n<p>You can create a <code>MediaQueryList</code> by calling <a href=\"$MDN_URL$/Web/API/Window/matchMedia\" ><code>matchMedia()</code></a> on the <a href=\"$MDN_URL$/Web/API/Window\"><code>window</code></a> object. The resulting object handles sending notifications to listeners when the media query state changes (i.e. when the media query test starts or stops evaluating to <code>true</code>).\n<p>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."
|
||
},
|
||
"mediaquerylist.addlistener": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylist/addlistener",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "9",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "6",
|
||
"Opera": "12.1",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The deprecated <strong><code>addListener()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryList\"><code>MediaQueryList</code></a> interface adds a listener to the\n<code>MediaQueryListener</code> that will run a custom callback function in response to\nthe media query status changing.\n<p>In older browsers <code>MediaQueryList</code> did not yet inherit from <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a>,\nso this method was provided as an alias of <a href=\"$MDN_URL$/Web/API/EventTarget/addEventListener\"><code>EventTarget.addEventListener()</code></a>.\nUse <code>addEventListener()</code> instead of <code>addListener()</code> if it is\navailable in the browsers you need to support.",
|
||
"parameters": {
|
||
"func": "A function or function reference representing the callback function you want to run when the media query status changes."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediaquerylist.matches": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylist/matches",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "9",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "6",
|
||
"Opera": "12.1",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5"
|
||
},
|
||
"doc": "The <strong><code>matches</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryList\"><code>MediaQueryList</code></a> interface is a boolean value that returns\n<code>true</code> if the <a href=\"$MDN_URL$/Web/API/Document\"><code>document</code></a> currently matches the media query list,\nor <code>false</code> if not.\n<p>You can be notified when the value of <code>matches</code> changes by watching for the\n<a href=\"$MDN_URL$/Web/API/MediaQueryList/change_event\" ><code>change</code></a> event to be fired at the\n<code>MediaQueryList</code>."
|
||
},
|
||
"mediaquerylist.media": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylist/media",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "9",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "6",
|
||
"Opera": "12.1",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5"
|
||
},
|
||
"doc": "The <strong><code>media</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryList\"><code>MediaQueryList</code></a> interface is a string representing a\nserialized media query."
|
||
},
|
||
"mediaquerylist.removelistener": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylist/removelistener",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "9",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "6",
|
||
"Opera": "12.1",
|
||
"Safari": "5.1",
|
||
"SafariIOS": "5"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>removeListener()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryList\"><code>MediaQueryList</code></a> interface removes a listener from the\n<code>MediaQueryListener</code>.\n<p>In older browsers <code>MediaQueryList</code> did not yet inherit from <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a>,\nso this method was provided as an alias of <a href=\"$MDN_URL$/Web/API/EventTarget/removeEventListener\"><code>EventTarget.removeEventListener()</code></a>.\nUse <code>removeEventListener()</code> instead of <code>removeListener()</code> if it is\navailable in the browsers you need to support.",
|
||
"parameters": {
|
||
"func": "A function or function reference representing the callback function you want to remove."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediaquerylistevent": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylistevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "39",
|
||
"ChromeAndroid": "39",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "26",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <code>MediaQueryListEvent</code> object stores information on the changes that have happened to a <a href=\"$MDN_URL$/Web/API/MediaQueryList\"><code>MediaQueryList</code></a> object — instances are available as the event object on a function referenced by a <a href=\"$MDN_URL$/Web/API/MediaQueryList/change_event\" ><code>change</code></a> event."
|
||
},
|
||
"mediaquerylistevent.matches": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylistevent/matches",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "39",
|
||
"ChromeAndroid": "39",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "26",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>matches</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryListEvent\"><code>MediaQueryListEvent</code></a> interface is a boolean value that is\n<code>true</code> if the <a href=\"$MDN_URL$/Web/API/Document\"><code>document</code></a> currently matches the media query list,\nor <code>false</code> if not."
|
||
},
|
||
"mediaquerylistevent.media": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylistevent/media",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "39",
|
||
"ChromeAndroid": "39",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "26",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>media</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaQueryListEvent\"><code>MediaQueryListEvent</code></a> interface is a string representing\na serialized media query."
|
||
},
|
||
"mediaquerylistevent.mediaquerylistevent": {
|
||
"url": "$MDN_URL$/web/api/mediaquerylistevent/mediaquerylistevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "39",
|
||
"ChromeAndroid": "39",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "26",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>MediaQueryListEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaQueryListEvent\"><code>MediaQueryListEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>change</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"media\"><a href=\"#media\"><code>media</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing a serialized media query. It defaults to <code>\"\"</code>. </dd> <dt id=\"matches\"><a href=\"#matches\"><code>matches</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value representing the media query status; <code>true</code> if it matches, <code>false</code> if not. It defaults to <code>false</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaQueryListEvent\"><code>MediaQueryListEvent</code></a> object."
|
||
},
|
||
"mediarecorder": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>MediaRecorder</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/MediaStream_Recording_API\">MediaStream Recording API</a> provides functionality to easily record media. It is created using the <a href=\"$MDN_URL$/Web/API/MediaRecorder/MediaRecorder\" ><code>MediaRecorder()</code></a> constructor."
|
||
},
|
||
"mediarecorder.audiobitratemode": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/audiobitratemode",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "89",
|
||
"ChromeAndroid": "89",
|
||
"Edge": "89",
|
||
"Opera": "75"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>audioBitrateMode</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the bitrate mode used to encode audio tracks."
|
||
},
|
||
"mediarecorder.audiobitspersecond": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/audiobitspersecond",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "71",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>audioBitsPerSecond</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the audio encoding bit\nrate in use.\n<p>This may differ from the bit rate specified in the constructor (if\nit was provided)."
|
||
},
|
||
"mediarecorder.istypesupported": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/istypesupported_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>isTypeSupported()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a> which is <code>true</code> if the MIME media type specified is one the user agent should be able to successfully record.",
|
||
"parameters": {
|
||
"mimeType": "The MIME media type to check."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a>, <code>true</code> if the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> implementation is capable of recording <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> objects for the specified MIME type.\n Recording may still fail if there are insufficient resources to support the recording and encoding process.\n If the value is <code>false</code>, the user agent is incapable of recording the specified format."
|
||
},
|
||
"mediarecorder.mediarecorder": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/mediarecorder",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>MediaRecorder()</code></strong> constructor\ncreates a new <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> object that will record a specified\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>.\n<p>The object can optionally be configured to record\nusing a specific media container (file type), and, further, can specify the exact codec\nand codec configuration(s) to use by specifying <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\">the <code>codecs</code> parameter</a>.",
|
||
"parameters": {
|
||
"stream": "The <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> that will be recorded. This source media can come from a stream created using <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>navigator.mediaDevices.getUserMedia()</code></a> or from an <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element.",
|
||
"options": "A dictionary object that can contain the following properties: <dl> <dt id=\"mimetype\"><a href=\"#mimetype\"><code>mimeType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A MIME type specifying the format for the resulting media; you may specify the container format (the browser will select its preferred codecs for audio and/or video), or you may <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\">use the <code>codecs</code> parameter</a> and/or the <code>profiles</code> parameter to provide detailed information about which codecs to use and how to configure them. Applications can check in advance if a <code>mimeType</code> is supported by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> by calling <a href=\"$MDN_URL$/Web/API/MediaRecorder/isTypeSupported_static\" ><code>MediaRecorder.isTypeSupported()</code></a>. Defaults to an empty string. </dd> <dt id=\"audiobitspersecond\"><a href=\"#audiobitspersecond\"><code>audioBitsPerSecond</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The chosen bitrate for the audio component of the media. </dd> <dt id=\"videobitspersecond\"><a href=\"#videobitspersecond\"><code>videoBitsPerSecond</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The chosen bitrate for the video component of the media. </dd> <dt id=\"bitspersecond\"><a href=\"#bitspersecond\"><code>bitsPerSecond</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The chosen bitrate for the audio and video components of the media. This can be specified instead of the above two properties. If this is specified along with one or the other of the above properties, this will be used for the one that isn't specified. </dd> <dt id=\"audiobitratemode\"><a href=\"#audiobitratemode\"><code>audioBitrateMode</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The bitrate mode that should be used to encode the audio. Can be <code>constant</code>, which indicates that the recorder should encode at a constant bitrate, or <code>variable</code>, which indicates that the recorder should encode using a variable bitrate, thus allowing more space to be used for complex signals and less space for less-complex signals. Defaults to <code>variable</code>. </dd> <dt id=\"videokeyframeintervalduration\"><a href=\"#videokeyframeintervalduration\"><code>videoKeyFrameIntervalDuration</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The nominal interval in time between key frames in the encoded video stream. The <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> controls key-frame generation based on this option and the <code>videoKeyFrameIntervalCount</code> option. </dd> <dt id=\"videokeyframeintervalcount\"><a href=\"#videokeyframeintervalcount\"><code>videoKeyFrameIntervalCount</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The interval in number of frames between key frames in the encoded video stream. The <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> controls key-frame generation considering this option as well as <code>videoKeyFrameIntervalDuration</code> option. </dd> </dl> <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> If bits per second values are not specified for video and/or audio, the default adopted for video is 2.5Mbps, while the audio default is adaptive, depending upon the sample rate and the number of channels. </div> <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> Video resolution, frame rate and similar settings are specified as constraints when calling <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>, not here in the MediaStream Recording API. </div>"
|
||
},
|
||
"throws": {
|
||
"NotSupportedError DOMException": "Thrown if the specified MIME type is not supported by the user agent."
|
||
}
|
||
},
|
||
"mediarecorder.mimetype": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/mimetype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>mimeType</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the <a href=\"$MDN_URL$/Glossary/MIME\">MIME</a> media type that was specified when creating the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> object, or, if none was specified, which was chosen by the browser.\nThis is the file format of the file that would result from writing all of the recorded data to disk.\n<p>Keep in mind that not all codecs are supported by a given container; if you write media using a codec that is not supported by a given media container, the resulting file may not work reliably if at all when you try to play it back.\nSee our <a href=\"$MDN_URL$/Web/Media/Formats\">media type and format guide</a> for information about container and codec support across browsers.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The term \"MIME type\" is officially considered to be historical; these strings are now officially known as <strong>media types</strong>.\nMDN Web Docs content uses the terms interchangeably.\n</div>"
|
||
},
|
||
"mediarecorder.pause": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/pause",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>pause()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface is used\nto pause recording of media streams.\n<p>When a <code>MediaRecorder</code> object's <code>pause()</code>method is called, the\nbrowser queues a task that runs the below steps:\n<ol>\n<li>\nIf <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is \"inactive\", raise a DOM\n<code>InvalidState</code> error and terminate these steps. If not, continue to the\nnext step.\n</li>\n<li>Set <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> to \"paused\".</li>\n<li>\nStop gathering data into the current <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a>, but keep it available so\nthat recording can be resumed later on.\n</li>\n<li>Raise a <a href=\"$MDN_URL$/Web/API/MediaRecorder/pause_event\" ><code>pause</code></a> event.</li>\n</ol>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <code>MediaRecorder</code> is currently <code>\"inactive\"</code>; you cannot pause the recording if the <code>MediaRecorder</code> is not active. If you call <code>pause()</code> while already paused, the method silently does nothing."
|
||
}
|
||
},
|
||
"mediarecorder.requestdata": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/requestdata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>requestData()</code></strong>\nmethod of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface is used to raise a <a href=\"$MDN_URL$/Web/API/MediaRecorder/dataavailable_event\" ><code>dataavailable</code></a> event containing a\n<a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> object of the captured media as it was when the method was\ncalled. This can then be grabbed and manipulated as you wish.\n<p>When the <code>requestData()</code> method is invoked, the browser queues a task that\nruns the following steps:\n<ol>\n<li>\nIf <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is \"inactive\", raise a DOM\n<code>InvalidState</code> error and terminate these steps. If\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is not \"inactive\", continue to the next step.\n</li>\n<li>\nRaise a <a href=\"$MDN_URL$/Web/API/MediaRecorder/dataavailable_event\" ><code>dataavailable</code></a> event containing a <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> of the\ncurrently captured data (the Blob is available under the event's <code>data</code>\nattribute.)\n</li>\n<li>Create a new Blob and place subsequently captured data into it.</li>\n</ol>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <code>MediaRecorder</code> is currently <code>\"inactive\"</code>; you cannot capture the recording if the <code>MediaRecorder</code> is not active."
|
||
}
|
||
},
|
||
"mediarecorder.resume": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/resume",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>resume()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface is used to resume media recording when it has been previously paused.\n<p>If <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is already \"recording\", calling <code>resume()</code> has no effect.\n<p>When the <code>resume()</code> method is invoked, the browser queues a task that runs\nthe following steps:\n<ol>\n<li>\nIf <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is \"inactive\", raise a DOM\n<code>InvalidStateError</code> exception and terminate these steps. If\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is not \"inactive\", continue to the next step.\n</li>\n<li>Set <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> to \"recording\".</li>\n<li>Continue gathering data into the current <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a>.</li>\n<li>Raise a <code>resume</code> event.</li>\n</ol>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <code>MediaRecorder</code> is currently <code>\"inactive\"</code>."
|
||
}
|
||
},
|
||
"mediarecorder.start": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/start",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>start()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface begins recording media into one or more <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> objects.\n<p>You can\nrecord the entire duration of the media into a single <code>Blob</code> (or until you\ncall <a href=\"$MDN_URL$/Web/API/MediaRecorder/requestData\" ><code>requestData()</code></a>), or you can specify the\nnumber of milliseconds to record at a time. Then, each time that amount of media has\nbeen recorded, an event will be delivered to let you act upon the recorded media, while\na new <code>Blob</code> is created to record the next slice of the media.\n<p>Assuming the <code>MediaRecorder</code>'s <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\" ><code>state</code></a>\nis <code>inactive</code>, <code>start()</code> sets the <code>state</code> to\n<code>recording</code>, then begins capturing media from the input stream. A\n<code>Blob</code> is created and the data is collected in it until the time slice period\nelapses or the source media ends. Each time a <code>Blob</code> is filled up to that\npoint (the timeslice duration or the end-of-media, if no slice duration was provided), a\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/dataavailable_event\" ><code>dataavailable</code></a> event is sent to the <code>MediaRecorder</code> with the\nrecorded data. If the source is still playing, a new <code>Blob</code> is created and\nrecording continues into that, and so forth.\n<p>When the source stream ends, <code>state</code> is set to <code>inactive</code> and\ndata gathering stops. A final <a href=\"$MDN_URL$/Web/API/MediaRecorder/dataavailable_event\" ><code>dataavailable</code></a> event is sent to the\n<code>MediaRecorder</code>, followed by a <a href=\"$MDN_URL$/Web/API/MediaRecorder/stop_event\" ><code>stop</code></a> event.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> If the browser is unable to start recording or continue\nrecording, it will raise an <a href=\"$MDN_URL$/Web/API/MediaRecorder/error_event\" ><code>error</code></a> event, followed by a\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/dataavailable_event\" ><code>dataavailable</code></a> event containing the <code>Blob</code> it\nhas gathered, followed by the <a href=\"$MDN_URL$/Web/API/MediaRecorder/stop_event\" ><code>stop</code></a> event.\n</div>",
|
||
"parameters": {
|
||
"timeslice": "The number of milliseconds to record into each <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a>. If this parameter isn't included, the entire media duration is recorded into a single <code>Blob</code> unless the <a href=\"$MDN_URL$/Web/API/MediaRecorder/requestData\" ><code>requestData()</code></a> method is called to obtain the <code>Blob</code> and trigger the creation of a new <code>Blob</code> into which the media continues to be recorded."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <code>MediaRecorder</code> is not in the <code>inactive</code> state; you cannot start recording media if it is already being recorded. See the <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\" ><code>state</code></a> property.",
|
||
"NotSupportedError DOMException": "Thrown if: <ul> <li>The media stream you are attempting to record is inactive.</li> <li>One or more of the stream's tracks is in a format that cannot be recorded using the current configuration</li> <li>The <code>videoKeyFrameIntervalDuration</code> and <code>videoKeyFrameIntervalCount</code> parameter are both specificed when creating the <code>MediaRecorder</code>.</li> </ul>",
|
||
"SecurityError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> is configured to disallow recording. This may be the case, for example, with sources obtained using <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> when the user denies permission to use an input device. This exception may also be delivered as an <a href=\"$MDN_URL$/Web/API/MediaRecorder/error_event\" ><code>error</code></a> event if the security options for the source media change after recording begins."
|
||
}
|
||
},
|
||
"mediarecorder.state": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/state",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>state</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the current state of the current <code>MediaRecorder</code> object."
|
||
},
|
||
"mediarecorder.stop": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/stop",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>stop()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface is\nused to stop media capture.\n<p>When the <code>stop()</code> method is invoked, the UA queues a task that runs the\nfollowing steps:\n<ol>\n<li>\nIf <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is \"inactive\", raise a DOM\n<code>InvalidState</code> error and terminate these steps. If the\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> is not \"inactive\", continue on to the next step.\n</li>\n<li>Set the <a href=\"$MDN_URL$/Web/API/MediaRecorder/state\"><code>MediaRecorder.state</code></a> to \"inactive\" and stop capturing media.</li>\n<li>\nRaise a <code>dataavailable</code> event containing the Blob of data that has been\ngathered.\n</li>\n<li>Raise a <code>stop</code> event.</li>\n</ol>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <code>MediaRecorder</code> is currently <code>\"inactive\"</code>; you cannot stop the recording if the <code>MediaRecorder</code> is not active."
|
||
}
|
||
},
|
||
"mediarecorder.stream": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/stream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "25",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>stream</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the stream that was passed into the <a href=\"$MDN_URL$/Web/API/MediaRecorder/MediaRecorder\" ><code>MediaRecorder()</code></a> constructor when the <code>MediaRecorder</code> was created."
|
||
},
|
||
"mediarecorder.videobitspersecond": {
|
||
"url": "$MDN_URL$/web/api/mediarecorder/videobitspersecond",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "71",
|
||
"Opera": "36",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>videoBitsPerSecond</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> interface returns the video encoding\nbit rate in use.\n<p>This may differ from the bit rate specified in the\nconstructor, if it was provided."
|
||
},
|
||
"mediarecordererrorevent": {
|
||
"url": "$MDN_URL$/web/api/mediarecordererrorevent",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "57",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MediaRecorderErrorEvent</code></strong> interface represents errors returned by the <a href=\"$MDN_URL$/Web/API/MediaStream_Recording_API\">MediaStream Recording API</a>. It is an <a href=\"$MDN_URL$/Web/API/Event\"><code>Event</code></a> object that encapsulates a reference to a <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> describing the error that occurred."
|
||
},
|
||
"mediarecordererrorevent.error": {
|
||
"url": "$MDN_URL$/web/api/mediarecordererrorevent/error",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "57",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>error</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaRecorderErrorEvent\"><code>MediaRecorderErrorEvent</code></a> interface is a\n<a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> object providing details about the exception that was thrown\nby a <a href=\"$MDN_URL$/Web/API/MediaRecorder\"><code>MediaRecorder</code></a> instance.\n<p>When a <code>MediaRecorderErrorEvent</code> occurs, you can determine to some extent\nwhat went wrong by examining the <code>error</code> property within the\n<code>MediaRecorderErrorEvent</code> received by the <code>MediaRecorder</code>'s\n<a href=\"$MDN_URL$/Web/API/MediaRecorder/error_event\" ><code>error</code></a> event handler, <a href=\"$MDN_URL$/Web/API/MediaRecorder/error_event\" ><code>onerror</code></a>."
|
||
},
|
||
"mediarecordererrorevent.mediarecordererrorevent": {
|
||
"url": "$MDN_URL$/web/api/mediarecordererrorevent/mediarecordererrorevent",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "57",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The\n<strong><code>MediaRecorderErrorEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaRecorderErrorEvent\"><code>MediaRecorderErrorEvent</code></a> object\nthat represents an error that occurred during the recording of media\nby the <a href=\"$MDN_URL$/Web/API/MediaStream_Recording_API\">MediaStream Recording API</a>.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> In general, you won't create these yourself; they are delivered to your\nimplementation of <a href=\"$MDN_URL$/Web/API/MediaRecorder/error_event\" ><code>onerror</code></a> when errors occur while\nrecording media.\n</div>",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>error</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"error\"><a href=\"#error\"><code>error</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> that describes the error that occurred. This object's <a href=\"$MDN_URL$/Web/API/DOMException/name\" ><code>name</code></a> property should indicate the name of the error that occurred. The other fields may or may not be present. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaRecorderErrorEvent\"><code>MediaRecorderErrorEvent</code></a> object."
|
||
},
|
||
"mediasession": {
|
||
"url": "$MDN_URL$/web/api/mediasession",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "60",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The <strong><code>MediaSession</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Session_API\">Media Session API</a> allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or operating system for presentation in standardized user interface elements.\n<p>For example, a smartphone might have a standard panel in its lock screen that provides controls for media playback and information display. A browser on the device can use <code>MediaSession</code> to make browser playback controllable from that standard/global user interface."
|
||
},
|
||
"mediasession.metadata": {
|
||
"url": "$MDN_URL$/web/api/mediasession/metadata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "60",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The <strong><code>metadata</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a>\ninterface contains a <a href=\"$MDN_URL$/Web/API/MediaMetadata\"><code>MediaMetadata</code></a> object providing descriptive\ninformation about the currently playing media, or <code>null</code> if the metadata has\nnot been set. This metadata is provided by the browser to the device for presentation in\nany standard media control user interface the device might offer."
|
||
},
|
||
"mediasession.playbackstate": {
|
||
"url": "$MDN_URL$/web/api/mediasession/playbackstate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "60",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The <strong><code>playbackState</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> interface indicates whether the current media session is\nplaying or paused."
|
||
},
|
||
"mediasession.setactionhandler": {
|
||
"url": "$MDN_URL$/web/api/mediasession/setactionhandler",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Opera": "60"
|
||
},
|
||
"doc": "The <strong><code>setActionHandler()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> interface sets a handler for a media session action.\nThese actions let a web app receive notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons.",
|
||
"parameters": {
|
||
"type": "A string representing an action type to listen for. It will be one of the following: <dl> <dt id=\"hangup\"><a href=\"#hangup\"><code>hangup</code></a></dt> <dd> <p>End a call. </dd> <dt id=\"nextslide\"><a href=\"#nextslide\"><code>nextslide</code></a></dt> <dd> <p>Moves to the next slide, when presenting a slide deck. </dd> <dt id=\"nexttrack\"><a href=\"#nexttrack\"><code>nexttrack</code></a></dt> <dd> <p>Advances playback to the next track. </dd> <dt id=\"pause\"><a href=\"#pause\"><code>pause</code></a></dt> <dd> <p>Pauses playback of the media. </dd> <dt id=\"play\"><a href=\"#play\"><code>play</code></a></dt> <dd> <p>Begins (or resumes) playback of the media. </dd> <dt id=\"previousslide\"><a href=\"#previousslide\"><code>previousslide</code></a></dt> <dd> <p>Moves to the previous slide, when presenting a slide deck. </dd> <dt id=\"previoustrack\"><a href=\"#previoustrack\"><code>previoustrack</code></a></dt> <dd> <p>Moves back to the previous track. </dd> <dt id=\"seekbackward\"><a href=\"#seekbackward\"><code>seekbackward</code></a></dt> <dd> <p>Seeks backward through the media from the current position. The <code>seekOffset</code> property passed to the callback specifies the amount of time to seek backward. </dd> <dt id=\"seekforward\"><a href=\"#seekforward\"><code>seekforward</code></a></dt> <dd> <p>Seeks forward from the current position through the media. The <code>seekOffset</code> property passed to the callback specifies the amount of time to seek forward. </dd> <dt id=\"seekto\"><a href=\"#seekto\"><code>seekto</code></a></dt> <dd> <p>Moves the playback position to the specified time within the media. The time to which to seek is specified in the <code>seekTime</code> property passed to the callback. If you intend to perform multiple <code>seekto</code> operations in rapid succession, you can also specify the <code>fastSeek</code> property passed to the callback with a value of <code>true</code>. This lets the browser know it can take steps to optimize repeated operations, and is likely to result in improved performance. </dd> <dt id=\"skipad\"><a href=\"#skipad\"><code>skipad</code></a></dt> <dd> <p>Skips past the currently playing advertisement or commercial. This action may or may not be available, depending on the platform and <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>, or may be disabled due to subscription level or other circumstances. </dd> <dt id=\"stop\"><a href=\"#stop\"><code>stop</code></a></dt> <dd> <p>Halts playback entirely. </dd> <dt id=\"togglecamera\"><a href=\"#togglecamera\"><code>togglecamera</code></a></dt> <dd> <p>Turn the user's active camera on or off. </dd> <dt id=\"togglemicrophone\"><a href=\"#togglemicrophone\"><code>togglemicrophone</code></a></dt> <dd> <p>Mute or unmute the user's microphone. </dd> </dl>",
|
||
"callback": "A function to call when the specified action type is invoked. The callback should not return a value. The callback receives a dictionary containing the following properties: <dl> <dt id=\"action\"><a href=\"#action\"><code>action</code></a></dt> <dd> <p>A string representing the action type. This property allows a single callback to handle multiple action types. </dd> <dt id=\"fastseek\"><a href=\"#fastseek\"><code>fastSeek</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A <a href=\"#seekto\"><code>seekto</code></a> action may <em>optionally</em> include this property, which is a Boolean value indicating whether or not to perform a \"fast\" seek. A \"fast\" seek is a seek being performed in a rapid sequence, such as when fast-forwarding or reversing through the media, rapidly skipping through it. This property can be used to indicate that you should use the shortest possible method to seek the media. <code>fastSeek</code> is not included on the final action in the seek sequence in this situation. </dd> <dt id=\"seekoffset\"><a href=\"#seekoffset\"><code>seekOffset</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>If the <code>action</code> is either <a href=\"#seekforward\"><code>seekforward</code></a> or <a href=\"#seekbackward\"><code>seekbackward</code></a> and this property is present, it is a floating point value which indicates the number of seconds to move the play position forward or backward. If this property isn't present, those actions should choose a reasonable default distance to skip forward or backward (such as 7 or 10 seconds). </dd> <dt id=\"seektime\"><a href=\"#seektime\"><code>seekTime</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>If the <code>action</code> is <a href=\"#seekto\"><code>seekto</code></a>, this property must be present and must be a floating-point value indicating the absolute time within the media to move the playback position to, where 0 indicates the beginning of the media. This property is not present for other action types. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediasession.setcameraactive": {
|
||
"url": "$MDN_URL$/web/api/mediasession/setcameraactive",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "93",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>setCameraActive()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> interface is used to indicate to the user agent whether the user's camera is considered to be active.\n<p>Call this method on the <code>navigator</code> object's\n<a href=\"$MDN_URL$/Web/API/Navigator/mediaSession\" ><code>mediaSession</code></a> object.\n<p>Note that the status of the camera is not tracked in the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> itself, but must be tracked separately.",
|
||
"parameters": {
|
||
"active": "A boolean indicating whether the camera is considered active or not."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediasession.setmicrophoneactive": {
|
||
"url": "$MDN_URL$/web/api/mediasession/setmicrophoneactive",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "93",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>setMicrophoneActive()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> interface is used to indicate to the user agent whether the user's microphone is considered to be currently muted.\n<p>Call this method on the <code>navigator</code> object's\n<a href=\"$MDN_URL$/Web/API/Navigator/mediaSession\" ><code>mediaSession</code></a> object.\n<p>Note that the status of the microphone is not tracked in the <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> itself, but must be tracked separately.",
|
||
"parameters": {
|
||
"active": "A boolean indicating whether the microphone is considered muted or not."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediasession.setpositionstate": {
|
||
"url": "$MDN_URL$/web/api/mediasession/setpositionstate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "81",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "81",
|
||
"Firefox": "82",
|
||
"Opera": "68",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The <strong><code>setPositionState()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a> interface is used to update the current\ndocument's media playback position and speed for presentation by user's device in any\nkind of interface that provides details about ongoing media. This can be\nparticularly useful if your code implements a player for type of media not directly\nsupported by the browser.\n<p>Call this method on the <code>navigator</code> object's\n<a href=\"$MDN_URL$/Web/API/Navigator/mediaSession\" ><code>mediaSession</code></a> object.",
|
||
"parameters": {
|
||
"stateDict": "An object providing updated information about the playback position and speed of the document's ongoing media. If the object is empty, the existing playback state information is cleared. This object can contain the following parameters: <dl> <dt id=\"duration\"><a href=\"#duration\"><code>duration</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A floating-point value giving the total duration of the current media in seconds. This should always be a positive number, with positive infinity (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Infinity\"><code>Infinity</code></a>) indicating media without a defined end, such as a live stream. </dd> <dt id=\"playbackrate\"><a href=\"#playbackrate\"><code>playbackRate</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A floating-point value indicating the rate at which the media is being played, as a ratio relative to its normal playback speed. Thus, a value of 1 is playing at normal 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. </dd> <dt id=\"position\"><a href=\"#position\"><code>position</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A floating-point value indicating the last reported playback position of the media in seconds. This must always be a positive value. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"TypeError": "This error can occur in an array of circumstances: <ul> <li>The specified object's <code>duration</code> is missing, negative, or <code>null</code>.</li> <li>Its <code>position</code> is either negative or greater than <code>duration</code>.</li> <li>Its <code>playbackRate</code> is zero.</li> </ul>"
|
||
}
|
||
},
|
||
"mediasource": {
|
||
"url": "$MDN_URL$/web/api/mediasource",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "31",
|
||
"ChromeAndroid": "31",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "18",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>MediaSource</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Source_Extensions_API\" >Media Source Extensions API</a> represents a source of media data for an <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> object. A <code>MediaSource</code> object can be attached to a <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> to be played in the user agent."
|
||
},
|
||
"mediasource.activesourcebuffers": {
|
||
"url": "$MDN_URL$/web/api/mediasource/activesourcebuffers",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>activeSourceBuffers</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/SourceBufferList\"><code>SourceBufferList</code></a> object\ncontaining a subset of the <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects contained within\n<a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\" ><code>sourceBuffers</code></a> — the list of objects\nproviding the selected video track, enabled audio tracks, and shown/hidden text tracks."
|
||
},
|
||
"mediasource.addsourcebuffer": {
|
||
"url": "$MDN_URL$/web/api/mediasource/addsourcebuffer",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>addSourceBuffer()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface creates a new <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> of the\ngiven <a href=\"$MDN_URL$/Glossary/MIME_type\">MIME type</a> and adds it to the <code>MediaSource</code>'s\n<a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\" ><code>sourceBuffers</code></a> list. The new\n<code>SourceBuffer</code> is also returned.",
|
||
"parameters": {
|
||
"mimeType": "A string specifying the MIME type of the <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> to create and add to the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a>."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> object representing the new source buffer that has been\n created and added to the media source.",
|
||
"throws": {
|
||
"InvalidAccessError DOMException": "Thrown if the value specified for <code>mimeType</code> is an empty string rather than a valid MIME type.",
|
||
"InvalidStateError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> is not in the <code>\"open\"</code> <a href=\"$MDN_URL$/Web/API/MediaSource/readyState\" ><code>readyState</code></a>.",
|
||
"NotSupportedError DOMException": "Thrown if the specified <code>mimeType</code> isn't supported by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>, or is not compatible with the MIME types of other <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects that are already included in the media source's <a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\" ><code>sourceBuffers</code></a> list.",
|
||
"QuotaExceededError DOMException": "Thrown if the user agent can't handle any more <code>SourceBuffer</code> objects, or creating a new <code>SourceBuffer</code> using the given <code>mimeType</code> would result in an <a href=\"https://w3c.github.io/media-source/#sourcebuffer-configuration\" class=\"external\" target=\"_blank\">unsupported configuration of <code>SourceBuffer</code>s</a>."
|
||
}
|
||
},
|
||
"mediasource.canconstructindedicatedworker": {
|
||
"url": "$MDN_URL$/web/api/mediasource/canconstructindedicatedworker_static",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "108",
|
||
"ChromeAndroid": "108",
|
||
"Edge": "108",
|
||
"Opera": "94"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>canConstructInDedicatedWorker</code></strong> static property of the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface returns <code>true</code> if <code>MediaSource</code> worker support is implemented, providing a low-latency feature detection mechanism.\n<p>If this were not available, the alternative would be a much higher latency approach such as attempting the creation of a <code>MediaSource</code> object from a dedicated worker and transferring the result back to the main thread."
|
||
},
|
||
"mediasource.clearliveseekablerange": {
|
||
"url": "$MDN_URL$/web/api/mediasource/clearliveseekablerange",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "62",
|
||
"ChromeAndroid": "62",
|
||
"Edge": "17",
|
||
"Firefox": "50",
|
||
"Opera": "49",
|
||
"Safari": "10.1"
|
||
},
|
||
"doc": "The <strong><code>clearLiveSeekableRange()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface clears a seekable range previously set with a call\nto <a href=\"$MDN_URL$/Web/API/MediaSource/setLiveSeekableRange\" ><code>setLiveSeekableRange()</code></a>.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediasource.duration": {
|
||
"url": "$MDN_URL$/web/api/mediasource/duration",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>duration</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a>\ninterface gets and sets the duration of the current media being presented.",
|
||
"throws": {
|
||
"InvalidAccessError DOMException": "Thrown if an attempt was made to set a duration value that was negative or <code>NaN</code>.",
|
||
"InvalidStateError DOMException": "Thrown if <a href=\"$MDN_URL$/Web/API/MediaSource/readyState\"><code>MediaSource.readyState</code></a> is not equal to <code>open</code>, or one or more of the <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects in <a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\"><code>MediaSource.sourceBuffers</code></a> are being updated (i.e. their <a href=\"$MDN_URL$/Web/API/SourceBuffer/updating\"><code>SourceBuffer.updating</code></a> property is <code>true</code>.)"
|
||
}
|
||
},
|
||
"mediasource.endofstream": {
|
||
"url": "$MDN_URL$/web/api/mediasource/endofstream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>endOfStream()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface signals the end of the stream.",
|
||
"parameters": {
|
||
"endOfStreamError": "A string representing an error to throw when the end of the stream is reached. The possible values are: <dl> <dt id=\"network\"><a href=\"#network\"><code>network</code></a></dt> <dd> <p>Terminates playback and signals that a network error has occurred. This can be used create a custom error handler related to media streams. For example, you might have a function that handles media chunk requests, separate from other network requests. When you make a <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a> request for a media chunk and receive a network error, you might want to call <code>endOfStream('network')</code>, display a descriptive message in the UI, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) </dd> <dt id=\"decode\"><a href=\"#decode\"><code>decode</code></a></dt> <dd> <p>Terminates playback and signals that a decoding error has occurred. This can be used to indicate that a parsing error has occurred while fetching media data; maybe the data is corrupt, or is encoded using a codec that the browser doesn't know how to decode. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if <a href=\"$MDN_URL$/Web/API/MediaSource/readyState\"><code>MediaSource.readyState</code></a> is not equal to <code>open</code>, or one or more of the <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects in <a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\"><code>MediaSource.sourceBuffers</code></a> are being updated (i.e. their <a href=\"$MDN_URL$/Web/API/SourceBuffer/updating\"><code>SourceBuffer.updating</code></a> property is <code>true</code>.)"
|
||
}
|
||
},
|
||
"mediasource.handle": {
|
||
"url": "$MDN_URL$/web/api/mediasource/handle",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "108",
|
||
"ChromeAndroid": "108",
|
||
"Edge": "108",
|
||
"Opera": "94"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>handle</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/MediaSourceHandle\"><code>MediaSourceHandle</code></a> object, a proxy for the <code>MediaSource</code> that can be transferred from a dedicated worker back to the main thread and attached to a media element via its <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/srcObject\"><code>HTMLMediaElement.srcObject</code></a> property.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> <code>handle</code> is only visible on <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> instances inside dedicated workers.\n</div>\n<p>Each <code>MediaSource</code> object created inside a dedicated worker has its own distinct <code>MediaSourceHandle</code>. The <code>handle</code> getter will always return the <code>MediaSourceHandle</code> instance specific to the associated dedicated worker <code>MediaSource</code> instance. If the handle has already been transferred to the main thread using <a href=\"$MDN_URL$/Web/API/DedicatedWorkerGlobalScope/postMessage\" ><code>postMessage()</code></a>, the handle instance in the worker is technically detached and can't be transferred again.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"mediasource.istypesupported": {
|
||
"url": "$MDN_URL$/web/api/mediasource/istypesupported_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>MediaSource.isTypeSupported()</code></strong> static method returns a boolean value which is <code>true</code> if the given MIME type and (optional) codec are <em>likely</em> to be supported by the current <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>.\n<p>That is, if it can successfully create <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects for that media type.\nIf the returned value is <code>false</code>, then the user agent is certain that it <em>cannot</em> access media of the specified format.",
|
||
"parameters": {
|
||
"type": "A string specifying the MIME type of the media and (optionally) a <a href=\"$MDN_URL$/Web/Media/Formats/codecs_parameter\"><code>codecs</code> parameter</a> containing a comma-separated list of the supported codecs."
|
||
},
|
||
"returns": "A value of <code>false</code> if the media of the given type will <em>not</em> play.\n<p>A value of <code>true</code> is returned if the browser can <em>probably</em> play media of the specified type.\n This is <em>not</em> a guarantee, and your code must be prepared for the possibility that the media will not play correctly if at all.\n<p>All web APIs that work with media files use a \"no/maybe/probably\" approach (or, in this case, \"no or probably\") when determining if a media type can be used.\n This is because media files are complex, intricate constructs with far too many subtle variations to be absolutely certain of anything until you actually use the contents of the media."
|
||
},
|
||
"mediasource.mediasource": {
|
||
"url": "$MDN_URL$/web/api/mediasource/mediasource",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "31",
|
||
"ChromeAndroid": "33",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>MediaSource()</code></strong> constructor of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface constructs and returns a new\n<code>MediaSource</code> object with no associated source buffers."
|
||
},
|
||
"mediasource.readystate": {
|
||
"url": "$MDN_URL$/web/api/mediasource/readystate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "33",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>readyState</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface returns an enum representing the state of the\ncurrent <code>MediaSource</code>. The three possible values are:\n<ul>\n<li><code>closed</code>: The source is not currently attached to a media element.</li>\n<li>\n<code>open</code>: The source is attached to a media element and ready to receive\n<a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects.\n</li>\n<li>\n<code>ended</code>: The source is attached to a media element but the stream has\nbeen ended via a call to <a href=\"$MDN_URL$/Web/API/MediaSource/endOfStream\"><code>MediaSource.endOfStream()</code></a>.\n</li>\n</ul>"
|
||
},
|
||
"mediasource.removesourcebuffer": {
|
||
"url": "$MDN_URL$/web/api/mediasource/removesourcebuffer",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>removeSourceBuffer()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface removes the given <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> from the <a href=\"$MDN_URL$/Web/API/SourceBufferList\"><code>SourceBufferList</code></a> associated with this <code>MediaSource</code> object.",
|
||
"parameters": {
|
||
"sourceBuffer": "The <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> object to be removed."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"NotFoundError DOMException": "Thrown if the supplied sourceBuffer doesn't exist in <a href=\"$MDN_URL$/Web/API/MediaSource/sourceBuffers\"><code>MediaSource.sourceBuffers</code></a>."
|
||
}
|
||
},
|
||
"mediasource.setliveseekablerange": {
|
||
"url": "$MDN_URL$/web/api/mediasource/setliveseekablerange",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "62",
|
||
"ChromeAndroid": "62",
|
||
"Edge": "17",
|
||
"Firefox": "50",
|
||
"Opera": "49",
|
||
"Safari": "10.1"
|
||
},
|
||
"doc": "The <strong><code>setLiveSeekableRange()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface sets the range that the user can seek to in the\nmedia element.",
|
||
"parameters": {
|
||
"start": "The start 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 <a href=\"$MDN_URL$/Web/API/TimeRanges\"><code>TimeRanges</code></a> object returned by the <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/seekable\"><code>HTMLMediaElement.seekable</code></a> property will have a start timestamp 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 <a href=\"$MDN_URL$/Web/API/TimeRanges\"><code>TimeRanges</code></a> object returned by the <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/seekable\"><code>HTMLMediaElement.seekable</code></a> property will have an end timestamp no less than this value."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediasource.sourcebuffers": {
|
||
"url": "$MDN_URL$/web/api/mediasource/sourcebuffers",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "42",
|
||
"Opera": "15",
|
||
"Safari": "8"
|
||
},
|
||
"doc": "The <strong><code>sourceBuffers</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/SourceBufferList\"><code>SourceBufferList</code></a> object\ncontaining the list of <a href=\"$MDN_URL$/Web/API/SourceBuffer\"><code>SourceBuffer</code></a> objects associated with this\n<code>MediaSource</code>."
|
||
},
|
||
"mediasourcehandle": {
|
||
"url": "$MDN_URL$/web/api/mediasourcehandle",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "108",
|
||
"ChromeAndroid": "108",
|
||
"Edge": "108",
|
||
"Opera": "94"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>MediaSourceHandle</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Source_Extensions_API\" >Media Source Extensions API</a> is a proxy for a <a href=\"$MDN_URL$/Web/API/MediaSource\"><code>MediaSource</code></a> that can be transferred from a dedicated worker back to the main thread and attached to a media element via its <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/srcObject\"><code>HTMLMediaElement.srcObject</code></a> property. <code>MediaSource</code> objects are not transferable because they are event targets, hence the need for <code>MediaSourceHandle</code>s.\n<p>It can be accessed via the <a href=\"$MDN_URL$/Web/API/MediaSource/handle\"><code>MediaSource.handle</code></a> property.\n<p>Each <code>MediaSource</code> object created inside a dedicated worker has its own distinct <code>MediaSourceHandle</code>. The <code>MediaSource.handle</code> getter will always return the <code>MediaSourceHandle</code> instance specific to the associated dedicated worker <code>MediaSource</code> instance. If the handle has already been transferred to the main thread using <a href=\"$MDN_URL$/Web/API/DedicatedWorkerGlobalScope/postMessage\" ><code>postMessage()</code></a>, the handle instance in the worker is technically detached and can't be transferred again.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"mediastream": {
|
||
"url": "$MDN_URL$/web/api/mediastream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "15",
|
||
"Opera": "42",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStream</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> represents a stream of media content. A stream consists of several <strong>tracks</strong>, such as video or audio tracks. Each track is specified as an instance of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>.\n<p>You can obtain a <code>MediaStream</code> object either by using the constructor or by calling functions such as <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\"><code>MediaDevices.getUserMedia()</code></a>, <a href=\"$MDN_URL$/Web/API/MediaDevices/getDisplayMedia\"><code>MediaDevices.getDisplayMedia()</code></a>, or <a href=\"$MDN_URL$/Web/API/HTMLCanvasElement/captureStream\"><code>HTMLCanvasElement.captureStream()</code></a> and <a href=\"$MDN_URL$/Web/API/HTMLMediaElement/captureStream\"><code>HTMLMediaElement.captureStream()</code></a>."
|
||
},
|
||
"mediastream.active": {
|
||
"url": "$MDN_URL$/web/api/mediastream/active",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "",
|
||
"Firefox": "52",
|
||
"Opera": "29",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>active</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface returns a Boolean value which is\n<code>true</code> if the stream is currently active; otherwise, it returns\n<code>false</code>. A stream is considered <strong>active</strong> if at least one of\nits <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>s does not have its property <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/readyState\"><code>MediaStreamTrack.readyState</code></a>\nset to <code>ended</code>. Once every track has ended, the stream's <code>active</code> property becomes\n<code>false</code>."
|
||
},
|
||
"mediastream.addtrack": {
|
||
"url": "$MDN_URL$/web/api/mediastream/addtrack",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "44",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>addTrack()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface adds a new track to the\nstream. The track is specified as a parameter of type <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> If the specified track is already in the stream's track set, this method has no\neffect.\n</div>",
|
||
"parameters": {
|
||
"track": "A <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> to add to the stream."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediastream.clone": {
|
||
"url": "$MDN_URL$/web/api/mediastream/clone",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "48",
|
||
"Opera": "22",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>clone()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>\ninterface creates a duplicate of the <code>MediaStream</code>. This new\n<code>MediaStream</code> object has a new unique <a href=\"$MDN_URL$/Web/API/MediaStream/id\" ><code>id</code></a> and\ncontains clones of every <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> contained by the\n<code>MediaStream</code> on which <code>clone()</code> was called.",
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> instance which has a new unique ID and contains clones\n of every <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> contained by the <code>MediaStream</code> on\n which <code>clone()</code> was called."
|
||
},
|
||
"mediastream.getaudiotracks": {
|
||
"url": "$MDN_URL$/web/api/mediastream/getaudiotracks",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getAudioTracks()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface returns a sequence that represents all the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects in this\nstream's <a href=\"https://www.w3.org/TR/mediacapture-streams/#track-set\" class=\"external\" target=\"_blank\"><code>track set</code></a> where <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\"><code>MediaStreamTrack.kind</code></a>\nis <code>audio</code>.",
|
||
"returns": "An array of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects, one for each audio track contained\n in the stream. Audio tracks are those tracks whose <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\" title=\"kind\"><code>kind</code></a> property is <code>audio</code>. The array is empty if the stream contains no\n audio tracks.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The order of the returned tracks is not defined by the\n specification and may, in fact, change from one call to <code>getAudioTracks()</code>\n to the next.\n</div>\n<p>Early versions of this API included a special <code>AudioStreamTrack</code> interface\n which was used as the type for each entry in the list of audio streams; however, this\n has since been merged into the main <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface."
|
||
},
|
||
"mediastream.gettrackbyid": {
|
||
"url": "$MDN_URL$/web/api/mediastream/gettrackbyid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "49",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getTrackById()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface\nreturns a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object representing the track with the specified ID\nstring. If there is no track with the specified ID, this method returns <code>null</code>.",
|
||
"parameters": {
|
||
"id": "A string which identifies the track to be returned."
|
||
},
|
||
"returns": "If a track is found for which <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/id\"><code>MediaStreamTrack.id</code></a> matches the specified\n <code>id</code> string, that <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object is returned.\n Otherwise, the returned value is <code>null</code>."
|
||
},
|
||
"mediastream.gettracks": {
|
||
"url": "$MDN_URL$/web/api/mediastream/gettracks",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "38",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "",
|
||
"Firefox": "34",
|
||
"Opera": "25",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getTracks()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface returns a sequence that represents all the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects in this\nstream's <a href=\"https://www.w3.org/TR/mediacapture-streams/#track-set\" class=\"external\" target=\"_blank\"><code>track set</code></a>,\nregardless of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\"><code>MediaStreamTrack.kind</code></a>.",
|
||
"returns": "An array of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects."
|
||
},
|
||
"mediastream.getvideotracks": {
|
||
"url": "$MDN_URL$/web/api/mediastream/getvideotracks",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getVideoTracks()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface returns a sequence of\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects representing the video tracks in this stream.",
|
||
"returns": "An array of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects, one for each video track contained\n in the media stream. Video tracks are those tracks whose\n <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\" title=\"kind\"><code>kind</code></a> property is <code>video</code>. The array\n is empty if the stream contains no video tracks.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The order of the tracks is not defined by the specification,\n and may not be the same from one call to <code>getVideoTracks()</code> to another.\n</div>"
|
||
},
|
||
"mediastream.id": {
|
||
"url": "$MDN_URL$/web/api/mediastream/id",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface is a\nstring containing 36 characters denoting a unique identifier (GUID)\nfor the object."
|
||
},
|
||
"mediastream.mediastream": {
|
||
"url": "$MDN_URL$/web/api/mediastream/mediastream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "44",
|
||
"Opera": "42",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStream()</code></strong> constructor returns a newly-created <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>, which serves as a collection of media tracks, each represented by a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object.\n<p>If any parameters are given, the specified tracks are added to the new stream.\nOtherwise, the stream has no tracks.",
|
||
"parameters": {
|
||
"stream": "A different <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> object 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 <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> objects, one for each track to add to the stream."
|
||
},
|
||
"returns": "A newly-created <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> object, either empty, or containing the\n tracks provided, if any."
|
||
},
|
||
"mediastream.removetrack": {
|
||
"url": "$MDN_URL$/web/api/mediastream/removetrack",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "44",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>removeTrack()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> interface removes a\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> from a stream.",
|
||
"parameters": {
|
||
"track": "A <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> that will be removed from the stream."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediastreamaudiodestinationnode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiodestinationnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "25",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "18",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <code>MediaStreamAudioDestinationNode</code> interface represents an audio destination consisting of a <a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> with a single <code>AudioMediaStreamTrack</code>, which can be used in a similar way to a <code>MediaStream</code> obtained from <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>navigator.mediaDevices.getUserMedia()</code></a>.\n<p>It is an <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> that acts as an audio destination, created using the <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamDestination\"><code>AudioContext.createMediaStreamDestination()</code></a> method.\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>0</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td><code>2</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count mode</th>\n<td><code>\"explicit\"</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count interpretation</th>\n<td><code>\"speakers\"</code></td>\n</tr>\n</tbody>\n</table></figure>"
|
||
},
|
||
"mediastreamaudiodestinationnode.mediastreamaudiodestinationnode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiodestinationnode/mediastreamaudiodestinationnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "44",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamAudioDestinationNode()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> creates a new <a href=\"$MDN_URL$/Web/API/MediaStreamAudioDestinationNode\"><code>MediaStreamAudioDestinationNode</code></a> object instance.",
|
||
"parameters": {
|
||
"context": "An <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "An object defining the properties you want the <code>MediaStreamAudioDestinationNode</code> to have: <dl> <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt> <dd> <p>An integer used to determine how many channels are used when <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> connections to any inputs to the node. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> for more information.) Its usage and precise definition depend on the value of <code>channelCountMode</code>. </dd> <dt id=\"channelcountmode\"><a href=\"#channelcountmode\"><code>channelCountMode</code></a></dt> <dd> <p>A string describing the way channels must be matched between the node's inputs and outputs. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> <dt id=\"channelinterpretation\"><a href=\"#channelinterpretation\"><code>channelInterpretation</code></a></dt> <dd> <p>A string describing the meaning of the channels. This interpretation will define how audio <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> will happen. The possible values are <code>\"speakers\"</code> or <code>\"discrete\"</code>. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> </dl>"
|
||
}
|
||
},
|
||
"mediastreamaudiodestinationnode.stream": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiodestinationnode/stream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "25",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "18",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <code>stream</code> property of the <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> interface represents a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> containing a single audio <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> with the same number of channels as the node itself.\n<p>You can use this property to get a stream out of the audio graph and feed it into another construct, such as a <a href=\"$MDN_URL$/Web/API/MediaStream_Recording_API\">Media Recorder</a>."
|
||
},
|
||
"mediastreamaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "22",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamAudioSourceNode</code></strong> interface is a type of <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> which operates as an audio source whose media is received from a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> obtained using the WebRTC or Media Capture and Streams APIs.\n<p>This media could be from a microphone (through <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>) or from a remote peer on a WebRTC call (using the <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>'s audio tracks).\n<p>A <code>MediaStreamAudioSourceNode</code> has no inputs and exactly one output, and is created using the <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamSource\"><code>AudioContext.createMediaStreamSource()</code></a> method.\n<p>The <code>MediaStreamAudioSourceNode</code> takes the audio from the <em>first</em> <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> whose <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\" ><code>kind</code></a> attribute's value is <code>audio</code>. See <a href=\"#track_ordering\">Track ordering</a> for more information about the order of tracks.\n<p>The number of channels output by the node matches the number of tracks found in the selected audio track.\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>0</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td>2 (but note that <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> is only used for up-mixing and down-mixing <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> inputs, and <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode\" aria-current=\"page\"><code>MediaStreamAudioSourceNode</code></a> doesn't have any input)</td>\n</tr>\n</tbody>\n</table></figure>",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the stream specified by the <code>mediaStream</code> parameter does not contain any audio tracks."
|
||
}
|
||
},
|
||
"mediastreamaudiosourcenode.mediastream": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiosourcenode/mediastream",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "22",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "79",
|
||
"Firefox": "70",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a> interface's\nread-only <strong><code>mediaStream</code></strong> property indicates the\n<a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> that contains the audio track from which the node is\nreceiving audio.\n<p>This stream was specified when the node was first created,\neither using the <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode/MediaStreamAudioSourceNode\" ><code>MediaStreamAudioSourceNode()</code></a> constructor or the\n<a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamSource\"><code>AudioContext.createMediaStreamSource()</code></a> method."
|
||
},
|
||
"mediastreamaudiosourcenode.mediastreamaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamaudiosourcenode/mediastreamaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "42",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a>'s <strong><code>MediaStreamAudioSourceNode()</code></strong> constructor\ncreates and returns a new <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a> object which uses\nthe first audio track of a given <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> as its source.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Another way to create a\n<code>MediaStreamAudioSourceNode</code> is to call\nthe <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamSource\"><code>AudioContext.createMediaStreamSource()</code></a> method, specifying the stream\nfrom which you want to obtain audio.\n</div>",
|
||
"parameters": {
|
||
"context": "An <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "An object defining the properties you want the <code>MediaStreamAudioSourceNode</code> to have: <dl> <dt id=\"mediastream\"><a href=\"#mediastream\"><code>mediaStream</code></a></dt> <dd> <p>A required property which specifies the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> from which to obtain audio for the node. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a> object representing the audio node\n whose media is obtained from the specified source stream.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the specified <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> does not contain any audio tracks."
|
||
}
|
||
},
|
||
"mediastreamevent": {
|
||
"url": "$MDN_URL$/web/api/mediastreamevent",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "15",
|
||
"Firefox": "24",
|
||
"Opera": "15"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MediaStreamEvent</code></strong> interface represents events that occurs in relation to a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>. Two events of this type can be thrown: <a href=\"$MDN_URL$/Web/API/RTCPeerConnection/addstream_event\" ><code>addstream</code></a> and <a href=\"$MDN_URL$/Web/API/RTCPeerConnection/removestream_event\" ><code>removestream</code></a>."
|
||
},
|
||
"mediastreamevent.mediastreamevent": {
|
||
"url": "$MDN_URL$/web/api/mediastreamevent/mediastreamevent",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "15",
|
||
"Firefox": "24",
|
||
"Opera": "15"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MediaStreamEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaStreamEvent\"><code>MediaStreamEvent</code></a> object.",
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStreamEvent\"><code>MediaStreamEvent</code></a> object."
|
||
},
|
||
"mediastreamevent.stream": {
|
||
"url": "$MDN_URL$/web/api/mediastreamevent/stream",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "15",
|
||
"Firefox": "24",
|
||
"Opera": "15"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The read-only property <strong><code>MediaStreamEvent.stream</code></strong> returns\nthe <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> associated with the event."
|
||
},
|
||
"mediastreamtrack": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamTrack</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> represents a single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.\n<p>Some user agents subclass this interface to provide more precise information or functionality, such as <a href=\"$MDN_URL$/Web/API/CanvasCaptureMediaStreamTrack\"><code>CanvasCaptureMediaStreamTrack</code></a>."
|
||
},
|
||
"mediastreamtrack.applyconstraints": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/applyconstraints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "",
|
||
"Firefox": "43",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>applyConstraints()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface applies a set of constraints to the track; these constraints let the website or app establish ideal values and acceptable ranges of values for the constrainable properties of the track, such as frame rate, dimensions, echo cancellation, and so forth.\n<p>Constraints can be used to ensure that the media meets certain guidelines you prefer.\nFor example, you may prefer high-density video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network.\nConstraints can also specify ideal and/or acceptable sizes or ranges of sizes.\nSee <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints#applying_constraints\">Applying constraints</a> in <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a> for more information on how to apply your preferred constraints.",
|
||
"parameters": {
|
||
"constraints": "A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints. If this parameter is omitted, all currently set custom constraints are cleared. This object represents the basic set of constraints that must apply for the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> to resolve. The object may contain an advanced property containing an array of additional <code>MediaTrackConstraints</code> objects, which are treated as exact requires."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves when the constraints have been successfully applied.\n If the constraints cannot be applied, the promise is rejected with a <a href=\"$MDN_URL$/Web/API/OverconstrainedError\"><code>OverconstrainedError</code></a> that is a <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> whose name is <code>OverconstrainedError</code> with additional parameters, and, to indicate that the constraints could not be met.\n This can happen if the specified constraints are too strict to find a match when attempting to configure the track."
|
||
},
|
||
"mediastreamtrack.clone": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/clone",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "48",
|
||
"Opera": "22",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>clone()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>\ninterface creates a duplicate of the <code>MediaStreamTrack</code>. This new\n<code>MediaStreamTrack</code> object is identical except for its unique\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/id\" ><code>id</code></a>.",
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> instance which is identical to the one\n <code>clone()</code> was called, except for its new unique\n <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/id\" title=\"id\"><code>id</code></a>."
|
||
},
|
||
"mediastreamtrack.contenthint": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/contenthint",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>contentHint</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface is a string that hints at the type of content the track contains. Allowable values depend on the value of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\"><code>MediaStreamTrack.kind</code></a> property."
|
||
},
|
||
"mediastreamtrack.enabled": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/enabled",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "24",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>enabled</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface is a Boolean value which is\n<code>true</code> if the track is allowed to render the source stream or\n<code>false</code> if it is not. This can be used to intentionally mute a\ntrack.\n<p>When enabled, a track's data is output from the source to the\ndestination; otherwise, empty frames are output.\n<p>In the case of audio, a disabled track generates frames of silence (that is, frames in\nwhich every sample's value is 0). For video tracks, every frame is filled entirely with\nblack pixels.\n<p>The value of <code>enabled</code>, in essence, represents what a typical user would\nconsider the muting state for a track, whereas the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/muted\" ><code>muted</code></a> property indicates a state in which the track is temporarily unable to output\ndata, such as a scenario in which frames have been lost in transit.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> If the track has been disconnected, the value of this property\ncan be changed, but has no effect.\n</div>"
|
||
},
|
||
"mediastreamtrack.getcapabilities": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/getcapabilities",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getCapabilities()</code></strong> method of\nthe <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a\n<code>MediaTrackCapabilities</code> object which specifies the values or range of\nvalues which each constrainable property, based upon the platform and <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>.\n<p>Once you know what the browser's capabilities are, your script can use\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\" ><code>applyConstraints()</code></a> to ask for the\ntrack to be configured to match ideal or acceptable settings. See <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a> for details on how to work with constrainable properties.",
|
||
"returns": "A <code>MediaTrackCapabilities</code> object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties, containing the following members:\n<dl>\n <dt id=\"deviceid\"><a href=\"#deviceid\"><code>deviceId</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> object containing the device ID.\n </dd>\n <dt id=\"groupid\"><a href=\"#groupid\"><code>groupId</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> object containing a group ID.\n </dd>\n <dt id=\"autogaincontrol\"><a href=\"#autogaincontrol\"><code>autoGainControl</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> object reporting if the source can do auto gain control.\n If the feature can be controlled by a script the source will report both true and false as possible values.\n </dd>\n <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a> containing the channel count or range of channel counts.\n </dd>\n <dt id=\"echocancellation\"><a href=\"#echocancellation\"><code>echoCancellation</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> object reporting if the source can do echo cancellation.\n If the feature can be controlled by a script the source will report both true and false as possible values.\n </dd>\n <dt id=\"latency\"><a href=\"#latency\"><code>latency</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a> containing the latency or range of latencies.\n </dd>\n <dt id=\"noisesuppression\"><a href=\"#noisesuppression\"><code>noiseSuppression</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> object reporting if the source can do noise suppression.\n If the feature can be controlled by a script the source will report both true and false as possible values.\n </dd>\n <dt id=\"samplerate\"><a href=\"#samplerate\"><code>sampleRate</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a> containing the sample rate or range of sample rates.\n </dd>\n <dt id=\"samplesize\"><a href=\"#samplesize\"><code>sampleSize</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a> containing the sample size or range of sample sizes.\n </dd>\n <dt id=\"aspectratio\"><a href=\"#aspectratio\"><code>aspectRatio</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a> containing the video aspect ratio (width in pixels divided by height in pixels) or range of aspect ratios.\n </dd>\n <dt id=\"facingmode\"><a href=\"#facingmode\"><code>facingMode</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> object containing the camera facing mode. A camera may report multiple facings, for example \"left\" and \"user\".\n </dd>\n <dt id=\"framerate\"><a href=\"#framerate\"><code>frameRate</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a> containing the frame rate or range of frame rates which are acceptable.\n </dd>\n <dt id=\"height\"><a href=\"#height\"><code>height</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a> containing the video height or range of heights in pixels.\n </dd>\n <dt id=\"width\"><a href=\"#width\"><code>width</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a> containing the video width or range of widths in pixels.\n </dd>\n <dt id=\"resizemode\"><a href=\"#resizemode\"><code>resizeMode</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> object containing the mode or an array of modes the UA can use to derive the resolution of the video track.\n </dd>\n</dl>"
|
||
},
|
||
"mediastreamtrack.getconstraints": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/getconstraints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "40",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getConstraints()</code></strong> method of\nthe <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> object containing the set of constraints most\nrecently established for the track using a prior call to\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\" ><code>applyConstraints()</code></a>. These\nconstraints indicate values and ranges of values that the website or application has\nspecified are required or acceptable for the included constrainable properties.\n<p>Constraints can be used to ensure that the media meets certain guidelines you prefer.\nFor example, you may prefer high definition video but require that the frame rate be a\nlittle low to help keep the data rate low enough not overtax the network. Constraints\ncan also specify ideal and/or acceptable sizes or ranges of sizes. See <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a> for details on how to work with constrainable properties.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> object which indicates the constrainable\n properties the website or app most recently set using\n <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\" title=\"applyConstraints()\"><code>applyConstraints()</code></a>. The properties\n in the returned object are listed in the same order as when they were set, and only\n properties specifically set by the site or app are included.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The returned set of constraints doesn't necessarily describe\n the actual state of the media. Even if any of the constraints couldn't be met, they\n are still included in the returned object as originally set by the site's code. To get\n the currently active settings for all constrainable properties, you should instead\n call <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/getSettings\" title=\"getSettings()\"><code>getSettings()</code></a>.\n</div>"
|
||
},
|
||
"mediastreamtrack.getsettings": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/getsettings",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>getSettings()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a>\nobject containing the current values of each of the constrainable properties for the\ncurrent <code>MediaStreamTrack</code>.\n<p>See <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a> for details on how to work with constrainable properties.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> object describing the current configuration of the\n track's constrainable properties.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The returned object identifies the current values of every\n constrainable property, including those which are platform defaults rather than having\n been expressly set by the site's code. To instead fetch the most-recently established\n constraints for the track's properties, as specified by the site's code, use\n <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/getConstraints\" title=\"getConstraints()\"><code>getConstraints()</code></a>.\n</div>"
|
||
},
|
||
"mediastreamtrack.id": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/id",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a\nstring containing a unique identifier (GUID) for the track, which is\ngenerated by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>."
|
||
},
|
||
"mediastreamtrack.kind": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/kind",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>kind</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a string set to <code>\"audio\"</code> if the track is an audio track and to <code>\"video\"</code> if it is a video track.\nIt doesn't change if the track is disassociated from its source."
|
||
},
|
||
"mediastreamtrack.label": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/label",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "22",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>label</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a string containing a <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>-assigned label that identifies the track source, as in <code>\"internal microphone\"</code>.\n<p>The string may be left empty and is empty as long as no source has been connected.\nWhen the track is disassociated from its source, the label is not changed."
|
||
},
|
||
"mediastreamtrack.muted": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/muted",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "38",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "",
|
||
"Opera": "25",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>muted</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns a boolean value\nindicating whether or not the track is currently unable to provide media output.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> To implement a way for users to mute and unmute a track, use the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/enabled\" ><code>enabled</code></a> property. When a track is disabled\nby setting <code>enabled</code> to <code>false</code>, it generates only empty frames\n(audio frames in which every sample is 0, or video frames in which every pixel is\nblack).\n</div>"
|
||
},
|
||
"mediastreamtrack.readystate": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/readystate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>readyState</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface returns an enumerated value giving the status of the track."
|
||
},
|
||
"mediastreamtrack.stop": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrack/stop",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "32",
|
||
"ChromeAndroid": "32",
|
||
"Edge": "",
|
||
"Firefox": "34",
|
||
"Opera": "19",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>stop()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> interface stops the track.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mediastreamtrackaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "68"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamTrackAudioSourceNode</code></strong> interface is a type of <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> which represents a source of audio data taken from a specific <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> obtained through the <a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> or <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams</a> APIs.\n<p>The audio itself might be input from a microphone or other audio sampling device, or might be received through a <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>, among other possible options.\n<p>A <code>MediaStreamTrackAudioSourceNode</code> has no inputs and exactly one output, and is created using the <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamTrackSource\"><code>AudioContext.createMediaStreamTrackSource()</code></a> method. This interface is similar to <a href=\"$MDN_URL$/Web/API/MediaStreamAudioSourceNode\"><code>MediaStreamAudioSourceNode</code></a>, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>0</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td>\ndefined by the first audio <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>\npassed to the\n<a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamTrackSource\"><code>AudioContext.createMediaStreamTrackSource()</code></a>\nmethod that created it.\n</td>\n</tr>\n</tbody>\n</table></figure>"
|
||
},
|
||
"mediastreamtrackaudiosourcenode.mediastreamtrackaudiosourcenode": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackaudiosourcenode/mediastreamtrackaudiosourcenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "68"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a>'s <strong><code>MediaStreamTrackAudioSourceNode()</code></strong> constructor creates and returns a new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackAudioSourceNode\"><code>MediaStreamTrackAudioSourceNode</code></a> object whose audio is taken from the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> specified in the given options object.\n<p>Another way to create a <code>MediaStreamTrackAudioSourceNode</code> is to call the <a href=\"$MDN_URL$/Web/API/AudioContext/createMediaStreamTrackSource\"><code>AudioContext.createMediaStreamTrackSource()</code></a> method, specifying the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> from which you want to obtain audio.",
|
||
"parameters": {
|
||
"context": "An <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "An object defining the properties you want the <code>MediaStreamTrackAudioSourceNode</code> to have: <dl> <dt id=\"mediastreamtrack\"><a href=\"#mediastreamtrack\"><code>mediaStreamTrack</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> from which to take audio data for this node's output. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackAudioSourceNode\"><code>MediaStreamTrackAudioSourceNode</code></a> object representing the audio node whose media is obtained from the specified media track.",
|
||
"throws": {
|
||
"NotSupportedError DOMException": "Thrown if the specified <code>context</code> is not an <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a>.",
|
||
"InvalidStateError DOMException": "Thrown if the specified <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> isn't an audio track (that is, its <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/kind\" ><code>kind</code></a> property isn't <code>audio</code>."
|
||
}
|
||
},
|
||
"mediastreamtrackevent": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamTrackEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> represents events which indicate that a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> has had tracks added to or removed from the stream through calls to <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> methods. These events are sent to the stream when these changes occur.\n<p>The events based on this interface are <a href=\"$MDN_URL$/Web/API/MediaStream/addtrack_event\" ><code>addtrack</code></a> and <a href=\"$MDN_URL$/Web/API/MediaStream/removetrack_event\" ><code>removetrack</code></a>."
|
||
},
|
||
"mediastreamtrackevent.mediastreamtrackevent": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackevent/mediastreamtrackevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "42",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaStreamTrackEvent()</code></strong> constructor returns a new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackEvent\"><code>MediaStreamTrackEvent</code></a> object,\nwhich represents an event signaling that a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> has been added to or removed from a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>addtrack</code> or <code>removetrack</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"track\"><a href=\"#track\"><code>track</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object representing the track which was added to or removed from the stream. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackEvent\"><code>MediaStreamTrackEvent</code></a> object, initialized based on the provided options."
|
||
},
|
||
"mediastreamtrackevent.track": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackevent/track",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "50",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>track</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrackEvent\"><code>MediaStreamTrackEvent</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> associated with this event."
|
||
},
|
||
"mediastreamtrackgenerator": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackgenerator",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MediaStreamTrackGenerator</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Insertable_Streams_for_MediaStreamTrack_API\"><code>Insertable Streams for MediaStreamTrack API</code></a> creates a <a href=\"$MDN_URL$/Web/API/WritableStream\"><code>WritableStream</code></a> that acts as a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> source.\nThe object consumes a stream of media frames as input, which can be audio or video frames."
|
||
},
|
||
"mediastreamtrackgenerator.mediastreamtrackgenerator": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackgenerator/mediastreamtrackgenerator",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MediaStreamTrackGenerator()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackGenerator\"><code>MediaStreamTrackGenerator</code></a> object which consumes a stream of media frames and exposes a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>.",
|
||
"parameters": {
|
||
"options": "An object containing the property <code>kind</code>, which is one of the following strings: <dl> <dt id=\"audio\"><a href=\"#audio\"><code>\"audio\"</code></a></dt> <dd> <p>Specifies that the stream accepts <a href=\"$MDN_URL$/Web/API/AudioTrack\"><code>AudioTrack</code></a> objects. </dd> <dt id=\"video\"><a href=\"#video\"><code>\"video\"</code></a></dt> <dd> <p>Specifies that the stream accepts <a href=\"$MDN_URL$/Web/API/VideoTrack\"><code>VideoTrack</code></a> objects. </dd> </dl>"
|
||
},
|
||
"throws": {
|
||
"TypeError": "Thrown if <code>init.kind</code> is not <code>\"video\"</code> or <code>\"audio\"</code>."
|
||
}
|
||
},
|
||
"mediastreamtrackgenerator.writable": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackgenerator/writable",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>writable</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrackGenerator\"><code>MediaStreamTrackGenerator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/WritableStream\"><code>WritableStream</code></a>. This allows the writing of media frames to the <code>MediaStreamTrackGenerator</code>. The frames will be audio or video. The type is dictated by the kind of <code>MediaStreamTrackGenerator</code> that was created."
|
||
},
|
||
"mediastreamtrackprocessor": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackprocessor",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>MediaStreamTrackProcessor</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Insertable_Streams_for_MediaStreamTrack_API\"><code>Insertable Streams for MediaStreamTrack API</code></a> consumes a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object's source and generates a stream of media frames."
|
||
},
|
||
"mediastreamtrackprocessor.mediastreamtrackprocessor": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackprocessor/mediastreamtrackprocessor",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>MediaStreamTrackProcessor()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MediaStreamTrackProcessor\"><code>MediaStreamTrackProcessor</code></a> object which consumes a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object's source and generates a stream of media frames.",
|
||
"parameters": {
|
||
"options": "An object with the following properties: <dl> <dt id=\"track\"><a href=\"#track\"><code>track</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>. </dd> <dt id=\"maxbuffersize\"><a href=\"#maxbuffersize\"><code>maxBufferSize</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An integer specifying the maximum number of media frames to be buffered. </dd> </dl>"
|
||
}
|
||
},
|
||
"mediastreamtrackprocessor.readable": {
|
||
"url": "$MDN_URL$/web/api/mediastreamtrackprocessor/readable",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>readable</code></strong> property of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrackProcessor\"><code>MediaStreamTrackProcessor</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/ReadableStream\"><code>ReadableStream</code></a>."
|
||
},
|
||
"mediatrackconstraints": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "29",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaTrackConstraints</code></strong> dictionary is used to describe a set of capabilities and the value or values each can take on. A constraints dictionary is passed into <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\" ><code>applyConstraints()</code></a> to allow a script to establish a set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/getConstraints\" ><code>getConstraints()</code></a>."
|
||
},
|
||
"mediatrackconstraints.aspectratio": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/aspectratio",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>aspectRatio</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a> describing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/aspectRatio\" ><code>aspectRatio</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/aspectRatio\"><code>MediaTrackSupportedConstraints.aspectRatio</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.autogaincontrol": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/autogaincontrol",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>autoGainControl</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> describing the requested or mandatory constraints placed\nupon the value of the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/autoGainControl\" ><code>autoGainControl</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/autoGainControl\"><code>MediaTrackSupportedConstraints.autoGainControl</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Automatic gain control is typically a feature provided by microphones, although it can\nbe provided by other input sources as well."
|
||
},
|
||
"mediatrackconstraints.channelcount": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/channelcount",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>channelCount</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/channelCount\" ><code>channelCount</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/channelCount\"><code>MediaTrackSupportedConstraints.channelCount</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.deviceid": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/deviceid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "36",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>deviceId</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/deviceId\" ><code>deviceId</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/deviceId\"><code>MediaTrackSupportedConstraints.deviceId</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatrackconstraints.displaysurface": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/displaysurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "107",
|
||
"ChromeAndroid": "107",
|
||
"Edge": "107",
|
||
"Opera": "93",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>displaySurface</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> describing the preferred value for the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/displaySurface\" ><code>displaySurface</code></a> constrainable property.\n<p>This is set by the application to identify to the user agent the type of display surface (<code>window</code>, <code>browser</code>, or <code>monitor</code>) preferred by the application. It has no effect on what the user can choose to share, but may be used to present the options in a different order.\n<p>If needed, you can determine whether or not this constraint is supported by checking the value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/displaySurface\"><code>MediaTrackSupportedConstraints.displaySurface</code></a> as returned by a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.echocancellation": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/echocancellation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>echoCancellation</code></strong> property is a\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> describing the requested or mandatory constraints placed\nupon the value of the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/echoCancellation\" ><code>echoCancellation</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/echoCancellation\"><code>MediaTrackSupportedConstraints.echoCancellation</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatrackconstraints.facingmode": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/facingmode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>facingMode</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/facingMode\" ><code>facingMode</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/facingMode\"><code>MediaTrackSupportedConstraints.facingMode</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatrackconstraints.framerate": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/framerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>frameRate</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/frameRate\" ><code>frameRate</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/frameRate\"><code>MediaTrackSupportedConstraints.frameRate</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.groupid": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/groupid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "70",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>groupId</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/groupId\" ><code>groupId</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/groupId\"><code>MediaTrackSupportedConstraints.groupId</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.height": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>height</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/height\" ><code>height</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/height\"><code>MediaTrackSupportedConstraints.height</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.latency": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/latency",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>latency</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/latency\" ><code>latency</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/latency\"><code>MediaTrackSupportedConstraints.latency</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatrackconstraints.logicalsurface": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/logicalsurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>logicalSurface</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindomstring\"><code>ConstrainDOMString</code></a> describing the requested or mandatory constraints placed upon the value of the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/logicalSurface\" ><code>logicalSurface</code></a> constrainable property.\n<p>This is used to specify whether or\nnot <a href=\"$MDN_URL$/Web/API/MediaDevices/getDisplayMedia\" ><code>getDisplayMedia()</code></a> should allow the\nuser to choose display surfaces which are not necessarily fully visible on the screen,\nsuch as occluded windows or the complete content of windows which are large enough to\nrequire scrolling to see their entire contents.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/logicalSurface\"><code>MediaTrackSupportedConstraints.logicalSurface</code></a> as returned by\na call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.noisesuppression": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/noisesuppression",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>noiseSuppression</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> describing the requested or mandatory constraints placed upon the value of the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/noiseSuppression\" ><code>noiseSuppression</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/noiseSuppression\"><code>MediaTrackSupportedConstraints.noiseSuppression</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Noise suppression is typically provided by microphones, although it can be provided by\nother input sources as well."
|
||
},
|
||
"mediatrackconstraints.samplerate": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/samplerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>sampleRate</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/sampleRate\" ><code>sampleRate</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/sampleRate\"><code>MediaTrackSupportedConstraints.sampleRate</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.samplesize": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/samplesize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>sampleSize</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/sampleSize\" ><code>sampleSize</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/sampleSize\"><code>MediaTrackSupportedConstraints.sampleSize</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.suppresslocalaudioplayback": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/suppresslocalaudioplayback",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Opera": "95"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's <strong><code>suppressLocalAudioPlayback</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainboolean\"><code>ConstrainBoolean</code></a> describing the requested or mandatory constraints placed upon the value of the <a href=\"$MDN_URL$/Web/API/MediaTrackSettings/suppressLocalAudioPlayback\" ><code>suppressLocalAudioPlayback</code></a> constrainable property. This property controls whether the audio playing in a tab will continue to be played out of a user's local speakers when the tab is captured.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/suppressLocalAudioPlayback\"><code>MediaTrackSupportedConstraints.suppressLocalAudioPlayback</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.volume": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/volume",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>volume</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constraindouble\"><code>ConstrainDouble</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/volume\" ><code>volume</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/volume\"><code>MediaTrackSupportedConstraints.volume</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatrackconstraints.width": {
|
||
"url": "$MDN_URL$/web/api/mediatrackconstraints/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary's\n<strong><code>width</code></strong> property is a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints#constrainulong\"><code>ConstrainULong</code></a>\ndescribing the requested or mandatory constraints placed upon the value of the\n<a href=\"$MDN_URL$/Web/API/MediaTrackSettings/width\" ><code>width</code></a> constrainable property.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/width\"><code>MediaTrackSupportedConstraints.width</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "36",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaTrackSettings</code></strong> dictionary is used to return the current values configured for each of a <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>'s settings. These values will adhere as closely as possible to any constraints previously described using a <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> object and set using <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\" ><code>applyConstraints()</code></a>, and will adhere to the default constraints for any properties whose constraints haven't been changed, or whose customized constraints couldn't be matched.\n<p>To learn more about how constraints and settings work, see <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a>."
|
||
},
|
||
"mediatracksettings.aspectratio": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/aspectratio",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>aspectRatio</code></strong> property is a double-precision floating-point number indicating the aspect ratio of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> as currently configured.\nThis lets you determine what value was selected to comply with your specified constraints for this property's value as described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/aspectRatio\"><code>MediaTrackConstraints.aspectRatio</code></a> property you provided when calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/aspectRatio\"><code>MediaTrackSupportedConstraints.aspectRatio</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.autogaincontrol": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/autogaincontrol",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>autoGainControl</code></strong> property is a Boolean value whose value\nindicates whether or not automatic gain control (AGC) is enabled on an audio track. This\nlets you determine what value was selected to comply with your specified constraints for\nthis property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/autoGainControl\"><code>MediaTrackConstraints.autoGainControl</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>Automatic gain control is a feature in which a sound source automatically manages\nchanges in the volume of its source media to maintain a steady overall volume level.\nThis feature is typically used on microphones, although it can be provided by other\ninput sources as well.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/autoGainControl\"><code>MediaTrackSupportedConstraints.autoGainControl</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.channelcount": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/channelcount",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>channelCount</code></strong> property is an integer indicating how many\naudio channels the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently configured to have. This\nlets you determine what value was selected to comply with your specified constraints for\nthis property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/channelCount\"><code>MediaTrackConstraints.channelCount</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/channelCount\"><code>MediaTrackSupportedConstraints.channelCount</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.cursor": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/cursor",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "71",
|
||
"ChromeAndroid": "71",
|
||
"Edge": "79",
|
||
"Opera": "58"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>cursor</code></strong> property indicates whether or not the cursor should be captured as part of the video track included in the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getDisplayMedia\" ><code>getDisplayMedia()</code></a>."
|
||
},
|
||
"mediatracksettings.deviceid": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/deviceid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>deviceId</code></strong> property is a string which\nuniquely identifies the source for the corresponding <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> for\nthe origin corresponding to the browsing session. This lets you determine what value was\nselected to comply with your specified constraints for this property's value as\ndescribed in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/deviceId\"><code>MediaTrackConstraints.deviceId</code></a> property you provided\nwhen calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/deviceId\"><code>MediaTrackSupportedConstraints.deviceId</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatracksettings.displaysurface": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/displaysurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "71",
|
||
"ChromeAndroid": "71",
|
||
"Edge": "79",
|
||
"Opera": "58",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>displaySurface</code></strong> property indicates the type of display\nsurface being captured."
|
||
},
|
||
"mediatracksettings.echocancellation": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/echocancellation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>echoCancellation</code></strong> property is a Boolean value whose value\nindicates whether or not echo cancellation is enabled on an audio track. This lets you\ndetermine what value was selected to comply with your specified constraints for this\nproperty's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/echoCancellation\"><code>MediaTrackConstraints.echoCancellation</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>Echo cancellation is a feature which attempts to prevent echo effects on a two-way\naudio connection by attempting to reduce or eliminate crosstalk between the user's\noutput device and their input device. For example, it might apply a filter that negates\nthe sound being produced on the speakers from being included in the input track\ngenerated from the microphone.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/echoCancellation\"><code>MediaTrackSupportedConstraints.echoCancellation</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatracksettings.facingmode": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/facingmode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>facingMode</code></strong> property is a string\nindicating the direction in which the camera producing the video track represented by\nthe <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently facing. This lets you determine what\nvalue was selected to comply with your specified constraints for this property's value\nas described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/facingMode\"><code>MediaTrackConstraints.facingMode</code></a> property you\nprovided when calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>\nor <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/facingMode\"><code>MediaTrackSupportedConstraints.facingMode</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatracksettings.framerate": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/framerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "36",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>frameRate</code></strong> property is a double-precision floating-point\nnumber indicating the frame rate, in frames per second, of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> as currently configured. This lets you determine what\nvalue was selected to comply with your specified constraints for this property's value\nas described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/frameRate\"><code>MediaTrackConstraints.frameRate</code></a> property you provided\nwhen calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/frameRate\"><code>MediaTrackSupportedConstraints.frameRate</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.groupid": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/groupid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>groupId</code></strong> property is a browsing-session unique\nstring which identifies the group of devices which includes the source\nfor the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a>. This lets you determine what value was selected\nto comply with your specified constraints for this property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/groupId\"><code>MediaTrackConstraints.groupId</code></a> property you provided when calling either\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/groupId\"><code>MediaTrackSupportedConstraints.groupId</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatracksettings.height": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "36",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>height</code></strong>\nproperty is an integer indicating the number of pixels tall\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently configured to be. This lets you determine\nwhat value was selected to comply with your specified constraints for this property's\nvalue as described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/height\"><code>MediaTrackConstraints.height</code></a> property you\nprovided when calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>\nor <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/height\"><code>MediaTrackSupportedConstraints.height</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.latency": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/latency",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>latency</code></strong> property is a double-precision floating-point\nnumber indicating the estimated latency (specified in seconds) of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> as currently configured. This lets you determine what\nvalue was selected to comply with your specified constraints for this property's value\nas described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/latency\"><code>MediaTrackConstraints.latency</code></a> property you provided\nwhen calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>This is, of course, an approximation, since latency can vary for many reasons including\nCPU, transmission, and storage overhead.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/latency\"><code>MediaTrackSupportedConstraints.latency</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with.\n<p>Because <a href=\"$MDN_URL$/Glossary/RTP\">RTP</a> doesn't include this information, tracks associated with a\n<a href=\"$MDN_URL$/Web/API/WebRTC_API\">WebRTC</a> <a href=\"$MDN_URL$/Web/API/RTCPeerConnection\"><code>RTCPeerConnection</code></a>\nwill never include this property."
|
||
},
|
||
"mediatracksettings.logicalsurface": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/logicalsurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "71",
|
||
"ChromeAndroid": "71",
|
||
"Edge": "79",
|
||
"Opera": "58",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>logicalSurface</code></strong> property indicates whether or not the\ndisplay area being captured is a logical surface. Logical surfaces are those which are\nnot necessarily entirely onscreen, or may even be off-screen, such as windows' backing\nbuffers (where only part of the buffer is visible without scrolling the containing\nwindow) and offscreen rendering contexts."
|
||
},
|
||
"mediatracksettings.noisesuppression": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/noisesuppression",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>noiseSuppression</code></strong> property is a Boolean value whose value\nindicates whether or not noise suppression technology is enabled on an audio track. This\nlets you determine what value was selected to comply with your specified constraints for\nthis property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/noiseSuppression\"><code>MediaTrackConstraints.noiseSuppression</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>Noise suppression automatically filters the audio to remove background noise, hum\ncaused by equipment, and the like from the sound before delivering it to your code. This\nfeature is typically used on microphones, although it is technically possible it could\nbe provided by other input sources as well.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/noiseSuppression\"><code>MediaTrackSupportedConstraints.noiseSuppression</code></a> as returned\nby a call to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically\nthis is unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.samplerate": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/samplerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>sampleRate</code></strong> property is an integer indicating how many\naudio samples per second the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently configured\nfor. This lets you determine what value was selected to comply with your specified\nconstraints for this property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/sampleRate\"><code>MediaTrackConstraints.sampleRate</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/sampleRate\"><code>MediaTrackSupportedConstraints.sampleRate</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.samplesize": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/samplesize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's\n<strong><code>sampleSize</code></strong> property is an integer indicating the linear\nsample size (in bits per sample) the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently\nconfigured for. This lets you determine what value was selected to comply with your\nspecified constraints for this property's value as described in the\n<a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/sampleSize\"><code>MediaTrackConstraints.sampleSize</code></a> property you provided when calling\neither <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/sampleSize\"><code>MediaTrackSupportedConstraints.sampleSize</code></a> as returned by a\ncall to <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this\nis unnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.suppresslocalaudioplayback": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/suppresslocalaudioplayback",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Opera": "95"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>suppressLocalAudioPlayback</code></strong> property controls whether the audio playing in a tab will continue to be played out of a user's local speakers when the tab is captured.\n<p>For example, in cases where you broadcast a video call to an external AV system in a conference room, you will want the audio to play out of the AV system, and not the local speakers. This way, the audio will be louder and clearer, and also in sync with the conference video."
|
||
},
|
||
"mediatracksettings.volume": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/volume",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>volume</code></strong>\nproperty is a double-precision floating-point number indicating the volume of the\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> as currently configured, as a value from 0.0 (silence)\nto 1.0 (maximum supported volume for the device). This lets you determine what value was\nselected to comply with your specified constraints for this property's value as\ndescribed in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/volume\"><code>MediaTrackConstraints.volume</code></a> property you provided when\ncalling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a> or\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/volume\"><code>MediaTrackSupportedConstraints.volume</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksettings.width": {
|
||
"url": "$MDN_URL$/web/api/mediatracksettings/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Firefox": "36",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSettings\"><code>MediaTrackSettings</code></a> dictionary's <strong><code>width</code></strong>\nproperty is an integer indicating the number of pixels wide\n<a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> is currently configured to be. This lets you determine\nwhat value was selected to comply with your specified constraints for this property's\nvalue as described in the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/width\"><code>MediaTrackConstraints.width</code></a> property you\nprovided when calling either <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>getUserMedia()</code></a>\nor <a href=\"$MDN_URL$/Web/API/MediaStreamTrack/applyConstraints\"><code>MediaStreamTrack.applyConstraints()</code></a>.\n<p>If needed, you can determine whether or not this constraint is supported by checking\nthe value of <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints/width\"><code>MediaTrackSupportedConstraints.width</code></a> as returned by a call\nto <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>. However, typically this is\nunnecessary since browsers will ignore any constraints they're unfamiliar with."
|
||
},
|
||
"mediatracksupportedconstraints": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>MediaTrackSupportedConstraints</code></strong> dictionary establishes the list of constrainable properties recognized by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> or browser in its implementation of the <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> object. An object conforming to <code>MediaTrackSupportedConstraints</code> is returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a>.\n<p>Because of the way interface definitions in WebIDL work, if a constraint is requested but not supported, no error will occur. Instead, the specified constraints will be applied, with any unrecognized constraints stripped from the request. That can lead to confusing and hard to debug errors, so be sure to use <code>getSupportedConstraints()</code> to retrieve this information before attempting to establish constraints if you need to know the difference between silently ignoring a constraint and a constraint being accepted.\n<p>An actual constraint set is described using an object based on the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints\"><code>MediaTrackConstraints</code></a> dictionary.\n<p>To learn more about how constraints work, see <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a>."
|
||
},
|
||
"mediatracksupportedconstraints.aspectratio": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/aspectratio",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>aspectRatio</code></strong> property is a read-only Boolean value which is present (and set to <code>true</code>) in the object returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>aspectRatio</code> constraint.\nIf the constraint isn't supported, it's not included in the list, so this value will never be <code>false</code>.\n<p>You can access the supported constraints dictionary by calling <code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.autogaincontrol": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/autogaincontrol",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "56"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>autoGainControl</code></strong> property is a read-only Boolean value which is present (and set to <code>true</code>) in the object returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <strong><code>autoGainControl</code></strong> constraint.\nIf the constraint isn't supported, it's not included in the list, so this value will never be <code>false</code>.\n<p>You can access the supported constraints dictionary by calling <code>navigator.mediaDevices.getSupportedConstraints()</code>.\n<p>The <code>autoGainControl</code> constraint indicates whether or not the browser offers the ability to automatically control the gain (volume) on media tracks; this obviously is contingent on whether or not the individual device supports automatic gain control as well; it's typically a feature provided by microphones."
|
||
},
|
||
"mediatracksupportedconstraints.channelcount": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/channelcount",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "56",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>channelCount</code></strong> property is a read-only Boolean value which\nis present (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>channelCount</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.deviceid": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/deviceid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>deviceId</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>deviceId</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.displaysurface": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/displaysurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "107",
|
||
"ChromeAndroid": "107",
|
||
"Edge": "107",
|
||
"Opera": "93",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>displaySurface</code></strong> property indicates whether or not the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/displaySurface\" ><code>displaySurface</code></a> constraint is supported by the user agent and the device on which the content is being used.\n<p>The supported constraints list is obtained by calling <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\" ><code>navigator.mediaDevices.getSupportedConstraints()</code></a>."
|
||
},
|
||
"mediatracksupportedconstraints.echocancellation": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/echocancellation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>echoCancellation</code></strong> property is a read-only Boolean value\nwhich is present (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>echoCancellation</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.facingmode": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/facingmode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>facingMode</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>facingMode</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.framerate": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/framerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>frameRate</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/frameRate\" ><code>frameRate</code></a> constraint.\n<p>If the constraint isn't supported, it's not included in the list, so this value will never be <code>false</code>.\n<p>The <code>frameRate</code> constraint can be used to establish acceptable upper and lower bounds on the video frame rate for a new video track, or to specify an exact frame rate that must be provided for the request to succeed.\nChecking the value of this property lets you determine if the user agent allows constraining the video track configuration by frame rate. See the <a href=\"#examples\">example</a> to see how this can be used."
|
||
},
|
||
"mediatracksupportedconstraints.groupid": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/groupid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "70",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>groupId</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>groupId</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.height": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>height</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>height</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.latency": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/latency",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>latency</code></strong> property is a read-only Boolean value which is present (and set to <code>true</code>) in the object returned by <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>latency</code> constraint.\nIf the constraint isn't supported, it's not included in the list, so this value will never be <code>false</code>.\n<p>You can access the supported constraints dictionary by calling <code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.logicalsurface": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/logicalsurface",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>logicalSurface</code></strong> property indicates whether or not the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/logicalSurface\" ><code>logicalSurface</code></a> constraint is supported by the user agent and the device on which the content is being used.\n<p>The supported constraints list is obtained by calling <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\" ><code>navigator.mediaDevices.getSupportedConstraints()</code></a>."
|
||
},
|
||
"mediatracksupportedconstraints.noisesuppression": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/noisesuppression",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "55",
|
||
"Opera": "56"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>noiseSuppression</code></strong> property is a read-only Boolean value\nwhich is present (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <strong><code>noiseSuppression</code></strong>\nconstraint. If the constraint isn't supported, it's not included in the list, so this\nvalue will never be <code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>.\n<p>The <code>noiseSuppression</code> constraint indicates whether or not the browser\noffers the ability to automatically control the gain (volume) on media tracks; this\nobviously is contingent on whether or not the individual device supports automatic gain\ncontrol as well."
|
||
},
|
||
"mediatracksupportedconstraints.samplerate": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/samplerate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>sampleRate</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>sampleRate</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.samplesize": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/samplesize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>sampleSize</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>sampleSize</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.suppresslocalaudioplayback": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/suppresslocalaudioplayback",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Opera": "95"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's <strong><code>suppressLocalAudioPlayback</code></strong> property indicates whether or not the <a href=\"$MDN_URL$/Web/API/MediaTrackConstraints/suppressLocalAudioPlayback\" ><code>suppressLocalAudioPlayback</code></a> constraint is supported by the user agent and the device on which the content is being used.\n<p>The supported constraints list is obtained by calling <a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\" ><code>navigator.mediaDevices.getSupportedConstraints()</code></a>."
|
||
},
|
||
"mediatracksupportedconstraints.volume": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/volume",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>volume</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>volume</code> constraint. If the\nconstraint isn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"mediatracksupportedconstraints.width": {
|
||
"url": "$MDN_URL$/web/api/mediatracksupportedconstraints/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "42",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MediaTrackSupportedConstraints\"><code>MediaTrackSupportedConstraints</code></a> dictionary's\n<strong><code>width</code></strong> property is a read-only Boolean value which is\npresent (and set to <code>true</code>) in the object returned by\n<a href=\"$MDN_URL$/Web/API/MediaDevices/getSupportedConstraints\"><code>MediaDevices.getSupportedConstraints()</code></a> if and only if the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> supports the <code>width</code> constraint. If the constraint\nisn't supported, it's not included in the list, so this value will never be\n<code>false</code>.\n<p>You can access the supported constraints dictionary by calling\n<code>navigator.mediaDevices.getSupportedConstraints()</code>."
|
||
},
|
||
"merchantvalidationevent": {
|
||
"url": "$MDN_URL$/web/api/merchantvalidationevent",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MerchantValidationEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API</a> enables a merchant to verify themselves as allowed to use a particular payment handler.\n<p>Learn more about <a href=\"$MDN_URL$/Web/API/Payment_Request_API/Concepts#merchant_validation\">merchant validation</a>."
|
||
},
|
||
"merchantvalidationevent.complete": {
|
||
"url": "$MDN_URL$/web/api/merchantvalidationevent/complete",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a> method <strong><code>complete()</code></strong> takes merchant-specific information previously received from the <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent/validationURL\" ><code>validationURL</code></a> and uses it to validate the merchant.\n<p>All you have to do is call <code>complete()</code> from your handler for the <a href=\"$MDN_URL$/Web/API/PaymentRequest/merchantvalidation_event\" ><code>merchantvalidation</code></a> event, passing in the data fetched from the <code>validationURL</code>.",
|
||
"parameters": {
|
||
"validationData or merchantSessionPromise": "An object containing the data needed to complete the merchant validation process, or a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves to the validation data."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Returned if the event did not come directly from the user agent, but was instead dispatched by other code. Another payment request is currently being processed, the current payment request is not currently being displayed to the user, or payment information is currently being updated."
|
||
}
|
||
},
|
||
"merchantvalidationevent.merchantvalidationevent": {
|
||
"url": "$MDN_URL$/web/api/merchantvalidationevent/merchantvalidationevent",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MerchantValidationEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a> object. You should not have to create these events yourself; instead, just handle the <a href=\"$MDN_URL$/Web/API/PaymentRequest/merchantvalidation_event\" ><code>merchantvalidation</code></a> event.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>merchantvalidation</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"methodname\"><a href=\"#methodname\"><code>methodName</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string containing the payment method identifier for the payment handler being used. This is an empty string by default. </dd> <dt id=\"validationurl\"><a href=\"#validationurl\"><code>validationURL</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The URL from which to retrieve payment handler specific verification information used to validate the merchant. This is an empty string by default. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a> object providing the information\n that needs to be delivered to the client-side code to present to the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> by calling <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent/complete\" title=\"complete()\"><code>complete()</code></a>.",
|
||
"throws": {
|
||
"TypeError": "Thrown if the string specified as <code>validationURL</code> could not be parsed as a URL.",
|
||
"RangeError": "Thrown if the specified <code>methodName</code> does not correspond to a known and supported merchant or is not a well-formed standard payment method identifier."
|
||
}
|
||
},
|
||
"merchantvalidationevent.methodname": {
|
||
"url": "$MDN_URL$/web/api/merchantvalidationevent/methodname",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a> property\n<strong><code>methodName</code></strong> is a read-only value which returns a string\nindicating the payment method identifier which represents the payment handler that\nrequires merchant validation."
|
||
},
|
||
"merchantvalidationevent.validationurl": {
|
||
"url": "$MDN_URL$/web/api/merchantvalidationevent/validationurl",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent\"><code>MerchantValidationEvent</code></a> property\n<strong><code>validationURL</code></strong> is a read-only string value providing the\nURL from which to fetch the payment handler-specific data needed to validate the\nmerchant.\n<p>This data should be passed into the <a href=\"$MDN_URL$/Web/API/MerchantValidationEvent/complete\" ><code>complete()</code></a> method to let the user agent complete the transaction."
|
||
},
|
||
"messagechannel": {
|
||
"url": "$MDN_URL$/web/api/messagechannel",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>MessageChannel</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Channel_Messaging_API\">Channel Messaging API</a> allows us to create a new message channel and send data through it via its two <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a> properties.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"messagechannel.messagechannel": {
|
||
"url": "$MDN_URL$/web/api/messagechannel/messagechannel",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>MessageChannel()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a>\ninterface returns a new <a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a> object with two new\n<a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a> objects.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a> object."
|
||
},
|
||
"messagechannel.port1": {
|
||
"url": "$MDN_URL$/web/api/messagechannel/port1",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "10.5.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>port1</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a> interface returns the first port of the message channel —\nthe port attached to the context that originated the channel.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"messagechannel.port2": {
|
||
"url": "$MDN_URL$/web/api/messagechannel/port2",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "10.5.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>port2</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a> interface returns the second port of the message channel —\nthe port attached to the context at the other end of the channel, which the message is\ninitially sent to.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"messageevent": {
|
||
"url": "$MDN_URL$/web/api/messageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3",
|
||
"Opera": "10.6",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.4"
|
||
},
|
||
"doc": "The <strong><code>MessageEvent</code></strong> interface represents a message received by a target object.\n<p>This is used to represent messages in:\n<ul>\n<li><a href=\"$MDN_URL$/Web/API/Server-sent_events\">Server-sent events</a> (see <a href=\"$MDN_URL$/Web/API/EventSource/message_event\"><code>EventSource.message_event</code></a>).</li>\n<li><a href=\"$MDN_URL$/Web/API/WebSockets_API\">Web sockets</a> (see the <code>onmessage</code> property of the <a href=\"$MDN_URL$/Web/API/WebSocket\">WebSocket</a> interface).</li>\n<li>Cross-document messaging (see <a href=\"$MDN_URL$/Web/API/Window/postMessage\"><code>Window.postMessage()</code></a> and <a href=\"$MDN_URL$/Web/API/Window/message_event\"><code>Window.message_event</code></a>).</li>\n<li><a href=\"$MDN_URL$/Web/API/Channel_Messaging_API\">Channel messaging</a> (see <a href=\"$MDN_URL$/Web/API/MessagePort/postMessage\"><code>MessagePort.postMessage()</code></a> and <a href=\"$MDN_URL$/Web/API/MessagePort/message_event\"><code>MessagePort.message_event</code></a>).</li>\n<li>Cross-worker/document messaging (see the above two entries, but also <a href=\"$MDN_URL$/Web/API/Worker/postMessage\"><code>Worker.postMessage()</code></a>, <a href=\"$MDN_URL$/Web/API/Worker/message_event\"><code>Worker.message_event</code></a>, <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope/message_event\"><code>ServiceWorkerGlobalScope.message_event</code></a>, etc.)</li>\n<li><a href=\"$MDN_URL$/Web/API/Broadcast_Channel_API\">Broadcast channels</a> (see <a href=\"$MDN_URL$/Web/API/BroadcastChannel/postMessage\"><code>BroadcastChannel.postMessage()</code></a>) and <a href=\"$MDN_URL$/Web/API/BroadcastChannel/message_event\"><code>BroadcastChannel.message_event</code></a>).</li>\n<li>WebRTC data channels (see <a href=\"$MDN_URL$/Web/API/RTCDataChannel/message_event\" ><code>onmessage</code></a>).</li>\n</ul>\n<p>The action triggered by this event is defined in a function set as the event handler for the relevant <code>message</code> event (e.g. using an <code>onmessage</code> handler as listed above).<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"messageevent.data": {
|
||
"url": "$MDN_URL$/web/api/messageevent/data",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.4"
|
||
},
|
||
"doc": "The <strong><code>data</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> interface represents the data sent by the message emitter."
|
||
},
|
||
"messageevent.lasteventid": {
|
||
"url": "$MDN_URL$/web/api/messageevent/lasteventid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "17",
|
||
"Firefox": "3",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.4"
|
||
},
|
||
"doc": "The <strong><code>lastEventId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> interface is a string representing a\nunique ID for the event."
|
||
},
|
||
"messageevent.messageevent": {
|
||
"url": "$MDN_URL$/web/api/messageevent/messageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "12.1",
|
||
"Safari": "6",
|
||
"SafariIOS": "6",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.4"
|
||
},
|
||
"doc": "The <strong><code>MessageEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>message</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The data you want contained in the MessageEvent. This can be of any data type, and will default to <code>null</code> if not specified. </dd> <dt id=\"origin\"><a href=\"#origin\"><code>origin</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing the origin of the message emitter. This defaults to an empty string (<code>''</code>) if not specified. </dd> <dt id=\"lasteventid\"><a href=\"#lasteventid\"><code>lastEventId</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing a unique ID for the event. This defaults to an empty string (\"\") if not specified. </dd> <dt id=\"source\"><a href=\"#source\"><code>source</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A <code>MessageEventSource</code> (which can be a <a href=\"$MDN_URL$/Web/API/Window\"><code>Window</code></a>, a <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a>, or a <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a> object) representing the message emitter. This defaults to <code>null</code> if not set. </dd> <dt id=\"ports\"><a href=\"#ports\"><code>ports</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a> objects representing the ports associated with the channel the message is being sent through where appropriate (E.g. in channel messaging or when sending a message to a shared worker). This defaults to an empty array (<code>[]</code>) if not specified. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> object."
|
||
},
|
||
"messageevent.origin": {
|
||
"url": "$MDN_URL$/web/api/messageevent/origin",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.4"
|
||
},
|
||
"doc": "The <strong><code>origin</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> interface is a string representing the\norigin of the message emitter."
|
||
},
|
||
"messageevent.ports": {
|
||
"url": "$MDN_URL$/web/api/messageevent/ports",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "4",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>ports</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> interface is an array of <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a> objects\nrepresenting the ports associated with the channel the message is being sent through\n(where appropriate, e.g. in channel messaging or when sending a message to a shared\nworker)."
|
||
},
|
||
"messageevent.source": {
|
||
"url": "$MDN_URL$/web/api/messageevent/source",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2",
|
||
"Nodejs": "15.0.0",
|
||
"Deno": "1.11"
|
||
},
|
||
"doc": "The <strong><code>source</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/MessageEvent\"><code>MessageEvent</code></a> interface is a <code>MessageEventSource</code> (which can be\na <a href=\"$MDN_URL$/Glossary/WindowProxy\">WindowProxy</a>, <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a>, or\n<a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a> object) representing the message emitter."
|
||
},
|
||
"messageport": {
|
||
"url": "$MDN_URL$/web/api/messageport",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "14.7.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>MessagePort</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Channel_Messaging_API\">Channel Messaging API</a> represents one of the two ports of a <a href=\"$MDN_URL$/Web/API/MessageChannel\"><code>MessageChannel</code></a>, allowing messages to be sent from one port and listening out for them arriving at the other.\n<p><code>MessagePort</code> is a <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Transferable_objects\">transferable object</a>.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"messageport.close": {
|
||
"url": "$MDN_URL$/web/api/messageport/close",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "14.7.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>close()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a>\ninterface disconnects the port, so it is no longer active. This stops the flow of\nmessages to that port.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"messageport.postmessage": {
|
||
"url": "$MDN_URL$/web/api/messageport/postmessage",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "10.5.0",
|
||
"Deno": "1.14"
|
||
},
|
||
"doc": "The <strong><code>postMessage()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a> interface sends a message from the port, and optionally,\ntransfers ownership of objects to other browsing contexts.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"parameters": {
|
||
"message": "The message you want to send through the channel. This can be of any basic data type. Multiple data items can be sent as an array.",
|
||
"options": "An optional object containing a <code>transfer</code> field with an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\">array</a> of <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Transferable_objects\">transferable objects</a> to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side.",
|
||
"transfer": "An optional <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\">array</a> of <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Transferable_objects\">transferable objects</a> to transfer ownership of. The ownership of these objects is given to the destination side and they are no longer usable on the sending side."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"messageport.start": {
|
||
"url": "$MDN_URL$/web/api/messageport/start",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "41",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "4.2",
|
||
"Nodejs": "10.5.0",
|
||
"Deno": "1.12"
|
||
},
|
||
"doc": "The <strong><code>start()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MessagePort\"><code>MessagePort</code></a>\ninterface starts the sending of messages queued on the port. This method is only needed\nwhen using <a href=\"$MDN_URL$/Web/API/EventTarget/addEventListener\"><code>EventTarget.addEventListener</code></a>; it is implied when using\n<a href=\"$MDN_URL$/Web/API/MessagePort/message_event\" ><code>onmessage</code></a>.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"metadata": {
|
||
"url": "$MDN_URL$/web/api/metadata",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "13",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79"
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Metadata</code></strong> interface contains information about a file system entry. This metadata includes the file's size and modification date and time.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This interface isn't available through the global scope; instead, you obtain a <code>Metadata</code> object describing a <a href=\"$MDN_URL$/Web/API/FileSystemEntry\"><code>FileSystemEntry</code></a> using the method <a href=\"$MDN_URL$/Web/API/FileSystemEntry/getMetadata\"><code>FileSystemEntry.getMetadata()</code></a>.\n</div>"
|
||
},
|
||
"metadata.modificationtime": {
|
||
"url": "$MDN_URL$/web/api/metadata/modificationtime",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "13",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79"
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The read-only <strong><code>modificationTime</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/Metadata\"><code>Metadata</code></a> interface is a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Date\"><code>Date</code></a> object which\nspecifies the date and time the file system entry (or the data referenced by the\nentry) was last modified. A file system entry is considered to have been\nmodified if the metadata or the contents of the referenced file (or directory, or\nwhatever other kind of file system entry might exist on the platform in use) has\nchanged."
|
||
},
|
||
"metadata.size": {
|
||
"url": "$MDN_URL$/web/api/metadata/size",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "13",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79"
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The read-only <strong><code>size</code></strong> property of\nthe <a href=\"$MDN_URL$/Web/API/Metadata\"><code>Metadata</code></a> interface specifies the size, in bytes, of the referenced\nfile or other file system object on disk."
|
||
},
|
||
"midiaccess": {
|
||
"url": "$MDN_URL$/web/api/midiaccess",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIAccess</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> provides methods for listing MIDI input and output devices, and obtaining access to those devices."
|
||
},
|
||
"midiaccess.inputs": {
|
||
"url": "$MDN_URL$/web/api/midiaccess/inputs",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>inputs</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> interface provides access to any available MIDI input ports."
|
||
},
|
||
"midiaccess.outputs": {
|
||
"url": "$MDN_URL$/web/api/midiaccess/outputs",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>outputs</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> interface provides access to any available MIDI output ports."
|
||
},
|
||
"midiaccess.sysexenabled": {
|
||
"url": "$MDN_URL$/web/api/midiaccess/sysexenabled",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>sysexEnabled</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> interface indicates whether system exclusive support is enabled on the current MIDIAccess instance."
|
||
},
|
||
"midiconnectionevent": {
|
||
"url": "$MDN_URL$/web/api/midiconnectionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIConnectionEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> is the event passed to the <a href=\"$MDN_URL$/Web/API/MIDIAccess/statechange_event\" ><code>statechange</code></a> event of the <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> interface and the <a href=\"$MDN_URL$/Web/API/MIDIPort/statechange_event\" ><code>statechange</code></a> event of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface. This occurs any time a new port becomes available, or when a previously available port becomes unavailable. For example, this event is fired whenever a MIDI device is either plugged in to or unplugged from a computer."
|
||
},
|
||
"midiconnectionevent.midiconnectionevent": {
|
||
"url": "$MDN_URL$/web/api/midiconnectionevent/midiconnectionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIConnectionEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MIDIConnectionEvent\"><code>MIDIConnectionEvent</code></a> object. Typically this constructor is not used as events are created when a new port becomes available, and the object is passed to the <a href=\"$MDN_URL$/Web/API/MIDIAccess/statechange_event\" ><code>statechange</code></a> event.",
|
||
"parameters": {
|
||
"type": "A string with one of <code>\"connect\"</code> or <code>\"disconnect\"</code>.",
|
||
"midiConnectionEventInit": "A dictionary including the following fields: <dl> <dt id=\"port\"><a href=\"#port\"><code>port</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> instance representing the port that has connected or disconnected. </dd> <dt id=\"bubbles\"><a href=\"#bubbles\"><code>bubbles</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating whether the event bubbles. The default is <code>false</code>. </dd> <dt id=\"cancelable\"><a href=\"#cancelable\"><code>cancelable</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating whether the event can be cancelled. The default is <code>false</code>. </dd> <dt id=\"composed\"><a href=\"#composed\"><code>composed</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating whether the event will trigger listeners outside of a shadow root (see <a href=\"$MDN_URL$/Web/API/Event/composed\"><code>Event.composed</code></a> for more details). The default is <code>false</code>. </dd> </dl>"
|
||
}
|
||
},
|
||
"midiconnectionevent.port": {
|
||
"url": "$MDN_URL$/web/api/midiconnectionevent/port",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>port</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIConnectionEvent\"><code>MIDIConnectionEvent</code></a> interface returns the port that has been disconnected or connected."
|
||
},
|
||
"midiinput": {
|
||
"url": "$MDN_URL$/web/api/midiinput",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIInput</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> receives messages from a MIDI input port."
|
||
},
|
||
"midiinputmap": {
|
||
"url": "$MDN_URL$/web/api/midiinputmap",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "The <strong><code>MIDIInputMap</code></strong> read-only interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> provides the set of MIDI input ports that are currently available.\n<p>A <code>MIDIInputMap</code> instance is a read-only <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis\"><code>Map</code>-like object</a>, in which each key is the ID string for MIDI input, and the associated value is the corresponding <a href=\"$MDN_URL$/Web/API/MIDIInput\"><code>MIDIInput</code></a> object."
|
||
},
|
||
"midimessageevent": {
|
||
"url": "$MDN_URL$/web/api/midimessageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIMessageEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> represents the event passed to the <a href=\"$MDN_URL$/Web/API/MIDIInput/midimessage_event\" ><code>midimessage</code></a> event of the <a href=\"$MDN_URL$/Web/API/MIDIInput\"><code>MIDIInput</code></a> interface. A <code>midimessage</code> event is fired every time a MIDI message is sent from a device represented by a <a href=\"$MDN_URL$/Web/API/MIDIInput\"><code>MIDIInput</code></a>, for example when a MIDI keyboard key is pressed, a knob is tweaked, or a slider is moved."
|
||
},
|
||
"midimessageevent.data": {
|
||
"url": "$MDN_URL$/web/api/midimessageevent/data",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>data</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIMessageEvent\"><code>MIDIMessageEvent</code></a> interface returns the MIDI data bytes of a single MIDI message."
|
||
},
|
||
"midimessageevent.midimessageevent": {
|
||
"url": "$MDN_URL$/web/api/midimessageevent/midimessageevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIMessageEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MIDIMessageEvent\"><code>MIDIMessageEvent</code></a> object. Typically this constructor is not used as events are created when a <a href=\"$MDN_URL$/Web/API/MIDIInput\"><code>MIDIInput</code></a> finishes receiving one or more MIDI messages.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>MIDIMessageEvent</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Uint8Array\"><code>Uint8Array</code></a> instance containing the data bytes of the MIDI message. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MIDIMessageEvent\"><code>MIDIMessageEvent</code></a> object."
|
||
},
|
||
"midioutput": {
|
||
"url": "$MDN_URL$/web/api/midioutput",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIOutput</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> provides methods to add messages to the queue of an output device, and to clear the queue of messages."
|
||
},
|
||
"midioutput.clear": {
|
||
"url": "$MDN_URL$/web/api/midioutput/clear",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "108"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>clear()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MIDIOutput\"><code>MIDIOutput</code></a> interface clears the queue of messages being sent to the output device.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"midioutput.send": {
|
||
"url": "$MDN_URL$/web/api/midioutput/send",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>send()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MIDIOutput\"><code>MIDIOutput</code></a> interface queues messages for the corresponding MIDI port. The message can be sent immediately, or with an optional timestamp to delay sending.",
|
||
"parameters": {
|
||
"data": "A sequence of one or more <a href=\"https://www.midi.org/midi-articles/about-midi-part-3-midi-messages\" class=\"external\" target=\"_blank\">valid MIDI messages</a>. Each entry represents a single byte of data.",
|
||
"timestamp": "A <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimestamp</code></a> with the time in milliseconds when the message should be sent (relative to <a href=\"$MDN_URL$/Web/API/Performance/timeOrigin\"><code>Performance.timeOrigin</code></a>)."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"TypeError": "Thrown if <code>data</code> is not a valid sequence, or does not contain a valid MIDI message.",
|
||
"InvalidAccessError DOMException": "Thrown if <code>data</code> is a system exclusive message, and the <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> did not enable exclusive access.",
|
||
"InvalidStateError DOMException": "Thrown if the port is disconnected."
|
||
}
|
||
},
|
||
"midioutputmap": {
|
||
"url": "$MDN_URL$/web/api/midioutputmap",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "The <strong><code>MIDIOutputMap</code></strong> read-only interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> provides the set of MIDI output ports that are currently available.\n<p>A <code>MIDIOutputMap</code> instance is a read-only <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Map#map-like_browser_apis\"><code>Map</code>-like object</a>, in which each key is the ID string for MIDI output, and the associated value is the corresponding <a href=\"$MDN_URL$/Web/API/MIDIOutput\"><code>MIDIOutput</code></a> object."
|
||
},
|
||
"midiport": {
|
||
"url": "$MDN_URL$/web/api/midiport",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>MIDIPort</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a> represents a MIDI input or output port.\n<p>A <code>MIDIPort</code> instance is created when a new MIDI device is connected. Therefore it has no constructor."
|
||
},
|
||
"midiport.close": {
|
||
"url": "$MDN_URL$/web/api/midiport/close",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>close()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface makes the access to the MIDI device connected to this <code>MIDIPort</code> unavailable.\n<p>If the port is successfully closed a new <a href=\"$MDN_URL$/Web/API/MIDIConnectionEvent\"><code>MIDIConnectionEvent</code></a> is queued to the <a href=\"$MDN_URL$/Web/API/MIDIPort/statechange_event\" ><code>MIDIPort statechange</code></a> and <a href=\"$MDN_URL$/Web/API/MIDIAccess/statechange_event\" ><code>MIDIAccess statechange</code></a> events, and the <a href=\"$MDN_URL$/Web/API/MIDIPort/connection\"><code>MIDIPort.connection</code></a> property is changed to <code>\"closed\"</code>.",
|
||
"returns": "Returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves once the port has been closed."
|
||
},
|
||
"midiport.connection": {
|
||
"url": "$MDN_URL$/web/api/midiport/connection",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>connection</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the connection state of the port."
|
||
},
|
||
"midiport.id": {
|
||
"url": "$MDN_URL$/web/api/midiport/id",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the unique ID of the port."
|
||
},
|
||
"midiport.manufacturer": {
|
||
"url": "$MDN_URL$/web/api/midiport/manufacturer",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>manufacturer</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the manufacturer of the port."
|
||
},
|
||
"midiport.name": {
|
||
"url": "$MDN_URL$/web/api/midiport/name",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>name</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the system name of the port."
|
||
},
|
||
"midiport.open": {
|
||
"url": "$MDN_URL$/web/api/midiport/open",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>open()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface makes the MIDI device connected to this <code>MIDIPort</code> explicitly available.\n<p>If the port is successfully opened a new <a href=\"$MDN_URL$/Web/API/MIDIConnectionEvent\"><code>MIDIConnectionEvent</code></a> is queued to the <a href=\"$MDN_URL$/Web/API/MIDIPort/statechange_event\" ><code>MIDIPort statechange</code></a> and <a href=\"$MDN_URL$/Web/API/MIDIAccess/statechange_event\" ><code>MIDIAccess statechange</code></a> events, and the <a href=\"$MDN_URL$/Web/API/MIDIPort/connection\"><code>MIDIPort.connection</code></a> property is changed to <code>\"open\"</code>.\n<p>If the port is already open when this method is called, then the promise will resolve successfully.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves once access to the port has been successfully obtained.",
|
||
"throws": {
|
||
"InvalidAccessError DOMException": "The promise is rejected with this error if the port is unavailable and cannot be opened."
|
||
}
|
||
},
|
||
"midiport.state": {
|
||
"url": "$MDN_URL$/web/api/midiport/state",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>state</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the state of the port."
|
||
},
|
||
"midiport.type": {
|
||
"url": "$MDN_URL$/web/api/midiport/type",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>type</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the type of the port, indicating whether this is an input or output MIDI port."
|
||
},
|
||
"midiport.version": {
|
||
"url": "$MDN_URL$/web/api/midiport/version",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>version</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MIDIPort\"><code>MIDIPort</code></a> interface returns the version of the port."
|
||
},
|
||
"mimetype": {
|
||
"url": "$MDN_URL$/web/api/mimetype",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>MimeType</code></strong> interface provides contains information about a MIME type associated with a particular plugin. <a href=\"$MDN_URL$/Web/API/Navigator/mimeTypes\"><code>Navigator.mimeTypes</code></a> returns an array of this object."
|
||
},
|
||
"mimetypearray": {
|
||
"url": "$MDN_URL$/web/api/mimetypearray",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>MimeTypeArray</code></strong> interface returns an array of <a href=\"$MDN_URL$/Web/API/MimeType\"><code>MimeType</code></a> instances, each of which contains information about a supported browser plugins. This object is returned by <a href=\"$MDN_URL$/Web/API/Navigator/mimeTypes\"><code>Navigator.mimeTypes</code></a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This interface was an <a href=\"https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156\" class=\"external\" target=\"_blank\">attempt to create an unmodifiable list</a> and only continues to be supported to not break code that's already using it. Modern APIs use types that wrap around ECMAScript array types instead, so you can treat them like ECMAScript arrays, and at the same time impose additional semantics on their usage (such as making their items read-only).\n</div>"
|
||
},
|
||
"mouseevent": {
|
||
"url": "$MDN_URL$/web/api/mouseevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "10.6",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent</code></strong> interface represents events that occur due to the user interacting with a pointing device (such as a mouse).\nCommon events using this interface include <a href=\"$MDN_URL$/Web/API/Element/click_event\" ><code>click</code></a>, <a href=\"$MDN_URL$/Web/API/Element/dblclick_event\" ><code>dblclick</code></a>, <a href=\"$MDN_URL$/Web/API/Element/mouseup_event\" ><code>mouseup</code></a>, <a href=\"$MDN_URL$/Web/API/Element/mousedown_event\" ><code>mousedown</code></a>.\n<p><code>MouseEvent</code> derives from <a href=\"$MDN_URL$/Web/API/UIEvent\"><code>UIEvent</code></a>, which in turn derives from <a href=\"$MDN_URL$/Web/API/Event\"><code>Event</code></a>.\nThough the <a href=\"$MDN_URL$/Web/API/MouseEvent/initMouseEvent\"><code>MouseEvent.initMouseEvent()</code></a> method is kept for backward compatibility, creating of a <code>MouseEvent</code> object should be done using the <a href=\"$MDN_URL$/Web/API/MouseEvent/MouseEvent\" ><code>MouseEvent()</code></a> constructor.\n<p>Several more specific events are based on <code>MouseEvent</code>, including <a href=\"$MDN_URL$/Web/API/WheelEvent\"><code>WheelEvent</code></a>, <a href=\"$MDN_URL$/Web/API/DragEvent\"><code>DragEvent</code></a>, and <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a>."
|
||
},
|
||
"mouseevent.altkey": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/altkey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.altKey</code></strong> read-only property is a boolean value that indicates whether the <kbd>alt</kbd> key was pressed or not when a given mouse event occurs.\n<p>Be aware that the browser can't always detect the <kbd>alt</kbd> key on some operating systems.\nOn some Linux variants, for example, a left mouse click combined with the <kbd>alt</kbd> key is used to move or resize windows.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> On Macintosh keyboards, this key is also known as the <kbd>option</kbd> key.\n</div>"
|
||
},
|
||
"mouseevent.button": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/button",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "10.6",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.button</code></strong> read-only property indicates which button was pressed on the mouse to trigger the event.\n<p>This property only guarantees to indicate which buttons are pressed during events caused by pressing or releasing one or multiple buttons.\nAs such, it is not reliable for events such as <a href=\"$MDN_URL$/Web/API/Element/mouseenter_event\" ><code>mouseenter</code></a>, <a href=\"$MDN_URL$/Web/API/Element/mouseleave_event\" ><code>mouseleave</code></a>, <a href=\"$MDN_URL$/Web/API/Element/mouseover_event\" ><code>mouseover</code></a>, <a href=\"$MDN_URL$/Web/API/Element/mouseout_event\" ><code>mouseout</code></a>, or <a href=\"$MDN_URL$/Web/API/Element/mousemove_event\" ><code>mousemove</code></a>.\n<p>Users may change the configuration of buttons on their pointing device so that if an event's button property is zero, it may not have been caused by the button that is physically left–most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Do not confuse this property with the <a href=\"$MDN_URL$/Web/API/MouseEvent/buttons\"><code>MouseEvent.buttons</code></a> property, which indicates which buttons are pressed for all mouse events types.\n</div>"
|
||
},
|
||
"mouseevent.buttons": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/buttons",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "15",
|
||
"Opera": "30",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.buttons</code></strong> read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.\n<p>Each button that can be pressed is represented by a given number (see below).\nIf more than one button is pressed, the button values are added together to produce a new number.\nFor example, if the secondary (<code>2</code>) and auxiliary (<code>4</code>) buttons are pressed simultaneously, the value is <code>6</code> (i.e., <code>2 + 4</code>).\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Do not confuse this property with the <a href=\"$MDN_URL$/Web/API/MouseEvent/button\"><code>MouseEvent.button</code></a> property.\nThe <a href=\"$MDN_URL$/Web/API/MouseEvent/buttons\" aria-current=\"page\"><code>MouseEvent.buttons</code></a> property indicates the state of buttons pressed during any kind of mouse event,\nwhile the <a href=\"$MDN_URL$/Web/API/MouseEvent/button\"><code>MouseEvent.button</code></a> property only guarantees the correct value for mouse events caused by pressing or releasing one or multiple buttons.\n</div>"
|
||
},
|
||
"mouseevent.clientx": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/clientx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "10.6",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>clientX</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the horizontal coordinate within the application's <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> at which the event occurred (as opposed to the coordinate within the page).\n<p>For example, clicking on the left edge of the viewport will always result in a mouse event with a <code>clientX</code> value of <code>0</code>, regardless of whether the page is scrolled horizontally."
|
||
},
|
||
"mouseevent.clienty": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/clienty",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>clientY</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the vertical coordinate within the application's <a href=\"$MDN_URL$/Glossary/Viewport\">viewport</a> at which the event occurred (as opposed to the coordinate within the page).\n<p>For example, clicking on the top edge of the viewport will always result in a mouse event with a <code>clientY</code> value of <code>0</code>, regardless of whether the page is scrolled vertically."
|
||
},
|
||
"mouseevent.ctrlkey": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/ctrlkey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.ctrlKey</code></strong> read-only property is a boolean value that indicates whether the <kbd>ctrl</kbd> key was pressed or not when a given mouse event occurs.\n<p>On Macintosh keyboards, this key is labeled the <kbd>control</kbd> key. Also, note that on a Mac, a click combined with the <kbd>control</kbd> key is intercepted by the operating system and used to open a context menu, so <code>ctrlKey</code> is not detectable on click events."
|
||
},
|
||
"mouseevent.getmodifierstate": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/getmodifierstate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "",
|
||
"Firefox": "15",
|
||
"Opera": "34",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.getModifierState()</code></strong> method returns the current state of the specified modifier key: <code>true</code> if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, <code>false</code>.\n<p>See <a href=\"$MDN_URL$/Web/API/KeyboardEvent/getModifierState\" ><code>KeyboardEvent.getModifierState()</code></a> for details.",
|
||
"parameters": {
|
||
"key": "A modifier key value. The value must be one of the <a href=\"$MDN_URL$/Web/API/KeyboardEvent/key\"><code>KeyboardEvent.key</code></a> values which represent modifier keys or <code>\"Accel\"</code> . This is case-sensitive."
|
||
},
|
||
"returns": "A boolean value."
|
||
},
|
||
"mouseevent.initmouseevent": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/initmouseevent",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>MouseEvent.initMouseEvent()</code></strong> method initializes the\nvalue of a mouse event once it's been created (normally using the <a href=\"$MDN_URL$/Web/API/Document/createEvent\"><code>Document.createEvent()</code></a> method).\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> Do not use this method anymore as it is deprecated.\n<p>Instead use specific event constructors, like <a href=\"$MDN_URL$/Web/API/MouseEvent/MouseEvent\" ><code>MouseEvent()</code></a>.\nThe page on <a href=\"$MDN_URL$/Web/Events/Creating_and_triggering_events\">Creating and triggering events</a> gives more information about the way to use these.\n</div>\n<p>Events initialized in this way must have been created with the <a href=\"$MDN_URL$/Web/API/Document/createEvent\"><code>Document.createEvent()</code></a> method.\nThis method must be called to set the event\nbefore it is dispatched, using <a href=\"$MDN_URL$/Web/API/EventTarget/dispatchEvent\"><code>EventTarget.dispatchEvent()</code></a>.",
|
||
"parameters": {
|
||
"type": "the string to set the event's <a href=\"$MDN_URL$/Web/API/Event/type\" ><code>type</code></a> to. Possible types for mouse events include: <code>click</code>, <code>mousedown</code>, <code>mouseup</code>, <code>mouseover</code>, <code>mousemove</code>, <code>mouseout</code>.",
|
||
"canBubble": "whether or not the event can bubble. Sets the value of <a href=\"$MDN_URL$/Web/API/Event/bubbles\"><code>Event.bubbles</code></a>.",
|
||
"cancelable": "whether or not the event's default action can be prevented. Sets the value of <a href=\"$MDN_URL$/Web/API/Event/cancelable\"><code>Event.cancelable</code></a>.",
|
||
"view": "the event's AbstractView. You should pass the <a href=\"$MDN_URL$/Web/API/Window\"><code>window</code></a> object here. Sets the value of <a href=\"$MDN_URL$/Web/API/UIEvent/view\"><code>UIEvent.view</code></a>.",
|
||
"detail": "the event's mouse click count. Sets the value of <a href=\"$MDN_URL$/Web/API/UIEvent/detail\"><code>UIEvent.detail</code></a>.",
|
||
"screenX": "the event's screen x coordinate. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/screenX\"><code>MouseEvent.screenX</code></a>.",
|
||
"screenY": "the event's screen y coordinate. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/screenY\"><code>MouseEvent.screenY</code></a>.",
|
||
"clientX": "the event's client x coordinate. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/clientX\"><code>MouseEvent.clientX</code></a>.",
|
||
"clientY": "the event's client y coordinate. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/clientY\"><code>MouseEvent.clientY</code></a>.",
|
||
"ctrlKey": "whether or not <kbd>control</kbd> key was pressed during the Event. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/ctrlKey\"><code>MouseEvent.ctrlKey</code></a>.",
|
||
"altKey": "whether or not <kbd>alt</kbd> key was pressed during the Event. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/altKey\"><code>MouseEvent.altKey</code></a>.",
|
||
"shiftKey": "whether or not <kbd>shift</kbd> key was pressed during the Event. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/shiftKey\"><code>MouseEvent.shiftKey</code></a>.",
|
||
"metaKey": "whether or not <kbd>meta</kbd> key was pressed during the Event. Sets the value of <a href=\"$MDN_URL$/Web/API/MouseEvent/metaKey\"><code>MouseEvent.metaKey</code></a>.",
|
||
"button": "the event's mouse <a href=\"$MDN_URL$/Web/API/MouseEvent/button\" ><code>button</code></a>.",
|
||
"relatedTarget": "the event's <a href=\"$MDN_URL$/Web/API/MouseEvent/relatedTarget\">related EventTarget</a>. Only used with some event types (e.g., <code>mouseover</code> and <code>mouseout</code>). In other cases, pass <code>null</code>."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mouseevent.layerx": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/layerx",
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MouseEvent.layerX</code></strong> read-only property returns the\nhorizontal coordinate of the event relative to the current layer.\n<p>This property takes scrolling of the page into account and returns a value relative to\nthe whole of the document unless the event occurs inside a positioned element, where the\nreturned value is relative to the top left of the positioned element."
|
||
},
|
||
"mouseevent.layery": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/layery",
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MouseEvent.layerY</code></strong> read-only property returns the\nvertical coordinate of the event relative to the current layer.\n<p>This property takes scrolling of the page into account, and returns a value relative to\nthe whole of the document, unless the event occurs inside a positioned element, where\nthe returned value is relative to the top left of the positioned element."
|
||
},
|
||
"mouseevent.metakey": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/metakey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.metaKey</code></strong> read-only property is a boolean value that indicates whether the <kbd>meta</kbd> key was pressed or not when a given mouse event occurs.\n<p>Be aware that many operating systems bind special functionality to the <kbd>meta</kbd> key, so this property may be <code>false</code> even when the key is actually pressed.\nOn Windows, for example, this key may open the Start menu.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> On Macintosh keyboards, this key is the <kbd>command</kbd> key (<kbd>⌘</kbd>).\nOn Windows keyboards, this key is the Windows key (<kbd>⊞</kbd>).\n</div>"
|
||
},
|
||
"mouseevent.mouseevent": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/mouseevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "11",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <strong><code>MouseEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>dblclick</code>, <code>mousedown</code>, <code>mouseenter</code>, <code>mouseleave</code>, <code>mousemove</code>, <code>mouseout</code>, <code>mouseover</code>, or <code>mouseup</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/UIEvent/UIEvent\" ><code>UIEvent()</code></a></em>, can have the following properties: <dl> <dt id=\"screenx\"><a href=\"#screenx\"><code>screenX</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that is the horizontal position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. </dd> <dt id=\"screeny\"><a href=\"#screeny\"><code>screenY</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that is the vertical position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer. </dd> <dt id=\"clientx\"><a href=\"#clientx\"><code>clientX</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that is the horizontal position of the mouse event on the client window of user's screen; setting this value doesn't move the mouse pointer. </dd> <dt id=\"clienty\"><a href=\"#clienty\"><code>clientY</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that is the vertical position of the mouse event on the client window of the user's screen; setting this value doesn't move the mouse pointer. </dd> <dt id=\"ctrlkey\"><a href=\"#ctrlkey\"><code>ctrlKey</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating if the <kbd>ctrl</kbd> key was simultaneously pressed. It defaults to <code>false</code>. </dd> <dt id=\"shiftkey\"><a href=\"#shiftkey\"><code>shiftKey</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating if the <kbd>shift</kbd> key was simultaneously pressed. It defaults to <code>false</code>. </dd> <dt id=\"altkey\"><a href=\"#altkey\"><code>altKey</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating if the <kbd>alt</kbd> key was simultaneously pressed. It defaults to <code>false</code>. </dd> <dt id=\"metakey\"><a href=\"#metakey\"><code>metaKey</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating if the <kbd>meta</kbd> key was simultaneously pressed. It defaults to <code>false</code>. </dd> <dt id=\"button\"><a href=\"#button\"><code>button</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that describes which button is pressed during events related to the press or release of a button: <figure class=\"table-container\"><table> <thead> <tr> <th>Value</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td><code>0</code></td> <td>Main button pressed (usually the left button) or un-initialized</td> </tr> <tr> <td><code>1</code></td> <td>Auxiliary button pressed (usually the middle button)</td> </tr> <tr> <td><code>2</code></td> <td>Secondary button pressed (usually the right button)</td> </tr> </tbody> </table></figure> </dd> <dt id=\"buttons\"><a href=\"#buttons\"><code>buttons</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number, defaulting to <code>0</code>, that describes which buttons are pressed when the event is launched: <figure class=\"table-container\"><table> <thead> <tr> <th>Bit-field value</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td><code>0</code></td> <td>No button pressed</td> </tr> <tr> <td><code>1</code></td> <td>Main button pressed (usually the left button)</td> </tr> <tr> <td><code>2</code></td> <td>Secondary button pressed (usually the right button)</td> </tr> <tr> <td><code>4</code></td> <td>Auxiliary button pressed (usually the middle button)</td> </tr> </tbody> </table></figure> </dd> <dt id=\"relatedtarget\"><a href=\"#relatedtarget\"><code>relatedTarget</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a>, defaulting to <code>null</code> that is the element just left (in case of a <a href=\"$MDN_URL$/Web/API/Element/mouseenter_event\" ><code>mouseenter</code></a> or <a href=\"$MDN_URL$/Web/API/Element/mouseover_event\" ><code>mouseover</code></a>) or is entering (in case of a <a href=\"$MDN_URL$/Web/API/Element/mouseout_event\" ><code>mouseout</code></a> or <a href=\"$MDN_URL$/Web/API/Element/mouseleave_event\" ><code>mouseleave</code></a>). </dd> <dt id=\"region\"><a href=\"#region\"><code>region</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string, defaulting to <code>null</code>, that is the ID of the hit region affected by the event. The absence of any affected hit region is represented with the <code>null</code> value. </dd> </dl> <p>In some implementations, passing anything other than a number for the screen and client fields will throw a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypeError\"><code>TypeError</code></a>."
|
||
}
|
||
},
|
||
"mouseevent.movementx": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/movementx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "37",
|
||
"ChromeAndroid": "37",
|
||
"Edge": "13",
|
||
"Firefox": "41",
|
||
"Opera": "24",
|
||
"Safari": "9",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>movementX</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous <a href=\"$MDN_URL$/Web/API/Element/mousemove_event\" ><code>mousemove</code></a> event.\nIn other words, the value of the property is computed like this: <code>currentEvent.movementX = currentEvent.screenX - previousEvent.screenX</code>.\n<div class=\"notecard warning\" id=\"sect1\">\n<p><strong>Warning:</strong> Browsers <a href=\"https://github.com/w3c/pointerlock/issues/42\" class=\"external\" target=\"_blank\">use different units for <code>movementX</code> and </a><a href=\"$MDN_URL$/Web/API/MouseEvent/screenX\" ><code>screenX</code></a> than what the specification defines. Depending on the browser and operating system, the <code>movementX</code> units may be a physical pixel, a logical pixel, or a CSS pixel. You may want to avoid the movement properties, and instead calculate the delta between the current client values (<a href=\"$MDN_URL$/Web/API/MouseEvent/screenX\" ><code>screenX</code></a>, <a href=\"$MDN_URL$/Web/API/MouseEvent/screenY\" ><code>screenY</code></a>) and the previous client values.\n</div>"
|
||
},
|
||
"mouseevent.movementy": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/movementy",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "37",
|
||
"ChromeAndroid": "37",
|
||
"Edge": "13",
|
||
"Firefox": "41",
|
||
"Opera": "24",
|
||
"Safari": "9",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>movementY</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous <a href=\"$MDN_URL$/Web/API/Element/mousemove_event\" ><code>mousemove</code></a> event.\nIn other words, the value of the property is computed like this: <code>currentEvent.movementY = currentEvent.screenY - previousEvent.screenY</code>.\n<div class=\"notecard warning\" id=\"sect1\">\n<p><strong>Warning:</strong> Browsers <a href=\"https://github.com/w3c/pointerlock/issues/42\" class=\"external\" target=\"_blank\">use different units for <code>movementY</code> and </a><a href=\"$MDN_URL$/Web/API/MouseEvent/screenY\" ><code>screenY</code></a> than what the specification defines. Depending on the browser and operating system, the <code>movementY</code> units may be a physical pixel, a logical pixel, or a CSS pixel. You may want to avoid the movement properties, and instead calculate the delta between the current client values (<a href=\"$MDN_URL$/Web/API/MouseEvent/screenX\" ><code>screenX</code></a>, <a href=\"$MDN_URL$/Web/API/MouseEvent/screenY\" ><code>screenY</code></a>) and the previous client values.\n</div>"
|
||
},
|
||
"mouseevent.mozinputsource": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/mozinputsource",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>MouseEvent.mozInputSource</code></strong> read-only property on <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> provides information indicating the type of device that generated the event.\nThis lets you, for example, determine whether a mouse event was generated by an actual mouse or by a touch event (which might affect the degree of accuracy with which you interpret the coordinates associated with the event)."
|
||
},
|
||
"mouseevent.offsetx": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/offsetx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "39",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>offsetX</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node."
|
||
},
|
||
"mouseevent.offsety": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/offsety",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "39",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>offsetY</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node."
|
||
},
|
||
"mouseevent.pagex": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/pagex",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>pageX</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.\nThis includes any portion of the document not currently visible.\n<p>Being based on the edge of the document as it is, this property takes into account any horizontal scrolling of the page.\nFor example, if the page is scrolled such that 200 pixels of the left side of the document are scrolled out of view, and the mouse is clicked 100 pixels inward from the left edge of the view, the value returned by <code>pageX</code> will be 300.\n<p>Originally, this property was defined as a <code>long</code> integer. The <a href=\"$MDN_URL$/Web/CSS/CSSOM_view\">CSSOM View Module</a> redefined it as a\n<code>double</code> float. See the <a href=\"#browser_compatibility\">Browser compatibility</a> section for\ndetails.\n<p>See <a href=\"$MDN_URL$/Web/CSS/CSSOM_view/Coordinate_systems#page\">Coordinate systems</a> for additional information about coordinates specified in this fashion."
|
||
},
|
||
"mouseevent.pagey": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/pagey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>pageY</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document.\nThis property takes into account any vertical scrolling of the page."
|
||
},
|
||
"mouseevent.relatedtarget": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/relatedtarget",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.relatedTarget</code></strong> read-only property is the secondary target for the mouse event, if there is one.\n<p>That is:\n<figure class=\"table-container\"><table class=\"no-markdown\">\n<thead>\n<tr>\n<th>Event name</th>\n<th><code>target</code></th>\n<th><code>relatedTarget</code></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/Element/mouseenter_event\" ><code>mouseenter</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n</tr>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/Element/mouseleave_event\" ><code>mouseleave</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n</tr>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/Element/mouseout_event\" ><code>mouseout</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n</tr>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/Element/mouseover_event\" ><code>mouseover</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n</tr>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/HTMLElement/dragenter_event\" ><code>dragenter</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n</tr>\n<tr>\n<td><a href=\"$MDN_URL$/Web/API/HTMLElement/dragleave_event\" ><code>dragleave</code></a></td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device exited from</td>\n<td>The <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> the pointing device entered to</td>\n</tr>\n</tbody>\n</table></figure>\n<p>For events with no secondary target, <code>relatedTarget</code> returns\n<code>null</code>.\n<p><a href=\"$MDN_URL$/Web/API/FocusEvent/relatedTarget\"><code>FocusEvent.relatedTarget</code></a> is a similar property for focus events."
|
||
},
|
||
"mouseevent.screenx": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/screenx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>screenX</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the horizontal coordinate (offset) of the mouse pointer in <a href=\"$MDN_URL$/Web/CSS/CSSOM_view/Coordinate_systems#screen\">screen coordinates</a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> In a multiscreen environment, screens aligned horizontally will be treated as a single device, and so the range of the <code>screenX</code> value will increase to the combined width of the screens.\n</div>"
|
||
},
|
||
"mouseevent.screeny": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/screeny",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>screenY</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MouseEvent\"><code>MouseEvent</code></a> interface provides the vertical coordinate (offset) of the mouse pointer in <a href=\"$MDN_URL$/Web/CSS/CSSOM_view/Coordinate_systems#screen\">screen coordinates</a>."
|
||
},
|
||
"mouseevent.shiftkey": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/shiftkey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.shiftKey</code></strong> read-only property is a boolean value that indicates whether the <kbd>shift</kbd> key was pressed or not when a given mouse event occurs."
|
||
},
|
||
"mouseevent.webkit_force_at_force_mouse_down": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/webkit_force_at_force_mouse_down_static",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p><strong><code>MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN</code></strong> is a proprietary, WebKit-specific, static numeric property whose value is the minimum force necessary for a force click.\n<p>Because <code>WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN</code> is a static property of <code>MouseEvent</code>, you always use it as <code>MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN</code>, rather than as a property of a <code>MouseEvent</code> instance."
|
||
},
|
||
"mouseevent.webkit_force_at_mouse_down": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/webkit_force_at_mouse_down_static",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p><strong><code>MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN</code></strong> is a proprietary, WebKit-specific, static numeric property whose value is the minimum force necessary for a normal click.\n<p>Because <code>WEBKIT_FORCE_AT_MOUSE_DOWN</code> is a static property of <code>MouseEvent</code>, you always use it as <code>MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN</code>, rather than as a property of a <code>MouseEvent</code> instance."
|
||
},
|
||
"mouseevent.webkitforce": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/webkitforce",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p><strong><code>MouseEvent.webkitForce</code></strong> is a proprietary, WebKit-specific numeric property whose value represents the amount of pressure that is being applied on the touchpad or touchscreen."
|
||
},
|
||
"mouseevent.x": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/x",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "53",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2"
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.x</code></strong> property is an alias for the <a href=\"$MDN_URL$/Web/API/MouseEvent/clientX\"><code>MouseEvent.clientX</code></a> property."
|
||
},
|
||
"mouseevent.y": {
|
||
"url": "$MDN_URL$/web/api/mouseevent/y",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "53",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2"
|
||
},
|
||
"doc": "The <strong><code>MouseEvent.y</code></strong> property is an alias for the <a href=\"$MDN_URL$/Web/API/MouseEvent/clientY\"><code>MouseEvent.clientY</code></a> property."
|
||
},
|
||
"mousescrollevent": {
|
||
"url": "$MDN_URL$/web/api/mousescrollevent",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "3.5"
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>MouseScrollEvent</code></strong> interface represents events that occur due to the user moving a mouse wheel or similar input device.\n<div class=\"notecard warning\" id=\"sect3\">\n<p><strong>Warning:</strong> Do not use this interface for wheel events.\n<p>Like <code>MouseWheelEvent</code>, this interface is non-standard and deprecated. It was used in Gecko-based browsers only. Instead use the standard <em><a href=\"$MDN_URL$/Web/API/WheelEvent\"><code>WheelEvent</code></a>.</em>\n</div>"
|
||
},
|
||
"mutationevent": {
|
||
"url": "$MDN_URL$/web/api/mutationevent",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>MutationEvent</code></strong> interface provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Using <em>mutation events</em> is problematic:\n<ul>\n<li>Their design is <a href=\"https://lists.w3.org/Archives/Public/public-webapps/2011JulSep/0779.html\" class=\"external\" target=\"_blank\">flawed</a>.</li>\n<li>Adding DOM mutation listeners to a document <a href=\"https://groups.google.com/d/topic/mozilla.dev.platform/L0Lx11u5Bvs?pli=1\" class=\"external\" target=\"_blank\">profoundly degrades the performance</a> of further DOM modifications to that document (making them 1.5 - 7 times slower!). Moreover, removing the listeners does not reverse the damage.</li>\n<li>They have poor cross-browser compatibility: Safari doesn't support <code>DOMAttrModified</code> (see <a href=\"https://webkit.org/b/8191\" class=\"external\" target=\"_blank\">WebKit bug 8191</a>) and Firefox doesn't support <em>mutation name events</em> (like <code>DOMElementNameChanged</code> and <code>DOMAttributeNameChanged</code>).</li>\n</ul>\n<p>They have been deprecated in favor of <a href=\"$MDN_URL$/Web/API/MutationObserver\">mutation observers</a>. <strong>Consider using these instead.</strong>\n</div>"
|
||
},
|
||
"mutationevent.attrchange": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/attrchange",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>attrChange</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface returns a number indicating what kind of change triggered the <code>DOMAttrModified</code> event. The three possible values are <code>MODIFICATION</code> (<code>1</code>), <code>ADDITION</code> (<code>2</code>) or <code>REMOVAL</code> (<code>3</code>). It has no meaning for other events and is then set to <code>0</code>."
|
||
},
|
||
"mutationevent.attrname": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/attrname",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>attrName</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface returns a string with the name of the node affected by the <code>DOMAttrModified</code> event. It has no meaning for other events and is then set to the empty string (<code>\"\"</code>)."
|
||
},
|
||
"mutationevent.initmutationevent": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/initmutationevent",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>initMutationEvent()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface initializes the\nvalue of a mutation event once it's been created (normally using the <a href=\"$MDN_URL$/Web/API/Document/createEvent\"><code>Document.createEvent()</code></a> method).\n<p>This method must be called to set the event before it is dispatched, using <a href=\"$MDN_URL$/Web/API/EventTarget/dispatchEvent\"><code>EventTarget.dispatchEvent()</code></a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> In general, you won't create these events yourself; they are created by the browser.\n</div>",
|
||
"parameters": {
|
||
"type": "A string to set the event's <a href=\"$MDN_URL$/Web/API/Event/type\" ><code>type</code></a> to. Browsers set the following values for <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a>: <code>DOMAttrModified</code>, <code>DOMAttributeNameChanged</code>, <code>DOMCharacterDataModified</code>, <code>DOMElementNameChanged</code>, <code>DOMNodeInserted</code>, <code>DOMNodeInsertedIntoDocument</code>, <code>DOMNodeRemoved</code>, <code>DOMNodeRemovedFromDocument</code>,<code>DOMSubtreeModified</code>.",
|
||
"canBubble": "A boolean indicating whether or not the event can bubble. Sets the value of <a href=\"$MDN_URL$/Web/API/Event/bubbles\"><code>Event.bubbles</code></a>.",
|
||
"cancelable": "A boolean indicating whether or not the event's default action can be prevented. Sets the value of <a href=\"$MDN_URL$/Web/API/Event/cancelable\"><code>Event.cancelable</code></a>.",
|
||
"relatedNode": "A string representing the new value of the modified node, if any. Sets the value of <a href=\"$MDN_URL$/Web/API/MutationEvent/relatedNode\"><code>MutationEvent.relatedNode</code></a>.",
|
||
"prevValue": "A string representing the previous value of the modified node, if any. Sets the value of <a href=\"$MDN_URL$/Web/API/MutationEvent/prevValue\"><code>MutationEvent.prevValue</code></a>.",
|
||
"newValue": "A string representing the new value of the modified node, if any. Sets the value of <a href=\"$MDN_URL$/Web/API/MutationEvent/newValue\"><code>MutationEvent.newValue</code></a>.",
|
||
"attrName": "A string representing the name of the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> node changed, if any. Sets the value of <a href=\"$MDN_URL$/Web/API/MutationEvent/attrName\"><code>MutationEvent.attrName</code></a>.",
|
||
"attrChange": "A integer representing the reason attribute node changed. Sets the value of <a href=\"$MDN_URL$/Web/API/MutationEvent/attrChange\"><code>MutationEvent.attrChange</code></a>."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"mutationevent.newvalue": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/newvalue",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>newValue</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface returns a string. In <code>DOMAttrModified</code> events, it represents the new value of the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> node. In <code>DOMCharacterDataModified</code> events, it contains the new value of the <a href=\"$MDN_URL$/Web/API/CharacterData\"><code>CharacterData</code></a> node. In all other cases, returns the empty string (<code>\"\"</code>)."
|
||
},
|
||
"mutationevent.prevvalue": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/prevvalue",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>prevValue</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface returns a string. In <code>DOMAttrModified</code> events, it represents the previous value of the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> node. In <code>DOMCharacterDataModified</code> events, it contains the previous value of the <a href=\"$MDN_URL$/Web/API/CharacterData\"><code>CharacterData</code></a> node. In all other cases, returns the empty string (<code>\"\"</code>)."
|
||
},
|
||
"mutationevent.relatednode": {
|
||
"url": "$MDN_URL$/web/api/mutationevent/relatednode",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>relatedNode</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/MutationEvent\"><code>MutationEvent</code></a> interface returns a string indicating the node related to the event, like the changed node inside the subtree for <code>DOMSubtreeModified</code>."
|
||
},
|
||
"mutationobserver": {
|
||
"url": "$MDN_URL$/web/api/mutationobserver",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationObserver\" aria-current=\"page\"><code>MutationObserver</code></a> interface provides the ability to watch for changes being made to the <a href=\"$MDN_URL$/Web/API/Document_Object_Model\">DOM</a> tree. It is designed as a replacement for the older <a href=\"$MDN_URL$/Web/API/MutationEvent\">Mutation Events</a> feature, which was part of the DOM3 Events specification."
|
||
},
|
||
"mutationobserver.disconnect": {
|
||
"url": "$MDN_URL$/web/api/mutationobserver/disconnect",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "18",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> method\n<strong><code>disconnect()</code></strong> tells the observer to stop watching for\nmutations.\n<p>The observer can be reused by calling its\n<a href=\"$MDN_URL$/Web/API/MutationObserver/observe\" ><code>observe()</code></a> method again.",
|
||
"returns": "<code>undefined</code>.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> All notifications of mutations that have already been\n <em>detected</em>, but <em>not yet reported</em> to the observer, are discarded.\n To hold on to and handle the detected but unreported mutations, use\n the <a href=\"$MDN_URL$/Web/API/MutationObserver/takeRecords\" title=\"takeRecords()\"><code>takeRecords()</code></a> method.\n</div>"
|
||
},
|
||
"mutationobserver.mutationobserver": {
|
||
"url": "$MDN_URL$/web/api/mutationobserver/mutationobserver",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "26",
|
||
"ChromeAndroid": "26",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The DOM <strong><code>MutationObserver()</code></strong>\nconstructor — part of the <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> interface — creates and\nreturns a new observer which invokes a specified callback when DOM events\noccur.\n<p>DOM observation does not begin immediately; the\n<a href=\"$MDN_URL$/Web/API/MutationObserver/observe\" ><code>observe()</code></a> method must be called first to\nestablish which portion of the DOM to watch and what kinds of changes to watch for.",
|
||
"parameters": {
|
||
"callback": "A function which will be called on each DOM change that qualifies given the observed node or subtree and options. <p>The <code>callback</code> function takes as input two parameters: <ol> <li> An array of <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> objects, describing each change that occurred. </li> <li> The <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> which invoked the <code>callback</code>. This is most often used to disconnect the observer using <a href=\"$MDN_URL$/Web/API/MutationObserver/disconnect\"><code>MutationObserver.disconnect()</code></a>. </li> </ol> <p>See the <a href=\"#examples\">examples</a> below for more details."
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> object, configured to call the specified\n <code>callback</code> when DOM mutations occur."
|
||
},
|
||
"mutationobserver.observe": {
|
||
"url": "$MDN_URL$/web/api/mutationobserver/observe",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "18",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> method <strong><code>observe()</code></strong> configures the <code>MutationObserver</code>\ncallback to begin receiving notifications of changes to the DOM that match the given options.\n<p>Depending on the configuration, the observer may watch a single <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> in the DOM tree, or that node and some or all of its descendant nodes.\n<p>To stop the <code>MutationObserver</code> (so that none of its callbacks will be triggered any longer), call <a href=\"$MDN_URL$/Web/API/MutationObserver/disconnect\"><code>MutationObserver.disconnect()</code></a>.",
|
||
"parameters": {
|
||
"target": "A DOM <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> (which may be an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>) within the DOM tree to watch for changes, or to be the root of a subtree of nodes to be watched.",
|
||
"options": "An object providing options that describe which DOM mutations should be reported to <code>mutationObserver</code>'s <code>callback</code>. At a minimum, one of <code>childList</code>, <code>attributes</code>, and/or <code>characterData</code> must be <code>true</code> when you call <a href=\"$MDN_URL$/Web/API/MutationObserver/observe\" aria-current=\"page\"><code>observe()</code></a>. Otherwise, a <code>TypeError</code> exception will be thrown. <p>Options are as follows: <dl> <dt id=\"subtree\"><a href=\"#subtree\"><code>subtree</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to extend monitoring to the entire subtree of nodes rooted at <code>target</code>. All of the other properties are then extended to all of the nodes in the subtree instead of applying solely to the <code>target</code> node. The default value is <code>false</code>. </dd> <dt id=\"childlist\"><a href=\"#childlist\"><code>childList</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to monitor the target node (and, if <code>subtree</code> is <code>true</code>, its descendants) for the addition of new child nodes or removal of existing child nodes. The default value is <code>false</code>. </dd> <dt id=\"attributes\"><a href=\"#attributes\"><code>attributes</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to watch for changes to the value of attributes on the node or nodes being monitored. The default value is <code>true</code> if either of <code>attributeFilter</code> or <code>attributeOldValue</code> is specified, otherwise the default value is <code>false</code>. </dd> <dt id=\"attributefilter\"><a href=\"#attributefilter\"><code>attributeFilter</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of specific attribute names to be monitored. If this property isn't included, changes to all attributes cause mutation notifications. </dd> <dt id=\"attributeoldvalue\"><a href=\"#attributeoldvalue\"><code>attributeOldValue</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to record the previous value of any attribute that changes when monitoring the node or nodes for attribute changes; See <a href=\"#monitoring_attribute_values\">Monitoring attribute values</a> for an example of watching for attribute changes and recording values. The default value is <code>false</code>. </dd> <dt id=\"characterdata\"><a href=\"#characterdata\"><code>characterData</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to monitor the specified target node (and, if <code>subtree</code> is <code>true</code>, its descendants) for changes to the character data contained within the node or nodes. The default value is <code>true</code> if <code>characterDataOldValue</code> is specified, otherwise the default value is <code>false</code>. </dd> <dt id=\"characterdataoldvalue\"><a href=\"#characterdataoldvalue\"><code>characterDataOldValue</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Set to <code>true</code> to record the previous value of a node's text whenever the text changes on nodes being monitored. The default value is <code>false</code>. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"TypeError": "Thrown in any of the following circumstances: <ul> <li> The <code>options</code> are configured such that nothing will actually be monitored. (For example, if <code>childList</code>, <code>attributes</code>, and <code>characterData</code> are all <code>false</code>.) </li> <li> The value of <code>options.attributes</code> is <code>false</code> (indicating that attribute changes are not to be monitored), but <code>attributeOldValue</code> is <code>true</code> and/or <code>attributeFilter</code> is present. </li> <li>The <code>characterDataOldValue</code> option is <code>true</code> but <code>characterData</code> is <code>false</code> (indicating that character changes are not to be monitored).</li> </ul>"
|
||
}
|
||
},
|
||
"mutationobserver.takerecords": {
|
||
"url": "$MDN_URL$/web/api/mutationobserver/takerecords",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a> method\n<strong><code>takeRecords()</code></strong> returns a list of all matching DOM changes\nthat have been detected but not yet processed by the observer's callback function,\nleaving the mutation queue empty.\n<p>The most common use case for this is to\nimmediately fetch all pending mutation records immediately prior to disconnecting the\nobserver, so that any pending mutations can be processed when shutting down the\nobserver.",
|
||
"returns": "An array of <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> objects, each describing one change applied to\n the observed portion of the document's DOM tree.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The queue of mutations which have occurred, but not been\n delivered to the observer's callback is left empty after calling\n <code>takeRecords()</code>.\n</div>"
|
||
},
|
||
"mutationrecord": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\" aria-current=\"page\"><code>MutationRecord</code></a> is a read-only interface that represents an individual DOM mutation observed by a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>. It is the object inside the array passed to the callback of a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.addednodes": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/addednodes",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>addedNodes</code></strong> is a <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a> of nodes added to a target node by a mutation observed with a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.attributename": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/attributename",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>attributeName</code></strong> contains the name of a changed attribute belonging to a node that is observed by a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.attributenamespace": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/attributenamespace",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>attributeNamespace</code></strong> is the namespace of the mutated attribute in the <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> observed by a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.nextsibling": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/nextsibling",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>nextSibling</code></strong> is the next sibling of an added or removed child node of the <a href=\"$MDN_URL$/Web/API/MutationRecord/target\"><code>target</code></a> of a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.oldvalue": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/oldvalue",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>oldValue</code></strong> contains the character data or attribute value of an observed node before it was changed."
|
||
},
|
||
"mutationrecord.previoussibling": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/previoussibling",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>previousSibling</code></strong> is the previous sibling of an added or removed child node of the <a href=\"$MDN_URL$/Web/API/MutationRecord/target\"><code>target</code></a> of a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.removednodes": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/removednodes",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>removedNodes</code></strong> is a <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a> of nodes removed from a target node by a mutation observed with a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.target": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/target",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>target</code></strong> is the target (i.e. the mutated/changed node) of a mutation observed with a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"mutationrecord.type": {
|
||
"url": "$MDN_URL$/web/api/mutationrecord/type",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "14",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> read-only property <strong><code>type</code></strong> is the type of the <a href=\"$MDN_URL$/Web/API/MutationRecord\"><code>MutationRecord</code></a> observed by a <a href=\"$MDN_URL$/Web/API/MutationObserver\"><code>MutationObserver</code></a>."
|
||
},
|
||
"namednodemap": {
|
||
"url": "$MDN_URL$/web/api/namednodemap",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "34",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>NamedNodeMap</code></strong> interface represents a collection of <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> objects. Objects inside a <code>NamedNodeMap</code> are not in any particular order, unlike <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a>, although they may be accessed by an index as in an array.\n<p>A <code>NamedNodeMap</code> object is <em>live</em> and will thus be auto-updated if changes are made to its contents internally or elsewhere.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Although called <code>NamedNodeMap</code>, this interface doesn't deal with <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> objects but with <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> objects, which are a specialized class of <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> objects.\n</div>"
|
||
},
|
||
"namednodemap.getnameditem": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/getnameditem",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>getNamedItem()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the given name, or <code>null</code> if there is no corresponding attribute.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method is also called when you use the operator <code>[]</code> syntax.\nSo, <code>myMap[str]</code>is equivalent to <code>myMap.getNamedItem(str)</code> where <code>str</code> is a string.\n</div>",
|
||
"parameters": {
|
||
"name": "A string with the name of the desired attribute."
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the <code>name</code> given in parameter, or <code>null</code> if none has been found."
|
||
},
|
||
"namednodemap.getnameditemns": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/getnameditemns",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>getNamedItemNS()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the given local name in the given namespace, or <code>null</code> if there is no corresponding attribute.",
|
||
"parameters": {
|
||
"namespace": "A string with the namespace URI of the desired attribute. <div class=\"notecard warning\" id=\"sect1\"> <p><strong>Warning:</strong> <code>namespace</code> is the URI of the namespace, not the prefix. </div>",
|
||
"localName": "A string with the localName of the desired attribute."
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the namespace and local name given in parameters, or <code>null</code> if none has been found."
|
||
},
|
||
"namednodemap.item": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/item",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>item()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nreturns the item in the map matching the index.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method is also called when you use the operator <code>[]</code> syntax.\nSo, <code>myMap[i]</code>is equivalent to <code>myMap.item(i)</code> where <code>i</code> is a number.\n</div>",
|
||
"parameters": {
|
||
"index": "A number representing the index of the item you want to return."
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> or <code>null</code> if the number is greater than or equal to the <code>length</code> of\n the map."
|
||
},
|
||
"namednodemap.length": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/length",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>length</code></strong> property of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nis the number of objects stored in the map."
|
||
},
|
||
"namednodemap.removenameditem": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/removenameditem",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>removeNamedItem()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nremoves the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the given name from the map.",
|
||
"parameters": {
|
||
"attrName": "The name of the attribute to remove from the map."
|
||
},
|
||
"returns": "The removed <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a>.",
|
||
"throws": {
|
||
"NotFoundError DOMException": "Thrown if there is no attribute with the given name."
|
||
}
|
||
},
|
||
"namednodemap.removenameditemns": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/removenameditemns",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>removedNamedItemNS()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nremoves the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> corresponding to the given namespace and local name from the map.",
|
||
"parameters": {
|
||
"namespace": "The namespace of the attribute to remove from the map <div class=\"notecard warning\" id=\"sect1\"> <p><strong>Warning:</strong> <code>namespace</code> is the URI of the namespace, not the prefix. </div>",
|
||
"localName": "The local name of the attribute to remove from the map."
|
||
},
|
||
"returns": "The removed <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a>.",
|
||
"throws": {
|
||
"NotFoundError DOMException": "Thrown if there is no attribute with the given namespace and local name."
|
||
}
|
||
},
|
||
"namednodemap.setnameditem": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/setnameditem",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>setNamedItem()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nputs the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> identified by its name in the map.\nIf there is already an <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> with the same name in the map,\nit is <em>replaced</em>.",
|
||
"parameters": {
|
||
"attr": "the attribute to insert in the map."
|
||
},
|
||
"returns": "Returns the old attribute if replaced, or <code>null</code> if the attribute is new.",
|
||
"throws": {
|
||
"InUseAttributeError DOMException": "Thrown if the attribute is still part of another map."
|
||
}
|
||
},
|
||
"namednodemap.setnameditemns": {
|
||
"url": "$MDN_URL$/web/api/namednodemap/setnameditemns",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>setNamedItemNS()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NamedNodeMap\"><code>NamedNodeMap</code></a> interface\nputs the <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> identified by its name in the map.\nIf there was already an <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a> with the same name in the map,\nit is <em>replaced</em>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method is an alias of <code>setNamedItem()</code> you can use them\ninterchangeably.\n</div>",
|
||
"parameters": {
|
||
"attr": "The attribute to insert in the map."
|
||
},
|
||
"returns": "Returns the old attribute if replaced, or <code>null</code> if the attribute is new.",
|
||
"throws": {
|
||
"InUseAttributeError DOMException": "Thrown if the attribute is still part of another map."
|
||
}
|
||
},
|
||
"navigateevent": {
|
||
"url": "$MDN_URL$/web/api/navigateevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigateEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> is the event object for the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, which fires when <a href=\"https://github.com/WICG/navigation-api#appendix-types-of-navigations\" class=\"external\" target=\"_blank\">any type of navigation</a> is initiated (this includes usage of <a href=\"$MDN_URL$/Web/API/History_API\" >History API</a> features like <a href=\"$MDN_URL$/Web/API/History/go\"><code>History.go()</code></a>). <code>NavigateEvent</code> provides access to information about that navigation, and allows developers to intercept and control the navigation handling."
|
||
},
|
||
"navigateevent.canintercept": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/canintercept",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "105",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "105"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>canIntercept</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns <code>true</code> if the navigation can be intercepted and have its URL rewritten, or <code>false</code> otherwise\n<p>There are several rules around when a navigation can be intercepted. For example:\n<ul>\n<li>You can't intercept cross-origin navigations.</li>\n<li>You can intercept <code>http</code> or <code>https</code> URLs if only the <code>path</code>, <code>query</code>, and <code>fragment</code> portions of the new URL differ from the current URL.</li>\n<li>You can intercept <code>file</code> URLs if only the <code>query</code> and <code>fragment</code> portions of the new URL differ.</li>\n<li>For other URL types you can intercept the navigation if only the <code>fragment</code> portion differs.</li>\n</ul>\n<p>See the spec for more explanation on <a href=\"https://html.spec.whatwg.org/multipage/nav-history-apis.html#can-have-its-url-rewritten\" class=\"external\" target=\"_blank\">when a Document can have its URL rewritten</a>, including a table of examples."
|
||
},
|
||
"navigateevent.destination": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/destination",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>destination</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> object representing the destination being navigated to."
|
||
},
|
||
"navigateevent.downloadrequest": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/downloadrequest",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>downloadRequest</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns the filename of the file requested for download, in the case of a download navigation (e.g. an <a href=\"$MDN_URL$/Web/HTML/Element/a\"><code><a></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/area\"><code><area></code></a> element with a <code>download</code> attribute), or <code>null</code> otherwise."
|
||
},
|
||
"navigateevent.formdata": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/formdata",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>formData</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/FormData\"><code>FormData</code></a> object representing the submitted data in the case of a <a href=\"$MDN_URL$/Web/HTTP/Methods/POST\"><code>POST</code></a> form submission, or <code>null</code> otherwise."
|
||
},
|
||
"navigateevent.hashchange": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/hashchange",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>hashChange</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns <code>true</code> if the navigation is a fragment navigation (i.e. to a fragment identifier in the same document), or <code>false</code> otherwise."
|
||
},
|
||
"navigateevent.info": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/info",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>info</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns the <code>info</code> data value passed by the initiating navigation operation (e.g. <a href=\"$MDN_URL$/Web/API/Navigation/back\"><code>Navigation.back()</code></a>, or <a href=\"$MDN_URL$/Web/API/Navigation/navigate\"><code>Navigation.navigate()</code></a>), or <code>undefined</code> if no <code>info</code> data was passed."
|
||
},
|
||
"navigateevent.intercept": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/intercept",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "105",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "105"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>intercept()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface intercepts this navigation, turning it into a same-document navigation to the <a href=\"$MDN_URL$/Web/API/NavigationDestination/url\" ><code>destination</code></a> URL.",
|
||
"parameters": {
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"handler\"><a href=\"#handler\"><code>handler</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A callback function that defines what the navigation handling behavior should be. This generally handles resource fetching, and returns a promise. </dd> <dt id=\"focusreset\"><a href=\"#focusreset\"><code>focusReset</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Defines the navigation's focus behavior. This may take one of the following values: <dl> <dt id=\"after-transition\"><a href=\"#after-transition\"><code>after-transition</code></a></dt> <dd> <p>Once the promise returned by your handler function resolves, the browser will focus the first element with the <a href=\"$MDN_URL$/Web/HTML/Global_attributes/autofocus\"><code>autofocus</code></a> attribute, or the <a href=\"$MDN_URL$/Web/HTML/Element/body\"><code><body></code></a> element if no element has <code>autofocus</code> set. This is the default value. </dd> <dt id=\"manual\"><a href=\"#manual\"><code>manual</code></a></dt> <dd> <p>Disable the default behavior. </dd> </dl> </dd> <dt id=\"scroll\"><a href=\"#scroll\"><code>scroll</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Defines the navigation's scrolling behavior. This may take one of the following values: <dl> <dt id=\"after-transition_2\"><a href=\"#after-transition_2\"><code>after-transition</code></a></dt> <dd> <p>Allow the browser to handle scrolling, for example by scrolling to the relevant fragment identifier if the URL contains a fragment, or restoring the scroll position to the same place as last time if the page is reloaded or a page in the history is revisited. This is the default value. </dd> <dt id=\"manual_2\"><a href=\"#manual_2\"><code>manual</code></a></dt> <dd> <p>Disable the default behavior. </dd> </dl> </dd> </dl>"
|
||
},
|
||
"returns": "None (<code>undefined</code>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is not yet active, or if the navigation has been cancelled.",
|
||
"SecurityError DOMException": "Thrown if the event was dispatched by a <a href=\"$MDN_URL$/Web/API/EventTarget/dispatchEvent\" ><code>dispatchEvent()</code></a> call, rather than the user agent, or if the navigation cannot be intercepted (i.e. <a href=\"$MDN_URL$/Web/API/NavigateEvent/canIntercept\"><code>NavigateEvent.canIntercept</code></a> is <code>false</code>)."
|
||
}
|
||
},
|
||
"navigateevent.navigateevent": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/navigateevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigateEvent()</code></strong> constructor creates a new\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> object instance.",
|
||
"parameters": {
|
||
"type": "A string representing the type of event. In the case of <code>NavigateEvent</code> this is always <code>navigate</code>.",
|
||
"init": "An object containing the following properties: <dl> <dt id=\"canintercept\"><a href=\"#canintercept\"><code>canIntercept</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean defining whether the navigation can be intercepted or not (e.g. you can't intercept a cross-origin navigation). Defaults to <code>false</code>. </dd> <dt id=\"destination\"><a href=\"#destination\"><code>destination</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> object representing the location being navigated to. </dd> <dt id=\"downloadrequest\"><a href=\"#downloadrequest\"><code>downloadRequest</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The filename of the file requested for download, in the case of a download navigation (e.g. an <a href=\"$MDN_URL$/Web/HTML/Element/a\"><code><a></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/area\"><code><area></code></a> element with a <code>download</code> attribute). Defaults to <code>null</code>. </dd> <dt id=\"formdata\"><a href=\"#formdata\"><code>formData</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/FormData\"><code>FormData</code></a> object representing the submitted data in the case of a <code>POST</code> form submission. Defaults to <code>null</code>. </dd> <dt id=\"hashchange\"><a href=\"#hashchange\"><code>hashChange</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean defining if the navigation is a fragment navigation (i.e. to a fragment identifier in the same document). Defaults to <code>false</code>. </dd> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The <code>info</code> data value passed by the initiating navigation operation (e.g. <a href=\"$MDN_URL$/Web/API/Navigation/back\"><code>Navigation.back()</code></a>, or <a href=\"$MDN_URL$/Web/API/Navigation/navigate\"><code>Navigation.navigate()</code></a>). </dd> <dt id=\"navigationtype\"><a href=\"#navigationtype\"><code>navigationType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The type of the navigation. Possible values — <code>push</code>, <code>reload</code>, <code>replace</code>, and <code>traverse</code>. Defaults to <code>push</code>. </dd> <dt id=\"signal\"><a href=\"#signal\"><code>signal</code></a></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a>, which will become aborted if the navigation is cancelled (e.g. by the user pressing the browser's \"Stop\" button, or another navigation starting and thus cancelling the ongoing one). </dd> <dt id=\"userinitiated\"><a href=\"#userinitiated\"><code>userInitiated</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean defining whether the navigation was initiated by the user (e.g. by clicking a link, submitting a form, or pressing the browser's \"Back\"/\"Forward\" buttons). Defaults to <code>false</code>. </dd> </dl>"
|
||
}
|
||
},
|
||
"navigateevent.navigationtype": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/navigationtype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>navigationType</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns the type of the navigation — <code>push</code>, <code>reload</code>, <code>replace</code>, or <code>traverse</code>."
|
||
},
|
||
"navigateevent.scroll": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/scroll",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "105",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "105"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>scroll()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface can be called to manually trigger the browser-driven scrolling behavior that occurs in response to the navigation, if you want it to happen before the navigation handling has completed.",
|
||
"returns": "None (<code>undefined</code>).",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is not yet active, or if the navigation has been cancelled.",
|
||
"SecurityError DOMException": "Thrown if the event was dispatched by a <a href=\"$MDN_URL$/Web/API/EventTarget/dispatchEvent\" ><code>dispatchEvent()</code></a> call, rather than the user agent."
|
||
}
|
||
},
|
||
"navigateevent.signal": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/signal",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>signal</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns an <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a>, which will become aborted if the navigation is cancelled (e.g. by the user pressing the browser's \"Stop\" button, or another navigation starting and thus cancelling the ongoing one)."
|
||
},
|
||
"navigateevent.userinitiated": {
|
||
"url": "$MDN_URL$/web/api/navigateevent/userinitiated",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>userInitiated</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigateEvent\"><code>NavigateEvent</code></a> interface returns <code>true</code> if the navigation was initiated by the user (e.g. by clicking a link, submitting a form, or pressing the browser's \"Back\"/\"Forward\" buttons), or <code>false</code> otherwise.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> The table found at <a href=\"https://github.com/WICG/navigation-api#appendix-types-of-navigations\" class=\"external\" target=\"_blank\">Appendix: types of navigations</a> shows which navigation types are user-initiated.\n</div>"
|
||
},
|
||
"navigation": {
|
||
"url": "$MDN_URL$/web/api/navigation",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Navigation</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> allows control over all navigation actions for the current <code>window</code> in one central place, including initiating navigations programmatically, examining navigation history entries, and managing navigations as they happen.\n<p>It is accessed via the <a href=\"$MDN_URL$/Web/API/Window/navigation\"><code>Window.navigation</code></a> property.\n<p>The Navigation API only exposes history entries created in the current browsing context that have the same origin as the current page (e.g. not navigations inside embedded <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a>s, or cross-origin navigations), providing an accurate list of all previous history entries just for your app. This makes traversing the history a much less fragile proposition than with the older <a href=\"$MDN_URL$/Web/API/History_API\" >History API</a>."
|
||
},
|
||
"navigation.back": {
|
||
"url": "$MDN_URL$/web/api/navigation/back",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>back()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface navigates backwards by one entry in the navigation history.",
|
||
"parameters": {
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be passed along to the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, made available in <a href=\"$MDN_URL$/Web/API/NavigateEvent/info\"><code>NavigateEvent.info</code></a>. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as <code>info</code>. </dd> </dl>"
|
||
},
|
||
"returns": "An object with the following properties:\n<dl>\n <dt id=\"committed\"><a href=\"#committed\"><code>committed</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when the visible URL has changed and a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> has been created.\n </dd>\n <dt id=\"finished\"><a href=\"#finished\"><code>finished</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when all promises returned by the <code>intercept()</code> handler are fulfilled. This is equivalent to the <a href=\"$MDN_URL$/Web/API/NavigationTransition/finished\"><code>NavigationTransition.finished</code></a> promise fulfilling, when the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" title=\"navigatesuccess\"><code>navigatesuccess</code></a> event fires.\n </dd>\n</dl>\n<p>Either one of these promises rejects if the navigation has failed for some reason.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a>'s <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/index\"><code>NavigationHistoryEntry.index</code></a> value is -1 or 0, i.e. either the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is not yet active, or the current history entry is the first one in the history, meaning that backwards navigation is not possible, or if the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is unloading."
|
||
}
|
||
},
|
||
"navigation.cangoback": {
|
||
"url": "$MDN_URL$/web/api/navigation/cangoback",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>canGoBack</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface returns <code>true</code>\nif it is possible to navigate backwards in the navigation history\n(i.e. the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\" ><code>currentEntry</code></a> is\nnot the first one in the history entry list),\nand <code>false</code> if it is not."
|
||
},
|
||
"navigation.cangoforward": {
|
||
"url": "$MDN_URL$/web/api/navigation/cangoforward",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>canGoForward</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface returns <code>true</code> if it is possible to navigate forwards in the navigation history\n(i.e. the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\" ><code>currentEntry</code></a> is not the last one in the history entry list),\nand <code>false</code> if it is not."
|
||
},
|
||
"navigation.currententry": {
|
||
"url": "$MDN_URL$/web/api/navigation/currententry",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>currentEntry</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> object representing the location the user is currently navigated to right now."
|
||
},
|
||
"navigation.entries": {
|
||
"url": "$MDN_URL$/web/api/navigation/entries",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>entries()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface returns an array of <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> objects representing all existing history entries.",
|
||
"returns": "An array of <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> objects."
|
||
},
|
||
"navigation.forward": {
|
||
"url": "$MDN_URL$/web/api/navigation/forward",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>forward()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface navigates forwards by one entry in the navigation history.",
|
||
"parameters": {
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be passed along to the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, made available in <a href=\"$MDN_URL$/Web/API/NavigateEvent/info\"><code>NavigateEvent.info</code></a>. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as <code>info</code>. </dd> </dl>"
|
||
},
|
||
"returns": "An object with the following properties:\n<dl>\n <dt id=\"committed\"><a href=\"#committed\"><code>committed</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when the visible URL has changed and a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> has been created.\n </dd>\n <dt id=\"finished\"><a href=\"#finished\"><code>finished</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when all promises returned by the <a href=\"$MDN_URL$/Web/API/NavigateEvent/intercept\"><code>NavigateEvent.intercept()</code></a> handler are fulfilled. This is equivalent to the <a href=\"$MDN_URL$/Web/API/NavigationTransition/finished\"><code>NavigationTransition.finished</code></a> promise fulfilling, when the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" title=\"navigatesuccess\"><code>navigatesuccess</code></a> event fires.\n </dd>\n</dl>\n<p>Either one of these promises rejects if the navigation has failed for some reason.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a>'s <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/index\"><code>NavigationHistoryEntry.index</code></a> value is -1 or <a href=\"$MDN_URL$/Web/API/Navigation/entries\" ><code>navigation.entries().length - 1</code></a>, i.e. either the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is not yet active, or the current history entry is the last one in the history, meaning that forwards navigation is not possible, or if the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is unloading."
|
||
}
|
||
},
|
||
"navigation.navigate": {
|
||
"url": "$MDN_URL$/web/api/navigation/navigate",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>navigate()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface navigates to a specific URL, updating any provided state in the history entries list.",
|
||
"parameters": {
|
||
"url": "The destination URL to navigate to. Note that when calling <code>navigate()</code> on a another window's <code>navigation</code> object, the URL will be resolved relative to the target window's URL, not the calling window's URL. This matches the behavior of the <a href=\"$MDN_URL$/Web/API/History_API\">History API</a>, but not the behavior of the <a href=\"$MDN_URL$/Web/API/Location\">Location API</a>.",
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"state\"><a href=\"#state\"><code>state</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be stored in the associated <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> once the navigation is complete, retrievable via <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/getState\" ><code>getState()</code></a>. This can be any data type. You might, for example, wish to store a page visit count for analytics purposes, or store UI state details so the view can be shown exactly as the user last left it. Any data stored in <code>state</code> must be <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a>. </dd> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be passed along to the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, made available in <a href=\"$MDN_URL$/Web/API/NavigateEvent/info\"><code>NavigateEvent.info</code></a>. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as <code>info</code>. </dd> <dt id=\"history\"><a href=\"#history\"><code>history</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An enumerated value that sets the history behavior of this navigation. The available values are: <ul> <li><code>auto</code>: The default value; will usually perform a <code>push</code> navigation but will perform a <code>replace</code> navigation under special circumstances (see the <code>NotSupportedError</code> description below).</li> <li><code>push</code>: Will push a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> onto the entries list, or fail under special circumstances (see the <code>NotSupportedError</code> description below).</li> <li><code>replace</code>: Will replace the current <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a>.</li> </ul> </dd> </dl>"
|
||
},
|
||
"returns": "An object with the following properties:\n<dl>\n <dt id=\"committed\"><a href=\"#committed\"><code>committed</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when the visible URL has changed and a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> has been created.\n </dd>\n <dt id=\"finished\"><a href=\"#finished\"><code>finished</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when all promises returned by the <code>intercept()</code> handler are fulfilled. This is equivalent to the <a href=\"$MDN_URL$/Web/API/NavigationTransition/finished\"><code>NavigationTransition.finished</code></a> promise fulfilling, when the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" title=\"navigatesuccess\"><code>navigatesuccess</code></a> event fires.\n </dd>\n</dl>\n<p>Either one of these promises rejects if the navigation has failed for some reason.",
|
||
"throws": {
|
||
"DataCloneError DOMException": "Thrown if the <code>state</code> parameter had values included in it that are not structured-cloneable.",
|
||
"SyntaxError DOMException": "Thrown if the <code>url</code> parameter is not a valid URL.",
|
||
"NotSupportedError DOMException": "Thrown if the <code>history</code> option is set to <code>push</code>, and any of the following special circumstances are true: <ul> <li>The browser is currently showing the initial <code>about:blank</code> document.</li> <li>The <code>url</code>'s scheme is <code>javascript</code>.</li> </ul>"
|
||
}
|
||
},
|
||
"navigation.reload": {
|
||
"url": "$MDN_URL$/web/api/navigation/reload",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>reload()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface reloads the current URL, updating any provided state in the history entries list.",
|
||
"parameters": {
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"state\"><a href=\"#state\"><code>state</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be stored in the associated <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> once the navigation is complete, retrievable via <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/getState\" ><code>getState()</code></a>. This can be any data type. You might, for example, wish to store a page visit count for analytics purposes, or store UI state details so the view can be shown exactly as the user last left it. Any data stored in <code>state</code> must be <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a>. </dd> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be passed along to the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, made available in <a href=\"$MDN_URL$/Web/API/NavigateEvent/info\"><code>NavigateEvent.info</code></a>. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as <code>info</code>. </dd> </dl>"
|
||
},
|
||
"returns": "An object with the following properties:\n<dl>\n <dt id=\"committed\"><a href=\"#committed\"><code>committed</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when the visible URL has changed and a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> has been created.\n </dd>\n <dt id=\"finished\"><a href=\"#finished\"><code>finished</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when all promises returned by the <code>intercept()</code> handler are fulfilled. This is equivalent to the <a href=\"$MDN_URL$/Web/API/NavigationTransition/finished\"><code>NavigationTransition.finished</code></a> promise fulfilling, when the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" title=\"navigatesuccess\"><code>navigatesuccess</code></a> event fires.\n </dd>\n</dl>\n<p>Either one of these promises rejects if the navigation has failed for some reason.",
|
||
"throws": {
|
||
"DataCloneError DOMException": "Thrown if the <code>state</code> parameter had values included in it that are not structured-cloneable."
|
||
}
|
||
},
|
||
"navigation.transition": {
|
||
"url": "$MDN_URL$/web/api/navigation/transition",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>transition</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/NavigationTransition\"><code>NavigationTransition</code></a> object representing the status of an in-progress navigation, which can be used to track it."
|
||
},
|
||
"navigation.traverseto": {
|
||
"url": "$MDN_URL$/web/api/navigation/traverseto",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>traverseTo()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface navigates to the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> identified by the given <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/key\" ><code>key</code></a>.",
|
||
"parameters": {
|
||
"key": "The <code>key</code> of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> to navigate to.",
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"info\"><a href=\"#info\"><code>info</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Developer-defined information to be passed along to the <a href=\"$MDN_URL$/Web/API/Navigation/navigate_event\" ><code>navigate</code></a> event, made available in <a href=\"$MDN_URL$/Web/API/NavigateEvent/info\"><code>NavigateEvent.info</code></a>. This can be any data type. You might, for example, wish to display newly-navigated content with a different animation depending on how it was navigated to (swipe left, swipe right, or go home). A string indicating which animation to use could be passed in as <code>info</code>. </dd> </dl>"
|
||
},
|
||
"returns": "An object with the following properties:\n<dl>\n <dt id=\"committed\"><a href=\"#committed\"><code>committed</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when the visible URL has changed and a new <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> has been created.\n </dd>\n <dt id=\"finished\"><a href=\"#finished\"><code>finished</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which will fulfill when all promises returned by the <code>intercept()</code> handler are fulfilled. This is equivalent to the <a href=\"$MDN_URL$/Web/API/NavigationTransition/finished\"><code>NavigationTransition.finished</code></a> promise fulfilling, when the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" title=\"navigatesuccess\"><code>navigatesuccess</code></a> event fires.\n </dd>\n</dl>\n<p>Either one of these promises rejects if the navigation has failed for some reason.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a>'s <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/index\"><code>NavigationHistoryEntry.index</code></a> value is -1, meaning the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is not yet active, of if the navigation history list does not contain a <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> with the specified key, or if the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> is unloading."
|
||
}
|
||
},
|
||
"navigation.updatecurrententry": {
|
||
"url": "$MDN_URL$/web/api/navigation/updatecurrententry",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>updateCurrentEntry()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigation\"><code>Navigation</code></a> interface updates the <code>state</code> of the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\" ><code>currentEntry</code></a>; used in cases where the state change will be independent of a navigation or reload.",
|
||
"parameters": {
|
||
"options": "An options object containing the following properties: <dl> <dt id=\"state\"><a href=\"#state\"><code>state</code></a></dt> <dd> <p>Developer-defined information to be stored in the associated <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> once the navigation is complete, retrievable via <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/getState\" ><code>getState()</code></a>. This can be any data type. You might, for example, wish to store a page visit count for analytics purposes, or store UI state details so the view can be shown exactly as the user last left it. Any data stored in <code>state</code> must be <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a>. </dd> </dl>"
|
||
},
|
||
"returns": "None (<code>undefined</code>).",
|
||
"throws": {
|
||
"DataCloneError DOMException": "Thrown if the <code>state</code> parameter had values included in it that are not structured-cloneable.",
|
||
"InvalidStateError DOMException": "Thrown if the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a> is <code>null</code>, i.e. there is no current history entry. This could occur for example if the current page is <code>about:blank</code>."
|
||
}
|
||
},
|
||
"navigationcurrententrychangeevent": {
|
||
"url": "$MDN_URL$/web/api/navigationcurrententrychangeevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigationCurrentEntryChangeEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> is the event object for the <a href=\"$MDN_URL$/Web/API/Navigation/currententrychange_event\" ><code>currententrychange</code></a> event, which fires when the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a> has changed.\n<p>This event will fire for same-document navigations (e.g. <a href=\"$MDN_URL$/Web/API/Navigation/back\" ><code>back()</code></a> or <a href=\"$MDN_URL$/Web/API/Navigation/traverseTo\" ><code>traverseTo()</code></a>), replacements (i.e. a <a href=\"$MDN_URL$/Web/API/Navigation/navigate\" ><code>navigate()</code></a> call with <code>history</code> set to <code>replace</code>), or other calls that change the entry's state (e.g. <a href=\"$MDN_URL$/Web/API/Navigation/updateCurrentEntry\" ><code>updateCurrentEntry()</code></a>, or the <a href=\"$MDN_URL$/Web/API/History_API\" >History API</a>'s <a href=\"$MDN_URL$/Web/API/History/replaceState\"><code>History.replaceState()</code></a>).\n<p>This event fires after the navigation is committed, meaning that the visible URL has changed and the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> update has occurred. It is useful for migrating from usage of older API features like the <a href=\"$MDN_URL$/Web/API/Window/hashchange_event\" ><code>hashchange</code></a> or <a href=\"$MDN_URL$/Web/API/Window/popstate_event\" ><code>popstate</code></a> events."
|
||
},
|
||
"navigationcurrententrychangeevent.from": {
|
||
"url": "$MDN_URL$/web/api/navigationcurrententrychangeevent/from",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>from</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationCurrentEntryChangeEvent\"><code>NavigationCurrentEntryChangeEvent</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> that was navigated from."
|
||
},
|
||
"navigationcurrententrychangeevent.navigationcurrententrychangeevent": {
|
||
"url": "$MDN_URL$/web/api/navigationcurrententrychangeevent/navigationcurrententrychangeevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigationCurrentEntryChangeEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/NavigationCurrentEntryChangeEvent\"><code>NavigationCurrentEntryChangeEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string representing the type of event. In the case of <code>NavigationCurrentEntryChangeEvent</code> this is always <code>event</code>.",
|
||
"init": "An object containing the following properties: <dl> <dt id=\"destination\"><a href=\"#destination\"><code>destination</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> object representing the location being navigated to. </dd> <dt id=\"navigationtype\"><a href=\"#navigationtype\"><code>navigationType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The type of the navigation that resulted in the change. Possible values are <code>push</code>, <code>reload</code>, <code>replace</code>, and <code>traverse</code>. Defaults to <code>null</code>. </dd> </dl>"
|
||
}
|
||
},
|
||
"navigationcurrententrychangeevent.navigationtype": {
|
||
"url": "$MDN_URL$/web/api/navigationcurrententrychangeevent/navigationtype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>navigationType</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationCurrentEntryChangeEvent\"><code>NavigationCurrentEntryChangeEvent</code></a> interface returns the type of the navigation that resulted in the change. The property may be <code>null</code> if the change occurs due to <a href=\"$MDN_URL$/Web/API/Navigation/updateCurrentEntry\"><code>Navigation.updateCurrentEntry()</code></a>."
|
||
},
|
||
"navigationdestination": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigationDestination</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> represents the destination being navigated to in the current navigation.\n<p>It is accessed via the <a href=\"$MDN_URL$/Web/API/NavigateEvent/destination\"><code>NavigateEvent.destination</code></a> property."
|
||
},
|
||
"navigationdestination.getstate": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination/getstate",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>getState()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> interface returns a clone of the developer-supplied state associated with the destination <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a>, or navigation operation (e.g. <a href=\"$MDN_URL$/Web/API/Navigation/navigate\" ><code>navigate()</code></a>) as appropriate.",
|
||
"returns": "A value representing the state. This can be any type.\n<p>If no state is defined, it returns <code>undefined</code>."
|
||
},
|
||
"navigationdestination.id": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination/id",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>id</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/id\" ><code>id</code></a> value of the destination <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> if the <a href=\"$MDN_URL$/Web/API/NavigateEvent/navigationType\"><code>NavigateEvent.navigationType</code></a> is <code>traverse</code>, or an empty string otherwise.\n<p>The <code>id</code> is a unique, UA-generated value that always represents the history entry, useful to correlate a history entry with an external resource such as a storage cache."
|
||
},
|
||
"navigationdestination.key": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination/key",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>key</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/key\" ><code>key</code></a> value of the destination <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> if the <a href=\"$MDN_URL$/Web/API/NavigateEvent/navigationType\"><code>NavigateEvent.navigationType</code></a> is <code>traverse</code>, or an empty string otherwise.\n<p>The <code>key</code> is a unique, UA-generated value that represents the history entry's slot in the history entries list, used to navigate to this place in the history via <a href=\"$MDN_URL$/Web/API/Navigation/traverseTo\"><code>Navigation.traverseTo()</code></a>. It will be reused by other entries that replace the entry in the list (i.e. if the <a href=\"$MDN_URL$/Web/API/NavigateEvent/navigationType\"><code>NavigateEvent.navigationType</code></a> is <code>replace</code>)."
|
||
},
|
||
"navigationdestination.samedocument": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination/samedocument",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>sameDocument</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> interface returns <code>true</code> if the navigation is to the same <code>document</code> as the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> value, or <code>false</code> otherwise.\n<p>This is useful for checking whether the navigation will be same-document or cross-document."
|
||
},
|
||
"navigationdestination.url": {
|
||
"url": "$MDN_URL$/web/api/navigationdestination/url",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>url</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationDestination\"><code>NavigationDestination</code></a> interface returns the URL being navigated to."
|
||
},
|
||
"navigationhistoryentry": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigationHistoryEntry</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> represents a single navigation history entry.\n<p>These objects are commonly accessed via the <a href=\"$MDN_URL$/Web/API/Navigation/currentEntry\"><code>Navigation.currentEntry</code></a> property and <a href=\"$MDN_URL$/Web/API/Navigation/entries\"><code>Navigation.entries()</code></a> method.\n<p>The Navigation API only exposes history entries created in the current browsing context that have the same origin as the current page (e.g. not navigations inside embedded <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a>s, or cross-origin navigations), providing an accurate list of all previous history entries just for your app. This makes traversing the history a much less fragile proposition than with the older <a href=\"$MDN_URL$/Web/API/History_API\" >History API</a>."
|
||
},
|
||
"navigationhistoryentry.getstate": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry/getstate",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>getState()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> interface returns a clone of the developer-supplied state associated with this history entry.",
|
||
"returns": "A value representing the state. This can be any <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a> data type.\n<p>If no state is defined or if current document is not fully active, it returns <code>undefined</code>."
|
||
},
|
||
"navigationhistoryentry.id": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry/id",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> interface returns the <code>id</code> of the history entry, or an empty string if current document is not fully active. This is a unique, UA-generated value that always represents a specific history entry, useful to correlate it with an external resource such as a storage cache.\n<p>This differs from the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/key\" ><code>key</code></a> of a history entry. The <code>key</code> is a unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself. It is used to navigate that particular slot via <a href=\"$MDN_URL$/Web/API/Navigation/traverseTo\"><code>Navigation.traverseTo()</code></a>. The <code>key</code> will be reused by other entries that replace the entry in the list (that is, if the <a href=\"$MDN_URL$/Web/API/NavigateEvent/navigationType\"><code>NavigateEvent.navigationType</code></a> is <code>replace</code>)."
|
||
},
|
||
"navigationhistoryentry.key": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry/key",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>key</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> interface returns the <code>key</code> of the history entry, or an empty string if current document is not fully active. This is a unique, UA-generated value that represents the history entry's slot in the entries list. It is used to navigate that particular slot via <a href=\"$MDN_URL$/Web/API/Navigation/traverseTo\"><code>Navigation.traverseTo()</code></a>. The <code>key</code> will be reused by other entries that replace the entry in the list (that is, if the <a href=\"$MDN_URL$/Web/API/NavigateEvent/navigationType\"><code>NavigateEvent.navigationType</code></a> is <code>replace</code>).\n<p>This differs from the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry/id\" ><code>id</code></a> of a history entry. The <code>id</code> is a unique, UA-generated value that always represents a specific history entry rather than its slot in the entries list. This is useful to correlate it with an external resource such as a storage cache."
|
||
},
|
||
"navigationhistoryentry.samedocument": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry/samedocument",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>sameDocument</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> interface returns <code>true</code> if this history entry is for the same <code>document</code> as the current <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> value and current document is fully active, or <code>false</code> otherwise."
|
||
},
|
||
"navigationhistoryentry.url": {
|
||
"url": "$MDN_URL$/web/api/navigationhistoryentry/url",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>url</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> interface returns the absolute URL of this history entry. If the entry corresponds to a different Document than the current one (like <code>sameDocument</code> property is <code>false</code>), and that Document was fetched with a <a href=\"$MDN_URL$/Web/HTTP/Headers/Referrer-Policy\"><code>referrer policy</code></a> header set to <code>no-referrer</code> or <code>origin</code>, the property returns <code>null</code>. If current document is not fully active, it returns an empty string."
|
||
},
|
||
"navigationpreloadmanager": {
|
||
"url": "$MDN_URL$/web/api/navigationpreloadmanager",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "99",
|
||
"Opera": "46",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>NavigationPreloadManager</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Service_Worker_API\">Service Worker API</a> provides methods for managing the preloading of resources in parallel with service worker bootup.\n<p>If supported, an object of this type is returned by <a href=\"$MDN_URL$/Web/API/ServiceWorkerRegistration/navigationPreload\"><code>ServiceWorkerRegistration.navigationPreload</code></a>.\nThe result of a preload fetch request is waited on using the promise returned by <a href=\"$MDN_URL$/Web/API/FetchEvent/preloadResponse\"><code>FetchEvent.preloadResponse</code></a>."
|
||
},
|
||
"navigationpreloadmanager.disable": {
|
||
"url": "$MDN_URL$/web/api/navigationpreloadmanager/disable",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "99",
|
||
"Opera": "46",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>disable()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> interface halts the automatic preloading of service-worker-managed resources previously started using <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager/enable\" ><code>enable()</code></a>\nIt returns a promise that resolves with <code>undefined</code>.\n<p>The method may be called in the service worker's <code>activate</code> event handler (before the <code>fetch</code> event handler can be called).",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "There is no active worker associated with the registration to which this <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> belongs."
|
||
}
|
||
},
|
||
"navigationpreloadmanager.enable": {
|
||
"url": "$MDN_URL$/web/api/navigationpreloadmanager/enable",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "99",
|
||
"Opera": "46",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>enable()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> interface is used to enable preloading of resources managed by the service worker.\nIt returns a promise that resolves with <code>undefined</code>.\n<p>The method should be called in the service worker's <code>activate</code> event handler, which ensures it is called before any <code>fetch</code> event handler can fire.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "There is no active worker associated with the registration to which this <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> belongs."
|
||
}
|
||
},
|
||
"navigationpreloadmanager.getstate": {
|
||
"url": "$MDN_URL$/web/api/navigationpreloadmanager/getstate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "99",
|
||
"Opera": "46",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>getState()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to an object with properties that indicate whether preload is enabled and what value will be sent in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Service-Worker-Navigation-Preload\"><code>Service-Worker-Navigation-Preload</code></a> HTTP header.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with an object that has the following properties:\n<dl>\n <dt id=\"enabled\"><a href=\"#enabled\"><code>enabled</code></a></dt>\n <dd>\n <p><code>true</code> if preloading is enabled, and <code>false</code> otherwise.\n </dd>\n <dt id=\"headervalue\"><a href=\"#headervalue\"><code>headerValue</code></a></dt>\n <dd>\n <p>A string containing the value that will be sent in the <code>Service-Worker-Navigation-Preload</code> HTTP header following a preloading <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a>.\n This defaults to <code>true</code> unless the value was changed using <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager/setHeaderValue\"><code>NavigationPreloadManager.setHeaderValue()</code></a>.\n </dd>\n</dl>",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "There is no active worker associated with the registration to which this <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> belongs."
|
||
}
|
||
},
|
||
"navigationpreloadmanager.setheadervalue": {
|
||
"url": "$MDN_URL$/web/api/navigationpreloadmanager/setheadervalue",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "99",
|
||
"Opera": "46",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "The <strong><code>setHeaderValue()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> interface sets the value of the <a href=\"$MDN_URL$/Web/HTTP/Headers/Service-Worker-Navigation-Preload\"><code>Service-Worker-Navigation-Preload</code></a> header that will be sent with requests resulting from a <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a> operation made during service worker navigation preloading.\nIt returns an empty <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <code>undefined</code>.\n<p>The presence of the <a href=\"$MDN_URL$/Web/HTTP/Headers/Service-Worker-Navigation-Preload\"><code>Service-Worker-Navigation-Preload</code></a> header in preloading requests allows servers to configure the returned resource differently for preloading fetch requests than from normal fetch requests.\nThe default directive is set to <code>true</code>: this method allows the possibility of configuring multiple different responses to preload requests.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> If a different response may result from setting this header, the server must set <code>Vary: Service-Worker-Navigation-Preload</code> to ensure that the different responses are cached.\n</div>",
|
||
"parameters": {
|
||
"value": "An arbitrary string value, which the target server uses to determine what should returned for the requested resource."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "There is no active worker associated with the registration to which this <a href=\"$MDN_URL$/Web/API/NavigationPreloadManager\"><code>NavigationPreloadManager</code></a> belongs."
|
||
}
|
||
},
|
||
"navigationtransition": {
|
||
"url": "$MDN_URL$/web/api/navigationtransition",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NavigationTransition</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Navigation_API\" >Navigation API</a> represents an ongoing navigation, that is, a navigation that hasn't yet reached the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" ><code>navigatesuccess</code></a> or <a href=\"$MDN_URL$/Web/API/Navigation/navigateerror_event\" ><code>navigateerror</code></a> stage.\n<p>It is accessed via the <a href=\"$MDN_URL$/Web/API/Navigation/transition\"><code>Navigation.transition</code></a> property."
|
||
},
|
||
"navigationtransition.finished": {
|
||
"url": "$MDN_URL$/web/api/navigationtransition/finished",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>finished</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationTransition\"><code>NavigationTransition</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that fulfills at the same time the <a href=\"$MDN_URL$/Web/API/Navigation/navigatesuccess_event\" ><code>navigatesuccess</code></a> event fires, or rejects at the same time the <a href=\"$MDN_URL$/Web/API/Navigation/navigateerror_event\" ><code>navigateerror</code></a> event fires."
|
||
},
|
||
"navigationtransition.from": {
|
||
"url": "$MDN_URL$/web/api/navigationtransition/from",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>from</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationTransition\"><code>NavigationTransition</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/NavigationHistoryEntry\"><code>NavigationHistoryEntry</code></a> that the transition is coming from."
|
||
},
|
||
"navigationtransition.navigationtype": {
|
||
"url": "$MDN_URL$/web/api/navigationtransition/navigationtype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "102",
|
||
"ChromeAndroid": "102",
|
||
"Edge": "102",
|
||
"Opera": "88"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>navigationType</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NavigationTransition\"><code>NavigationTransition</code></a> interface returns the type of the ongoing navigation."
|
||
},
|
||
"navigator": {
|
||
"url": "$MDN_URL$/web/api/navigator",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "3",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.8"
|
||
},
|
||
"doc": "The <strong><code>Navigator</code></strong> interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.\n<p>A <code>Navigator</code> object can be retrieved using the read-only <a href=\"$MDN_URL$/Web/API/Window/navigator\"><code>window.navigator</code></a> property."
|
||
},
|
||
"navigator.activevrdisplays": {
|
||
"url": "$MDN_URL$/web/api/navigator/activevrdisplays",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>activeVRDisplays</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns an array containing every\n<a href=\"$MDN_URL$/Web/API/VRDisplay\"><code>VRDisplay</code></a> object that is currently presenting\n(<a href=\"$MDN_URL$/Web/API/VRDisplay/isPresenting\"><code>VRDisplay.ispresenting</code></a> is <code>true</code>).\n<div class=\"notecard note\" id=\"sect4\">\n<p><strong>Note:</strong> This property was part of the old <a href=\"https://immersive-web.github.io/webvr/spec/1.1/\" class=\"external\" target=\"_blank\">WebVR API</a>. It has been superseded by the <a href=\"https://immersive-web.github.io/webxr/\" class=\"external\" target=\"_blank\">WebXR Device API</a>.\n</div>"
|
||
},
|
||
"navigator.appcodename": {
|
||
"url": "$MDN_URL$/web/api/navigator/appcodename",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The value of the <strong><code>Navigator.appCodeName</code></strong> property is\nalways \"<code>Mozilla</code>\", in any browser. This property is kept only for\ncompatibility purposes.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Do not rely on this property to return a real\nproduct name. All browsers return \"<code>Mozilla</code>\" as the value of this property.\n</div>"
|
||
},
|
||
"navigator.appname": {
|
||
"url": "$MDN_URL$/web/api/navigator/appname",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The value of the <strong><code>Navigator.appName</code></strong> property is always\n\"<code>Netscape</code>\", in any browser. This property is kept only for compatibility\npurposes.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Do not rely on this property to return a real browser name. All browsers return \"<code>Netscape</code>\" as the value of this property.\n</div>"
|
||
},
|
||
"navigator.appversion": {
|
||
"url": "$MDN_URL$/web/api/navigator/appversion",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>Returns either \"<code>4.0</code>\" or a string representing version information about\nthe browser.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Do not rely on this property to return the correct browser version.\n</div>"
|
||
},
|
||
"navigator.bluetooth": {
|
||
"url": "$MDN_URL$/web/api/navigator/bluetooth",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "56"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>bluetooth</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Bluetooth\"><code>Bluetooth</code></a> object for the current document, providing access to <a href=\"$MDN_URL$/Web/API/Web_Bluetooth_API\">Web Bluetooth API</a> functionality."
|
||
},
|
||
"navigator.buildid": {
|
||
"url": "$MDN_URL$/web/api/navigator/buildid",
|
||
"compatibility": {
|
||
"Firefox": "2"
|
||
},
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p>Returns the build identifier of the browser. In modern browsers this property now returns a fixed timestamp as a privacy measure, e.g. <code>20181001000000</code> in Firefox 64 onwards."
|
||
},
|
||
"navigator.canshare": {
|
||
"url": "$MDN_URL$/web/api/navigator/canshare",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "75",
|
||
"Edge": "93",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Navigator.canShare()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Web_Share_API\">Web Share API</a> returns <code>true</code> if the equivalent call to <a href=\"$MDN_URL$/Web/API/Navigator/share\"><code>navigator.share()</code></a> would succeed.\n<p>The method returns <code>false</code> if the data cannot be <em>validated</em>. Reasons the data might be invalid include:\n<ul>\n<li>The <code>data</code> parameter has been omitted or only contains properties with unknown values. Note that any properties that are not recognized by the user agent are ignored.</li>\n<li>A URL is badly formatted.</li>\n<li>Files are specified but the implementation does not support file sharing.</li>\n<li>Sharing the specified data would be considered a \"hostile share\" by the user-agent.</li>\n</ul>\n<p>The Web Share API is gated by the <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/web-share\">web-share</a> permission policy.\nThe <strong><code>canShare()</code></strong> method will return <code>false</code> if the permission is supported but has not been granted.",
|
||
"parameters": {
|
||
"data": "An object defining the share data to test. Typically, an object with the same properties is passed to <a href=\"$MDN_URL$/Web/API/Navigator/share\"><code>navigator.share()</code></a> if this call returns <code>true</code>. <p>Properties that are unknown to the user agent are ignored; share data is only assessed on properties understood by the user agent. All properties are optional but at least one known data property must be specified or the method will return <code>false</code>. <p>Possible values are: <ul> <li><code>url</code>: A string representing a URL to be shared.</li> <li><code>text</code>: A string representing text to be shared.</li> <li><code>title</code>: A string representing the title to be shared.</li> <li><code>files</code>: An array of <a href=\"$MDN_URL$/Web/API/File\"><code>File</code></a> objects representing files to be shared.</li> </ul>"
|
||
},
|
||
"returns": "Returns <code>true</code> if the specified <code>data</code> can be shared with <a href=\"$MDN_URL$/Web/API/Navigator/share\"><code>Navigator.share()</code></a>, otherwise <code>false</code>."
|
||
},
|
||
"navigator.clearappbadge": {
|
||
"url": "$MDN_URL$/web/api/navigator/clearappbadge",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "81",
|
||
"Safari": "17",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>clearAppBadge()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface clears a badge on the current app's icon by setting it to <code>nothing</code>. The value <code>nothing</code> indicates that no badge is currently set, and the status of the badge is <em>cleared</em>.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the document is not fully active.",
|
||
"SecurityError DOMException": "Thrown if the call was blocked by the <a href=\"$MDN_URL$/Web/Security/Same-origin_policy\">same-origin policy</a>.",
|
||
"NotAllowedError DOMException": "Thrown if <a href=\"$MDN_URL$/Web/API/PermissionStatus/state\"><code>PermissionStatus.state</code></a> is not <code>granted</code>."
|
||
}
|
||
},
|
||
"navigator.clipboard": {
|
||
"url": "$MDN_URL$/web/api/navigator/clipboard",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "66",
|
||
"ChromeAndroid": "66",
|
||
"Edge": "79",
|
||
"Firefox": "63",
|
||
"Opera": "53",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>clipboard</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Clipboard\"><code>Clipboard</code></a> object used to read and write the clipboard's contents.\n<p>This is the entry point to the <a href=\"$MDN_URL$/Web/API/Clipboard_API\">Clipboard API</a>, which can be used to implement cut, copy, and paste features within a web application."
|
||
},
|
||
"navigator.connection": {
|
||
"url": "$MDN_URL$/web/api/navigator/connection",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Navigator.connection</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/NetworkInformation\"><code>NetworkInformation</code></a> object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.\n<p>This could be used to select high definition content or low definition content based on the user's connection."
|
||
},
|
||
"navigator.contacts": {
|
||
"url": "$MDN_URL$/web/api/navigator/contacts",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>contacts</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/ContactsManager\"><code>ContactsManager</code></a> interface\nwhich allows users to select entries from their contact list and share limited details\nof the selected entries with a website or application."
|
||
},
|
||
"navigator.cookieenabled": {
|
||
"url": "$MDN_URL$/web/api/navigator/cookieenabled",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<code>navigator.cookieEnabled</code> returns a Boolean value that indicates whether cookies are enabled or not.\n<p>The property is read-only."
|
||
},
|
||
"navigator.credentials": {
|
||
"url": "$MDN_URL$/web/api/navigator/credentials",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "38",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>credentials</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a>\ninterface returns the <a href=\"$MDN_URL$/Web/API/CredentialsContainer\"><code>CredentialsContainer</code></a> interface, which exposes\nmethods to request credentials. The <a href=\"$MDN_URL$/Web/API/CredentialsContainer\"><code>CredentialsContainer</code></a> interface also\nnotifies the user agent when an interesting event occurs, such as a successful sign-in\nor sign-out. This interface can be used for feature detection."
|
||
},
|
||
"navigator.devicememory": {
|
||
"url": "$MDN_URL$/web/api/navigator/devicememory",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "63",
|
||
"ChromeAndroid": "63",
|
||
"Edge": "79",
|
||
"Opera": "50"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>deviceMemory</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns the approximate amount of\ndevice memory in gigabytes.\n<p>The reported value is imprecise to curtail <a href=\"$MDN_URL$/Glossary/Fingerprinting\">fingerprinting</a>. It's approximated by\nrounding down to the nearest power of 2, then dividing that number by 1024. It is then\nclamped within lower and upper bounds to protect the privacy of owners of very low-memory or\nhigh-memory devices."
|
||
},
|
||
"navigator.donottrack": {
|
||
"url": "$MDN_URL$/web/api/navigator/donottrack",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "23",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "17",
|
||
"Firefox": "9",
|
||
"Opera": "12"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>Navigator.doNotTrack</code></strong> property returns the user's Do Not Track setting, which indicates whether the user is requesting websites and advertisers to not track them.\n<p>The value of the property reflects that of the <a href=\"$MDN_URL$/Web/HTTP/Headers/DNT\"><code>DNT</code></a> HTTP header, i.e. values of <code>\"1\"</code>, <code>\"0\"</code>, or <code>null</code>."
|
||
},
|
||
"navigator.geolocation": {
|
||
"url": "$MDN_URL$/web/api/navigator/geolocation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "5",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "10.6",
|
||
"Safari": "5",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Navigator.geolocation</code></strong> read-only property returns a\n<a href=\"$MDN_URL$/Web/API/Geolocation\"><code>Geolocation</code></a> object that gives Web content access to the location of the\ndevice. This allows a website or app to offer customized results based on the user's\nlocation.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> For security reasons, when a web page tries to access location\ninformation, the user is notified and asked to grant permission. Be aware that each\nbrowser has its own policies and methods for requesting this permission.\n</div>"
|
||
},
|
||
"navigator.getautoplaypolicy": {
|
||
"url": "$MDN_URL$/web/api/navigator/getautoplaypolicy",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "112"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>getAutoplayPolicy()</code></strong> method of the <em>Autoplay Policy Detection API</em> provides information about whether <a href=\"$MDN_URL$/Web/Media/Autoplay_guide\">autoplay</a> of media elements and audio contexts is allowed, disallowed, or only allowed if the audio is muted.\n<p>Applications can use this information to provide an appropriate user experience.\nFor example, if the user agent policy only allows autoplay of inaudible content, the application might mute videos so that they can still autoplay.\n<p>The method can be used to get either the broad autoplay policy for all items of a particular type in the document, or for specific media elements or audio contexts.",
|
||
"parameters": {
|
||
"type": "A string indicating the media playing <em>feature</em> for which the broad autoplay policy is required. <p>The supported values are: <dl> <dt id=\"mediaelement\"><a href=\"#mediaelement\"><code>mediaelement</code></a></dt> <dd> <p>Get the broad autoplay policy for media elements in the document. Media elements are <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> derived objects such as <a href=\"$MDN_URL$/Web/API/HTMLAudioElement\"><code>HTMLAudioElement</code></a> and <a href=\"$MDN_URL$/Web/API/HTMLVideoElement\"><code>HTMLVideoElement</code></a>, and their corresponding tags <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> and <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a>. </dd> <dt id=\"audiocontext\"><a href=\"#audiocontext\"><code>audiocontext</code></a></dt> <dd> <p>Get the broad autoplay policy for <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> players in the document. </dd> </dl>",
|
||
"element": "A specific media element. This must be an <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a>, including derived elements such as <a href=\"$MDN_URL$/Web/API/HTMLVideoElement\"><code>HTMLVideoElement</code></a> and <a href=\"$MDN_URL$/Web/API/HTMLAudioElement\"><code>HTMLAudioElement</code></a>.",
|
||
"context": "A specific <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a>."
|
||
},
|
||
"returns": "A string indicating the autoplay policy for the specified media feature type, element, or context.\n This will be a string containing one of the following values:\n<dl>\n <dt id=\"allowed\"><a href=\"#allowed\"><code>allowed</code></a></dt>\n <dd>\n <p>Autoplay is allowed.\n </dd>\n <dt id=\"allowed-muted\"><a href=\"#allowed-muted\"><code>allowed-muted</code></a></dt>\n <dd>\n <p>Autoplay is allowed only for inaudible media.\n This includes media that has no audio track, or for which the audio has been muted.\n </dd>\n <dt id=\"disallowed\"><a href=\"#disallowed\"><code>disallowed</code></a></dt>\n <dd>\n <p>Autoplay is not allowed.\n </dd>\n</dl>\n<p>Note that the autoplay policy returned for a <code>type</code> parameter is the <em>broad</em> policy for items of the indicated type.\n On page load, all items of a type will have the same policy as the type.\n Once the user has interacted with the page/site, on some browsers individual items <em>may</em> have a different policy to the corresponding type.",
|
||
"throws": {
|
||
"TypeError": "The object passed to the method is not an allowed type. The allowed types include <a href=\"$MDN_URL$/Web/API/HTMLMediaElement\"><code>HTMLMediaElement</code></a> (or a derived element such as <a href=\"$MDN_URL$/Web/API/HTMLVideoElement\"><code>HTMLVideoElement</code></a> and <a href=\"$MDN_URL$/Web/API/HTMLAudioElement\"><code>HTMLAudioElement</code></a>), or <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a>."
|
||
}
|
||
},
|
||
"navigator.getbattery": {
|
||
"url": "$MDN_URL$/web/api/navigator/getbattery",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "38",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "25"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>getBattery()</code></strong> method provides information about the system's battery.\nIt returns a battery promise, which resolves with a <a href=\"$MDN_URL$/Web/API/BatteryManager\"><code>BatteryManager</code></a> object providing some properties to get the battery status also some events you can handle to monitor the battery status.\nThis implements the <a href=\"$MDN_URL$/Web/API/Battery_Status_API\">Battery Status API</a>; see that documentation for additional details, a guide to using the API, and sample code.\n<p>Since Chrome 103, the <code>Navigator.getBattery()</code> method of <a href=\"$MDN_URL$/Web/API/Battery_Status_API\">Battery Status API</a> only expose to secure context.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Access to this feature may be controlled by the <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy\"><code>Permissions-Policy</code></a> directive <a href=\"$MDN_URL$/Web/HTTP/Headers/Permissions-Policy/battery\"><code>battery</code></a>.\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that fulfills with a <a href=\"$MDN_URL$/Web/API/BatteryManager\"><code>BatteryManager</code></a> object which you can use to get information about the battery's state.",
|
||
"throws": {
|
||
"NotAllowedError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>.",
|
||
"SecurityError DOMException": "The User Agent does not expose battery information to insecure contexts and this method was called from an insecure context."
|
||
}
|
||
},
|
||
"navigator.getgamepads": {
|
||
"url": "$MDN_URL$/web/api/navigator/getgamepads",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "29",
|
||
"Opera": "22",
|
||
"Safari": "10.1",
|
||
"SafariIOS": "10.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Navigator.getGamepads()</code></strong> method returns an array of\n<a href=\"$MDN_URL$/Web/API/Gamepad\"><code>Gamepad</code></a> objects, one for each gamepad connected to the device.\n<p>Elements in the array may be <code>null</code> if a gamepad disconnects during a\nsession, so that the remaining gamepads retain the same index.",
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <a href=\"$MDN_URL$/Web/API/Gamepad\"><code>Gamepad</code></a> objects, eventually empty.",
|
||
"throws": {
|
||
"SecurityError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>."
|
||
}
|
||
},
|
||
"navigator.getinstalledrelatedapps": {
|
||
"url": "$MDN_URL$/web/api/navigator/getinstalledrelatedapps",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "85",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "85",
|
||
"Opera": "71"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>getInstalledRelatedApps()</code></strong> method returns a promise that resolves with an array of objects representing any related platform-specific apps or <a href=\"$MDN_URL$/Web/Progressive_web_apps\">Progressive Web Apps</a> that the user has installed. This could be used for content personalization such as removing \"install our app\" banners from the web app if the platform-specific app and/or PWA is already installed.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This method must be invoked in a top-level <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure context</a>, that is, not embedded in an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a>.\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that fulfills with an array of objects representing any installed related apps. Each object can contain the following properties:\n<dl>\n <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt>\n <dd>\n <p>A string representing the ID used to represent the application on the specified platform. The exact form of the string will vary by platform.\n </dd>\n <dt id=\"platform\"><a href=\"#platform\"><code>platform</code></a></dt>\n <dd>\n <p>A string representing the <a href=\"https://github.com/w3c/manifest/wiki/Platforms\" class=\"external\" target=\"_blank\">platform</a> (ecosystem or operating system) the related app is associated with. This can be:\n <ul>\n <li><code>\"chrome_web_store\"</code>: A <a href=\"https://chrome.google.com/webstore\" class=\"external\" target=\"_blank\">Google Chrome Web Store</a> app.</li>\n <li><code>\"play\"</code>: A <a href=\"https://play.google.com/\" class=\"external\" target=\"_blank\">Google Play Store</a> app.</li>\n <li><code>\"chromeos_play\"</code>: A <a href=\"https://support.google.com/googleplay/answer/7021273\" class=\"external\" target=\"_blank\">ChromeOS Play</a> app.</li>\n <li><code>\"webapp\"</code>: A <a href=\"$MDN_URL$/Web/Progressive_web_apps\">Progressive Web App</a>.</li>\n <li><code>\"windows\"</code>: A <a href=\"https://www.microsoft.com/store/apps\" class=\"external\" target=\"_blank\">Windows Store</a> app.</li>\n <li><code>\"f-droid\"</code>: An <a href=\"https://f-droid.org/\" class=\"external\" target=\"_blank\">F-Droid</a> app.</li>\n <li><code>\"amazon\"</code>: An <a href=\"https://www.amazon.com/gp/browse.html?node=2350149011\" class=\"external\" target=\"_blank\">Amazon App Store</a> app.</li>\n </ul>\n </dd>\n <dt id=\"url\"><a href=\"#url\"><code>url</code></a> <span class=\"badge inline optional\">Optional</span></dt>\n <dd>\n <p>A string representing the URL associated with the app. This is usually where you can read information about it and install it.\n </dd>\n <dt id=\"version\"><a href=\"#version\"><code>version</code></a> <span class=\"badge inline optional\">Optional</span></dt>\n <dd>\n <p>A string representing the related app's version.\n </dd>\n</dl>\n<p>The related app information must have been previously specified in the <a href=\"$MDN_URL$/Web/Manifest/related_applications\"><code>related_applications</code></a> member of the invoking web app's <a href=\"$MDN_URL$/Web/Manifest\">manifest file</a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "The method was not invoked in a top-level browsing context."
|
||
}
|
||
},
|
||
"navigator.getusermedia": {
|
||
"url": "$MDN_URL$/web/api/navigator/getusermedia",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "",
|
||
"Opera": "40"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The deprecated <strong><code>Navigator.getUserMedia()</code></strong> method prompts the user for permission to use up to one video input device (such as a camera or shared screen) and up to one audio input device (such as a microphone) as the source for a <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a>.\n<p>If permission is granted, a <code>MediaStream</code> whose video and/or audio tracks come from those devices is delivered to the specified success callback.\nIf permission is denied, no compatible input devices exist, or any other error condition occurs, the error callback is executed with an object describing what went wrong.\nIf the user instead doesn't make a choice at all, neither callback is executed.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This is a legacy method.\nPlease use the newer <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" ><code>navigator.mediaDevices.getUserMedia()</code></a> instead.\nWhile technically not deprecated, this old callback version is marked as such, since the specification strongly encourages using the newer promise returning version.\n</div>",
|
||
"parameters": {
|
||
"constraints": "An object specifying the types of media to request, along with any requirements for each type. For details, see the <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia#parameters\">constraints</a> section under the modern <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\"><code>MediaDevices.getUserMedia()</code></a> method, as well as the article <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API/Constraints\">Capabilities, constraints, and settings</a>.",
|
||
"successCallback": "A function which is invoked when the request for media access is approved. The function is called with one parameter: the <a href=\"$MDN_URL$/Web/API/MediaStream\"><code>MediaStream</code></a> object that contains the media stream. Your callback can then assign the stream to the desired object (such as an <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a> element), as shown in the following example: <div class=\"code-example\"><div> ```js function successCallback(stream) { const video = document.querySelector(\"video\"); video.srcObject = stream; video.onloadedmetadata = (e) => { // Do something with the video here. }; } ``` </div></div>",
|
||
"errorCallback": "When the call fails, the function specified in the <code>errorCallback</code> is invoked with an object as its sole argument; this object is modeled on <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a>."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"navigator.getvrdisplays": {
|
||
"url": "$MDN_URL$/web/api/navigator/getvrdisplays",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>getVRDisplays()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a promise that resolves to an array of <a href=\"$MDN_URL$/Web/API/VRDisplay\"><code>VRDisplay</code></a> objects representing any available VR displays connected to the computer.",
|
||
"returns": "A promise that resolves to an array of <a href=\"$MDN_URL$/Web/API/VRDisplay\"><code>VRDisplay</code></a> objects."
|
||
},
|
||
"navigator.globalprivacycontrol": {
|
||
"url": "$MDN_URL$/web/api/navigator/globalprivacycontrol",
|
||
"status": [
|
||
"Experimental"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "120"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>Navigator.globalPrivacyControl</code></strong> read-only property returns the user's <a href=\"https://globalprivacycontrol.org/\" class=\"external\" target=\"_blank\">Global Privacy Control</a> setting for the current website.\nThis setting indicates whether the user consents to the website or service selling or sharing their personal information with third parties.\n<p>The value of the property reflects that of the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-GPC\"><code>Sec-GPC</code></a> HTTP header."
|
||
},
|
||
"navigator.gpu": {
|
||
"url": "$MDN_URL$/web/api/navigator/gpu",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "113",
|
||
"Edge": "113",
|
||
"Opera": "99"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Navigator.gpu</code></strong> read-only property returns the <a href=\"$MDN_URL$/Web/API/GPU\"><code>GPU</code></a> object for the current browsing context, which is the entry point for the <a href=\"$MDN_URL$/Web/API/WebGPU_API\" >WebGPU API</a>."
|
||
},
|
||
"navigator.hardwareconcurrency": {
|
||
"url": "$MDN_URL$/web/api/navigator/hardwareconcurrency",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "37",
|
||
"ChromeAndroid": "37",
|
||
"Edge": "15",
|
||
"Firefox": "48",
|
||
"Opera": "24",
|
||
"Deno": "1.13"
|
||
},
|
||
"doc": "The <strong><code>navigator.hardwareConcurrency</code></strong> read-only property\nreturns the number of logical processors available to run threads on the user's\ncomputer."
|
||
},
|
||
"navigator.hid": {
|
||
"url": "$MDN_URL$/web/api/navigator/hid",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "89",
|
||
"Edge": "89",
|
||
"Opera": "75"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>Navigator.hid</code></strong>\nread-only property returns an <a href=\"$MDN_URL$/Web/API/HID\"><code>HID</code></a> object providing methods\nfor connecting to HID devices, listing attached HID devices, and event\nhandlers for connected HID devices.\n<p>Where a defined <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> blocks WebHID usage, the <code>Navigator.hid</code> property will not be available."
|
||
},
|
||
"navigator.ink": {
|
||
"url": "$MDN_URL$/web/api/navigator/ink",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "93",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>ink</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns an <a href=\"$MDN_URL$/Web/API/Ink\"><code>Ink</code></a> object for the current document, providing access to <a href=\"$MDN_URL$/Web/API/Ink_API\">Ink API</a> functionality."
|
||
},
|
||
"navigator.javaenabled": {
|
||
"url": "$MDN_URL$/web/api/navigator/javaenabled",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>This method always returns false.",
|
||
"returns": "The boolean value <code>false</code>."
|
||
},
|
||
"navigator.keyboard": {
|
||
"url": "$MDN_URL$/web/api/navigator/keyboard",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "68",
|
||
"ChromeAndroid": "68",
|
||
"Edge": "79",
|
||
"Opera": "55"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>keyboard</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Keyboard\"><code>Keyboard</code></a> object\nwhich provides access to functions that retrieve keyboard layout maps and toggle\ncapturing of key presses from the physical keyboard."
|
||
},
|
||
"navigator.language": {
|
||
"url": "$MDN_URL$/web/api/navigator/language",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "4",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.27"
|
||
},
|
||
"doc": "The <strong><code>Navigator.language</code></strong> read-only property returns a string representing the preferred language of the user, usually the language of the browser UI."
|
||
},
|
||
"navigator.languages": {
|
||
"url": "$MDN_URL$/web/api/navigator/languages",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "37",
|
||
"ChromeAndroid": "37",
|
||
"Edge": "16",
|
||
"Firefox": "32",
|
||
"Opera": "24",
|
||
"Safari": "10.1",
|
||
"SafariIOS": "10.3",
|
||
"Deno": "1.27"
|
||
},
|
||
"doc": "The <strong><code>Navigator.languages</code></strong> read-only property\nreturns an array of strings representing the user's preferred\nlanguages. The language is described using language tags according to\n<a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. In the returned\narray they are ordered by preference with the most preferred language first.\n<p>The value of <a href=\"$MDN_URL$/Web/API/Navigator/language\" ><code>navigator.language</code></a> is the\nfirst element of the returned array.\n<p>When its value changes, as the user's preferred languages are changed a\n<a href=\"$MDN_URL$/Web/API/Window/languagechange_event\" ><code>languagechange</code></a> event is fired on the <a href=\"$MDN_URL$/Web/API/Window\"><code>Window</code></a> object.\n<p>The <code>Accept-Language</code> HTTP header in every HTTP request from the user's\nbrowser uses the same value for the <code>navigator.languages</code> property except for\nthe extra <code>qvalues</code> (quality values) field (e.g. <code>en-US;q=0.8</code>)."
|
||
},
|
||
"navigator.locks": {
|
||
"url": "$MDN_URL$/web/api/navigator/locks",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "96",
|
||
"Opera": "56",
|
||
"Safari": "15.4",
|
||
"SafariIOS": "15.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>locks</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/LockManager\"><code>LockManager</code></a> object\nwhich provides methods for requesting a new <a href=\"$MDN_URL$/Web/API/Lock\"><code>Lock</code></a> object and querying\nfor an existing <code>Lock</code> object."
|
||
},
|
||
"navigator.maxtouchpoints": {
|
||
"url": "$MDN_URL$/web/api/navigator/maxtouchpoints",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "22",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>maxTouchPoints</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns the maximum number of simultaneous touch\ncontact points are supported by the current device."
|
||
},
|
||
"navigator.mediacapabilities": {
|
||
"url": "$MDN_URL$/web/api/navigator/mediacapabilities",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "66",
|
||
"ChromeAndroid": "66",
|
||
"Edge": "79",
|
||
"Firefox": "63",
|
||
"Opera": "55",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>Navigator.mediaCapabilities</code></strong> read-only property\nreturns a <a href=\"$MDN_URL$/Web/API/MediaCapabilities\"><code>MediaCapabilities</code></a> object that can expose information about the\ndecoding and encoding capabilities for a given format and output capabilities as defined\nby the <a href=\"$MDN_URL$/Web/API/Media_Capabilities_API\">Media Capabilities API</a>."
|
||
},
|
||
"navigator.mediadevices": {
|
||
"url": "$MDN_URL$/web/api/navigator/mediadevices",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "",
|
||
"Firefox": "36",
|
||
"Opera": "34",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Navigator.mediaDevices</code></strong> read-only property returns a\n<a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> object, which provides access to connected media input\ndevices like cameras and microphones, as well as screen sharing.",
|
||
"returns": "The <a href=\"$MDN_URL$/Web/API/MediaDevices\"><code>MediaDevices</code></a> singleton object. Usually, you just use this object's\n members directly, such as by calling\n <a href=\"$MDN_URL$/Web/API/MediaDevices/getUserMedia\" title=\"navigator.mediaDevices.getUserMedia()\"><code>navigator.mediaDevices.getUserMedia()</code></a>."
|
||
},
|
||
"navigator.mediasession": {
|
||
"url": "$MDN_URL$/web/api/navigator/mediasession",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "82",
|
||
"Opera": "60",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The read-only <strong><code>mediaSession</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a>\ninterface returns a <a href=\"$MDN_URL$/Web/API/MediaSession\"><code>MediaSession</code></a>\nobject that can be used to share with the browser metadata and other information about\nthe current playback state of media being handled by a document.\n<p>This\ninformation may, in turn, be shared with the device and/or operating system in order to\na device's standard media control user experience to describe and control the playback\nof the media.\n<p>In addition, the <code>MediaSession</code> interface provides the\n<a href=\"$MDN_URL$/Web/API/MediaSession/setActionHandler\" ><code>setActionHandler()</code></a> method, which lets\nyou receive events when the user engages device controls such as either onscreen or\nphysical play, pause, seek, and other similar controls. An internet radio app, for\nexample, can use <code>setActionHandler()</code> to let the media controls on a keyboard\nor elsewhere on the user's device be used to control the app's media playback."
|
||
},
|
||
"navigator.mimetypes": {
|
||
"url": "$MDN_URL$/web/api/navigator/mimetypes",
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>Returns a <a href=\"$MDN_URL$/Web/API/MimeTypeArray\"><code>MimeTypeArray</code></a> object, which contains a list of <a href=\"$MDN_URL$/Web/API/MimeType\"><code>MimeType</code></a> objects representing the MIME types recognized and supported by the browser.\nThe array can be queried for information about the enabled plugin that is used to handle a file of the specified type.\nNamed properties of the returned object are not enumerable (except in very old browser versions).\n<p>Recent versions of the specification hard-code the returned set of MIME types.\nIf PDF files can be displayed inline then <code>application/pdf</code> and <code>text/pdf</code> are listed.\nOtherwise an empty list is returned.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Use <a href=\"$MDN_URL$/Web/API/Navigator/pdfViewerEnabled\"><code>Navigator.pdfViewerEnabled</code></a> to determine if inline viewing of PDF files is supported. Do not infer it from this property.\n</div>\n<p>Legacy browser versions do not hard-code the list returned by the property, and might return other MIME types."
|
||
},
|
||
"navigator.online": {
|
||
"url": "$MDN_URL$/web/api/navigator/online",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "3",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2"
|
||
},
|
||
"doc": "Returns the online status of the browser. The property returns a boolean value, with\n<code>true</code> meaning online and <code>false</code> meaning offline. The property\nsends updates whenever the browser's ability to connect to the network changes. The\nupdate occurs when the user follows links or when a script requests a remote page. For\nexample, the property should return <code>false</code> when users click links soon after\nthey lose internet connection.\n<p>Browsers implement this property differently.\n<p>In Chrome and Safari, if the browser is not able to connect to a local area network\n(LAN) or a router, it is offline; all other conditions return <code>true</code>. So\nwhile you can assume that the browser is offline when it returns a <code>false</code>\nvalue, you cannot assume that a true value necessarily means that the browser can access\nthe internet. You could be getting false positives, such as in cases where the computer\nis running a virtualization software that has virtual ethernet adapters that are always\n\"connected.\" Therefore, if you really want to determine the online status of the\nbrowser, you should develop additional means for checking.\n<p>In Firefox, switching the browser to offline mode sends a <code>false</code> value. Until Firefox\n41, all other conditions returned a <code>true</code> value; testing actual behavior on Nightly 68 on\nWindows shows that it only looks for LAN connection like Chrome and Safari giving false\npositives.\n<p>You can see changes in the network state by listening to the <a href=\"$MDN_URL$/Web/API/Window/online_event\"><code>online</code></a> and <a href=\"$MDN_URL$/Web/API/Window/offline_event\"><code>offline</code></a> events."
|
||
},
|
||
"navigator.oscpu": {
|
||
"url": "$MDN_URL$/web/api/navigator/oscpu",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>Navigator.oscpu</code></strong> property returns a string that identifies the current operating system."
|
||
},
|
||
"navigator.pdfviewerenabled": {
|
||
"url": "$MDN_URL$/web/api/navigator/pdfviewerenabled",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Firefox": "99",
|
||
"Opera": "80",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>pdfViewerEnabled</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface indicates whether the browser supports inline display of PDF files when navigating to them.\n<p>If inline viewing is not supported the PDF is downloaded and may then be handled by some external application.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method replaces a number of legacy methods of inferring support for inline viewing of PDF files.\n</div>"
|
||
},
|
||
"navigator.permissions": {
|
||
"url": "$MDN_URL$/web/api/navigator/permissions",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "30",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>Navigator.permissions</code></strong> read-only property returns a\n<a href=\"$MDN_URL$/Web/API/Permissions\"><code>Permissions</code></a> object that can be used to query and update permission\nstatus of APIs covered by the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a>."
|
||
},
|
||
"navigator.platform": {
|
||
"url": "$MDN_URL$/web/api/navigator/platform",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>platform</code></strong> property read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a string identifying the platform on which the user's browser is running.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> In general, you should whenever possible avoid writing code that uses methods or properties like this one to try to find out information about the user's environment, and instead write code that does <a href=\"$MDN_URL$/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection\">feature detection</a>.\n</div>"
|
||
},
|
||
"navigator.plugins": {
|
||
"url": "$MDN_URL$/web/api/navigator/plugins",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>Returns a <a href=\"$MDN_URL$/Web/API/PluginArray\"><code>PluginArray</code></a> object, listing the <a href=\"$MDN_URL$/Web/API/Plugin\"><code>Plugin</code></a> objects describing the plugins installed in the application.\nNamed properties of the returned object are not enumerable (except in very old browser versions).\n<p>Recent versions of the specification hard-code the returned list.\nIf inline viewing of PDF files is supported the property lists five standard plugins.\nIf inline PDF viewing is not supported then an empty list is returned.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Use <a href=\"$MDN_URL$/Web/API/Navigator/pdfViewerEnabled\"><code>Navigator.pdfViewerEnabled</code></a> to determine if inline viewing of PDF files is supported. Do not infer it from this property.\n<p>The \"five standard plugins\" are those that developers have most commonly used to feature detect inline PDF viewing.\nReturning these ensures that legacy code can more reliably determine whether inline viewing is supported.\nHowever this approach is not recommended for new code because this property may eventually be removed.\n</div>\n<p>Legacy browser versions also list plugins for Adobe Flash and PDF viewer extensions."
|
||
},
|
||
"navigator.presentation": {
|
||
"url": "$MDN_URL$/web/api/navigator/presentation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <code>presentation</code> read-only property of <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> serves as the entry\npoint for the <a href=\"$MDN_URL$/Web/API/Presentation_API\">Presentation API</a> and\nreturns a reference to <a href=\"$MDN_URL$/Web/API/Presentation\"><code>Presentation</code></a> object."
|
||
},
|
||
"navigator.product": {
|
||
"url": "$MDN_URL$/web/api/navigator/product",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The value of the <strong><code>Navigator.product</code></strong> property is always\n\"<code>Gecko</code>\", in any browser. This property is kept only for compatibility\npurposes.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Do not rely on this property to return a real product name. All browsers return \"<code>Gecko</code>\" as the value of this property.\n</div>"
|
||
},
|
||
"navigator.productsub": {
|
||
"url": "$MDN_URL$/web/api/navigator/productsub",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>Navigator.productSub</code></strong> read-only property returns the\nbuild number of the current browser."
|
||
},
|
||
"navigator.registerprotocolhandler": {
|
||
"url": "$MDN_URL$/web/api/navigator/registerprotocolhandler",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "13",
|
||
"Edge": "79",
|
||
"Firefox": "2",
|
||
"Opera": "11.6"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a></strong> method <strong><code>registerProtocolHandler()</code></strong> lets websites register their ability to open or handle particular URL schemes (aka protocols).\n<p>For example, this API lets webmail sites open <code>mailto:</code> URLs, or VoIP sites open <code>tel:</code> URLs.",
|
||
"parameters": {
|
||
"scheme": "A string containing the <a href=\"#permitted_schemes\">permitted scheme</a> for the protocol that the site wishes to handle. For example, you can register to handle SMS text message links by passing the <code>\"sms\"</code> scheme.",
|
||
"url": "A string containing the URL of the handler. <strong>This URL must include <code>%s</code></strong>, as a placeholder that will be replaced with the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/encodeURIComponent\">escaped</a> URL to be handled. <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> The handler URL must use the <code>https</code> scheme. Older browsers also supported <code>http</code>. </div>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"SecurityError DOMException": "The user agent blocked the registration. This might happen if: <ul> <li>The registered scheme (protocol) is invalid, such as a scheme the browser handles itself (<code>https:</code>, <code>about:</code>, etc.)</li> <li>The handler URL's <a href=\"$MDN_URL$/Glossary/Origin\">origin</a> does not match the origin of the page calling this API.</li> <li>The browser requires that this function is called from a secure context.</li> <li>The browser requires that the handler's URL be over HTTPS.</li> </ul>",
|
||
"SyntaxError DOMException": "The <code>%s</code> placeholder is missing from the handler URL."
|
||
}
|
||
},
|
||
"navigator.requestmediakeysystemaccess": {
|
||
"url": "$MDN_URL$/web/api/navigator/requestmediakeysystemaccess",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "13",
|
||
"Firefox": "38",
|
||
"Opera": "29",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "The <strong><code>Navigator.requestMediaKeySystemAccess()</code></strong> method\nreturns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which delivers a <a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess\"><code>MediaKeySystemAccess</code></a>\nobject that can be used to access a particular media key system, which can in turn be\nused to create keys for decrypting a media stream. This method is part of the <a href=\"$MDN_URL$/Web/API/Encrypted_Media_Extensions_API\">Encrypted Media Extensions API</a>, which brings support for encrypted media and DRM-protected video to the web.\n<p>This method may have user-visible effects such as asking for permission to access one\nor more system resources. Consider that when deciding when to call\n<code>requestMediaKeySystemAccess()</code>; you don't want those requests\nto happen at inconvenient times. As a general rule, this function should be called only\nwhen it's about time to create and use a <a href=\"$MDN_URL$/Web/API/MediaKeys\"><code>MediaKeys</code></a> object by calling the\nreturned <a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess\"><code>MediaKeySystemAccess</code></a> object's\n<a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess/createMediaKeys\" ><code>createMediaKeys()</code></a> method.",
|
||
"parameters": {
|
||
"keySystem": "A string identifying the key system. For example <code>com.example.somesystem</code> or <code>org.w3.clearkey</code>.",
|
||
"supportedConfigurations": "A non-empty <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of objects conforming to the object returned by <a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess/getConfiguration\"><code>MediaKeySystemAccess.getConfiguration</code></a>. The first element with a satisfiable configuration will be used."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that, when resolved, delivers a\n <a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess\"><code>MediaKeySystemAccess</code></a> object to your fulfillment handler function. The\n fulfillment handler receives as input just one parameter:\n<dl>\n <dt id=\"mediakeysystemaccess\"><a href=\"#mediakeysystemaccess\"><code>mediaKeySystemAccess</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Web/API/MediaKeySystemAccess\"><code>MediaKeySystemAccess</code></a> object representing the media key system\n configuration described by <code>keySystem</code> and\n <code>supportedConfigurations</code>\n </dd>\n</dl>",
|
||
"throws": {
|
||
"NotSupportedError DOMException": "Either the specified <code>keySystem</code> isn't supported by the platform or the browser, or none of the configurations specified by <code>supportedConfigurations</code> can be satisfied (if, for example, none of the <code>codecs</code> specified in <code>contentType</code> are available).",
|
||
"SecurityError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>.",
|
||
"TypeError`": "Either <code>keySystem</code> is an empty string or the <code>supportedConfigurations</code> array is empty."
|
||
}
|
||
},
|
||
"navigator.requestmidiaccess": {
|
||
"url": "$MDN_URL$/web/api/navigator/requestmidiaccess",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "108",
|
||
"Opera": "30"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>requestMIDIAccess()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> representing a request for access to MIDI devices on a user's system.\nThis method is part of the <a href=\"$MDN_URL$/Web/API/Web_MIDI_API\">Web MIDI API</a>, which provides a means for accessing, enumerating, and manipulating MIDI devices.\n<p>This method may prompt the user for access to MIDI devices available to their system, or it may use a previously established preference to grant or deny access.\nIf permission is granted then the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> resolves and a <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> object is returned.",
|
||
"parameters": {
|
||
"MIDIOptions": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Object\"><code>Object</code></a> representing options to pass into the method. These options are: <dl> <dt id=\"sysex\"><a href=\"#sysex\"><code>sysex</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a> value that, if set to <code>true</code>, allows the ability to send and receive system exclusive (sysex) messages. The default value is <code>false</code>. </dd> <dt id=\"software\"><a href=\"#software\"><code>software</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Boolean\"><code>Boolean</code></a> value that, if set to <code>true</code>, allows the system to utilize any installed software synthesizers. The default value is <code>false</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a <a href=\"$MDN_URL$/Web/API/MIDIAccess\"><code>MIDIAccess</code></a> object.",
|
||
"throws": {
|
||
"AbortError DOMException": "Thrown if the document or page is closed due to user navigation.",
|
||
"InvalidStateError DOMException": "Thrown if the underlying system raises any errors.",
|
||
"NotSupportedError DOMException": "Thrown if the feature or options are not supported by the system.",
|
||
"SecurityError DOMException": "Thrown if the user or system denies the application from creating a <a href=\"$MDN_URL$/Web/API/MIDIAccess\">MIDIAccess</a> object with the requested options, or if the document is not allowed to use the feature (for example, because of a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permission Policy</a>, or because the user previously denied a permission request)."
|
||
}
|
||
},
|
||
"navigator.scheduling": {
|
||
"url": "$MDN_URL$/web/api/navigator/scheduling",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "87",
|
||
"ChromeAndroid": "87",
|
||
"Edge": "87",
|
||
"Opera": "74"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>scheduling</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Scheduling\"><code>Scheduling</code></a> object for the current document, which provides methods and properties to control scheduling tasks."
|
||
},
|
||
"navigator.sendbeacon": {
|
||
"url": "$MDN_URL$/web/api/navigator/sendbeacon",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "39",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "31",
|
||
"Opera": "26",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <strong><code>navigator.sendBeacon()</code></strong>\nmethod <a href=\"$MDN_URL$/Glossary/Asynchronous\">asynchronously</a> sends an <a href=\"$MDN_URL$/Web/HTTP/Methods/POST\">HTTP POST</a> request containing a small amount of data to a web server.\n<p>It's intended to be used for\nsending analytics data to a web server, and avoids some of the problems with\nlegacy techniques for sending analytics, such as the use of\n<a href=\"$MDN_URL$/Web/API/XMLHttpRequest\" ><code>XMLHttpRequest</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> For use cases that need the ability to send requests with methods other than <code>POST</code>, or to change any request properties, or that need access to the server response, instead use the <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a> method with <a href=\"$MDN_URL$/Web/API/fetch#keepalive\"><code>keepalive</code></a> set to true.\n</div>",
|
||
"parameters": {
|
||
"url": "The URL that will receive the <em>data</em>. Can be relative or absolute.",
|
||
"data": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, a <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a>, a string literal or object, a <a href=\"$MDN_URL$/Web/API/FormData\"><code>FormData</code></a> or a <a href=\"$MDN_URL$/Web/API/URLSearchParams\"><code>URLSearchParams</code></a> object containing the data to send."
|
||
}
|
||
},
|
||
"navigator.serial": {
|
||
"url": "$MDN_URL$/web/api/navigator/serial",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "89",
|
||
"Edge": "89",
|
||
"Opera": "75"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>serial</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/Serial\"><code>Serial</code></a> object which represents the entry point into the <a href=\"$MDN_URL$/Web/API/Web_Serial_API\"><code>Web Serial API</code></a>.\n<p>When getting, the same instance of the <a href=\"$MDN_URL$/Web/API/Serial\"><code>Serial</code></a> object will always be returned."
|
||
},
|
||
"navigator.serviceworker": {
|
||
"url": "$MDN_URL$/web/api/navigator/serviceworker",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "40",
|
||
"ChromeAndroid": "40",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "27",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>serviceWorker</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/ServiceWorkerContainer\"><code>ServiceWorkerContainer</code></a> object for the <a href=\"https://html.spec.whatwg.org/multipage/browsers.html#concept-document-window\" class=\"external\" target=\"_blank\">associated document</a>, which provides access to registration, removal, upgrade, and communication with the <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a>.\n<p>The feature may not be available in private mode."
|
||
},
|
||
"navigator.setappbadge": {
|
||
"url": "$MDN_URL$/web/api/navigator/setappbadge",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Safari": "17",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>setAppBadge()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface sets a badge on the icon associated with this app. If a value is passed to the method, this will be set as the value of the badge. Otherwise the badge will display as a dot, or other indicator as defined by the platform.",
|
||
"parameters": {
|
||
"contents": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Number\"><code>number</code></a> which will be used as the value of the badge. If <code>contents</code> is <code>0</code> then the badge will be set to <code>nothing</code>, indicating a cleared badge."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the document is not fully active.",
|
||
"SecurityError DOMException": "Thrown if the call was blocked by the <a href=\"$MDN_URL$/Web/Security/Same-origin_policy\">same-origin policy</a>.",
|
||
"NotAllowedError DOMException": "Thrown if <a href=\"$MDN_URL$/Web/API/PermissionStatus/state\"><code>PermissionStatus.state</code></a> is not <code>granted</code>."
|
||
}
|
||
},
|
||
"navigator.share": {
|
||
"url": "$MDN_URL$/web/api/navigator/share",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "61",
|
||
"Edge": "93",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>navigator.share()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Web_Share_API\">Web Share API</a> invokes the native sharing mechanism of the device to share data such as text, URLs, or files. The available <em>share targets</em> depend on the device, but might include the clipboard, contacts and email applications, websites, Bluetooth, etc.\n<p>The method resolves a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> with <code>undefined</code>.\nOn Windows this happens when the share popup is launched, while on Android the promise resolves once the data has successfully been passed to the <em>share target</em>.",
|
||
"parameters": {
|
||
"data": "An object containing data to share. <p>Properties that are unknown to the user agent are ignored; share data is only assessed on properties understood by the user agent. All properties are optional but at least one known data property must be specified. <p>Possible values are: <ul> <li><code>url</code>: A string representing a URL to be shared.</li> <li><code>text</code>: A string representing text to be shared.</li> <li><code>title</code>: A string representing a title to be shared. May be ignored by the target.</li> <li><code>files</code>: An array of <a href=\"$MDN_URL$/Web/API/File\"><code>File</code></a> objects representing files to be shared. See <a href=\"#shareable_file_types\">below</a> for shareable file types.</li> </ul>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <code>undefined</code>, or rejected with one of the <a href=\"#exceptions\">Exceptions</a> given below.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "The document is not fully active, or other sharing operations are in progress.",
|
||
"NotAllowedError DOMException": "A <code>web-share</code> <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> has been used to block the use of this feature, the window does not have <a href=\"$MDN_URL$/Glossary/Transient_activation\">transient activation</a>, or a file share is being blocked due to security considerations.",
|
||
"TypeError": "The specified share data cannot be validated. Possible reasons include: <ul> <li>The <code>data</code> parameter was omitted completely or only contains properties with unknown values. Note that any properties that are not recognized by the user agent are ignored.</li> <li>A URL is badly formatted.</li> <li>Files are specified but the implementation does not support file sharing.</li> <li>Sharing the specified data would be considered a \"hostile share\" by the user-agent.</li> </ul>",
|
||
"AbortError DOMException": "The user canceled the share operation or there are no share targets available.",
|
||
"DataError DOMException": "There was a problem starting the share target or transmitting the data."
|
||
}
|
||
},
|
||
"navigator.storage": {
|
||
"url": "$MDN_URL$/web/api/navigator/storage",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "42",
|
||
"Safari": "15.2",
|
||
"SafariIOS": "15.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Navigator.storage</code></strong>\nread-only property returns the singleton <a href=\"$MDN_URL$/Web/API/StorageManager\"><code>StorageManager</code></a> object used to\naccess the overall storage capabilities of the browser for the current site or app.\nThe returned object lets you examine and configure persistence of data stores and\nlearn approximately how much more space your browser has available for local storage\nuse."
|
||
},
|
||
"navigator.taintenabled": {
|
||
"url": "$MDN_URL$/web/api/navigator/taintenabled",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>Navigator.taintEnabled()</code></strong> method always returns\n<code>false</code>.\n<p>Tainting was a security method used by JavaScript 1.2. It has long been removed; this\nmethod only stays for maintaining compatibility with very old scripts.",
|
||
"returns": "Always returns <code>false</code>."
|
||
},
|
||
"navigator.unregisterprotocolhandler": {
|
||
"url": "$MDN_URL$/web/api/navigator/unregisterprotocolhandler",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "38",
|
||
"Edge": "79",
|
||
"Opera": "25"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a></strong> method <strong><code>unregisterProtocolHandler()</code></strong> removes a protocol handler for a given URL <a href=\"#permitted_schemes\">scheme</a>.\n<p>This method is the inverse of <strong><code>registerProtocolHandler()</code></strong>.",
|
||
"parameters": {
|
||
"scheme": "A string containing the <a href=\"#permitted_schemes\">permitted scheme</a> in the protocol handler that will be unregistered. For example, you can unregister the handler for SMS text message links by passing the <code>\"sms\"</code> scheme.",
|
||
"url": "A string containing the URL of the handler. <strong>This URL should match the one that was used to register the handler (e.g. it must include <code>%s</code>)</strong>."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"SecurityError DOMException": "The user agent blocked unregistration. This might happen if: <ul> <li>The scheme (protocol) is invalid, such as a scheme the browser handles itself (<code>https:</code>, <code>about:</code>, etc.)</li> <li>The handler URL's <a href=\"$MDN_URL$/Glossary/Origin\">origin</a> does not match the origin of the page calling this API.</li> <li>The browser requires that this function is called from a secure context.</li> <li>The browser requires that the handler's URL be over HTTPS.</li> </ul>",
|
||
"SyntaxError DOMException": "The <code>%s</code> placeholder is missing from the handler URL."
|
||
}
|
||
},
|
||
"navigator.usb": {
|
||
"url": "$MDN_URL$/web/api/navigator/usb",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "61",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "The <strong><code>usb</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/USB\"><code>USB</code></a> object for the current document, providing access to <a href=\"$MDN_URL$/Web/API/WebUSB_API\">WebUSB API</a> functionality."
|
||
},
|
||
"navigator.useractivation": {
|
||
"url": "$MDN_URL$/web/api/navigator/useractivation",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "72",
|
||
"ChromeAndroid": "72",
|
||
"Edge": "79",
|
||
"Firefox": "120",
|
||
"Opera": "60",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The read-only <strong><code>userActivation</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/UserActivation\"><code>UserActivation</code></a> object which contains information about the current window's user activation state."
|
||
},
|
||
"navigator.useragent": {
|
||
"url": "$MDN_URL$/web/api/navigator/useragent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": "",
|
||
"Deno": "1.22"
|
||
},
|
||
"doc": "The <strong><code>Navigator.userAgent</code></strong> read-only property returns the\nuser agent string for the current browser.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The specification asks browsers to provide as little information via this field as\npossible. Never assume that the value of this property will stay the same in future\nversions of the same browser. Try not to use it at all, or only for current and past\nversions of a browser. New browsers may start using the same UA, or part of it, as an\nolder browser: you really have no guarantee that the browser agent is indeed the one\nadvertised by this property.\n<p>Also keep in mind that users of a browser can change the value of this field if they\nwant (UA spoofing).\n</div>\n<p>Browser identification based on detecting the user agent string is\n<strong>unreliable</strong> and <strong>is not recommended</strong>, as the user agent\nstring is user configurable. For example:\n<ul>\n<li>\nIn Firefox, you can change the preference <code>general.useragent.override</code> in\n<code>about:config</code>. Some Firefox extensions do that; however, this only changes\nthe HTTP header that gets sent and that is returned by <code>navigator.userAgent</code>.\nThere might be other methods that utilize JavaScript code to identify the browser.\n</li>\n<li>Opera 6+ allows users to set the browser identification string via a menu.</li>\n</ul>"
|
||
},
|
||
"navigator.useragentdata": {
|
||
"url": "$MDN_URL$/web/api/navigator/useragentdata",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "90",
|
||
"ChromeAndroid": "90",
|
||
"Edge": "90",
|
||
"Opera": "76"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>userAgentData</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> object\nwhich can be used to access the <a href=\"$MDN_URL$/Web/API/User-Agent_Client_Hints_API\"><code>User-Agent Client Hints API</code></a>."
|
||
},
|
||
"navigator.vendor": {
|
||
"url": "$MDN_URL$/web/api/navigator/vendor",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The value of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> <strong><code>vendor</code></strong> property is always either \"<code>Google Inc.</code>\", \"<code>Apple Computer, Inc.</code>\", or (in Firefox) the empty string."
|
||
},
|
||
"navigator.vendorsub": {
|
||
"url": "$MDN_URL$/web/api/navigator/vendorsub",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The value of the <strong><code>Navigator.vendorSub</code></strong> property is always\nthe empty string, in any browser."
|
||
},
|
||
"navigator.vibrate": {
|
||
"url": "$MDN_URL$/web/api/navigator/vibrate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "32",
|
||
"ChromeAndroid": "32",
|
||
"Edge": "79",
|
||
"Firefox": "16",
|
||
"Opera": "19"
|
||
},
|
||
"doc": "The <strong><code>Navigator.vibrate()</code></strong> method pulses the vibration\nhardware on the device, if such hardware exists. If the device doesn't support\nvibration, this method has no effect. If a vibration pattern is already in progress when\nthis method is called, the previous pattern is halted and the new one begins instead.\n<p>If the method was unable to vibrate because of invalid parameters, it will return\n<code>false</code>, else it returns <code>true</code>. If the pattern leads to a too\nlong vibration, it is truncated: the max length depends on the implementation.",
|
||
"parameters": {
|
||
"pattern": "Provides a pattern of vibration and pause intervals. Each value indicates a number of milliseconds to vibrate or pause, in alternation. You may provide either a single value (to vibrate once for that many milliseconds) or an array of values to alternately vibrate, pause, then vibrate again. See <a href=\"$MDN_URL$/Web/API/Vibration_API\">Vibration API</a> for details."
|
||
},
|
||
"returns": "A boolean."
|
||
},
|
||
"navigator.virtualkeyboard": {
|
||
"url": "$MDN_URL$/web/api/navigator/virtualkeyboard",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "94",
|
||
"ChromeAndroid": "94",
|
||
"Edge": "94",
|
||
"Opera": "80"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>virtualKeyboard</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>navigator</code></a> interface returns a reference to the <a href=\"$MDN_URL$/Web/API/VirtualKeyboard\"><code>VirtualKeyboard</code></a> instance object.\n<p>The <a href=\"$MDN_URL$/Web/API/VirtualKeyboard_API\" >VirtualKeyboard API</a> gives developers control over the layout of their applications when the on-screen virtual keyboard appears and disappears on devices such as tablets, mobile phones, or other devices where a hardware keyboard may not be available."
|
||
},
|
||
"navigator.wakelock": {
|
||
"url": "$MDN_URL$/web/api/navigator/wakelock",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "84",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "84",
|
||
"Firefox": "preview",
|
||
"Opera": "70",
|
||
"Safari": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>wakeLock</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/WakeLock\"><code>WakeLock</code></a> interface that allows a document to acquire a screen wake lock.\nWhile 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."
|
||
},
|
||
"navigator.webdriver": {
|
||
"url": "$MDN_URL$/web/api/navigator/webdriver",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "63",
|
||
"ChromeAndroid": "63",
|
||
"Edge": "",
|
||
"Firefox": "60",
|
||
"Opera": "50",
|
||
"Safari": "10.1",
|
||
"SafariIOS": "10.3"
|
||
},
|
||
"doc": "The <strong><code>webdriver</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>navigator</code></a> interface indicates whether the user agent is\ncontrolled by automation.\n<p>It defines a standard way for co-operating user agents to inform the document that it\nis controlled by <a href=\"$MDN_URL$/Web/WebDriver\">WebDriver</a>, for example, so that\nalternate code paths can be triggered during automation.\n<p>The <code>navigator.webdriver</code> property is true when in:\n<dl>\n<dt id=\"chrome\"><a href=\"#chrome\">Chrome</a></dt>\n<dd>\n<p>The <code>--enable-automation</code> or the <code>--headless</code> flag or the\n<code>--remote-debugging-port</code> is used.\n</dd>\n<dt id=\"firefox\"><a href=\"#firefox\">Firefox</a></dt>\n<dd>\n<p>The <code>marionette.enabled</code> preference or <code>--marionette</code> flag is\npassed.\n</dd>\n</dl>"
|
||
},
|
||
"navigator.windowcontrolsoverlay": {
|
||
"url": "$MDN_URL$/web/api/navigator/windowcontrolsoverlay",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "105",
|
||
"Edge": "105",
|
||
"Opera": "91"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>windowControlsOverlay</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a>\ninterface returns the <a href=\"$MDN_URL$/Web/API/WindowControlsOverlay\"><code>WindowControlsOverlay</code></a> interface, which exposes\ninformation about the title bar geometry in desktop Progressive Web Apps that use the <a href=\"$MDN_URL$/Web/API/Window_Controls_Overlay_API\">Window Controls Overlay API</a>.\n<p>Progressive Web Apps installed on desktop Operating Systems can opt-in to the\nWindow Controls Overlay feature by using the <code>window-controls-overlay</code> value in the\n<a href=\"$MDN_URL$/Web/Manifest/display_override\"><code>display_override</code></a> web app manifest member.\n<p>Doing so hides the default window title bar and gives the app access to the full area\nof the app window."
|
||
},
|
||
"navigator.xr": {
|
||
"url": "$MDN_URL$/web/api/navigator/xr",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "79",
|
||
"ChromeAndroid": "79",
|
||
"Edge": "79",
|
||
"Opera": "66"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The read-only <strong><code>xr</code></strong> property\nprovided by the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface returns an <a href=\"$MDN_URL$/Web/API/XRSystem\"><code>XRSystem</code></a> object\nwhich can be used to access the <a href=\"$MDN_URL$/Web/API/WebXR_Device_API\">WebXR Device API</a>."
|
||
},
|
||
"navigatoruadata": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "90",
|
||
"ChromeAndroid": "90",
|
||
"Edge": "90",
|
||
"Opera": "76"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>NavigatorUAData</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/User-Agent_Client_Hints_API\"><code>User-Agent Client Hints API</code></a> returns information about the browser and operating system of a user.\n<p>An instance of this object is returned by calling <a href=\"$MDN_URL$/Web/API/Navigator/userAgentData\"><code>Navigator.userAgentData</code></a>. Therefore, this interface has no constructor.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> The terms <em>high entropy</em> and <em>low entropy</em> refer to the amount of information these values reveal about the browser. The values returned as properties are deemed low entropy, and unlikely to identify a user. The values returned by <a href=\"$MDN_URL$/Web/API/NavigatorUAData/getHighEntropyValues\"><code>NavigatorUAData.getHighEntropyValues()</code></a> could potentially reveal more information. These values are therefore retrieved via a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>, allowing time for the browser to request user permission, or make other checks.\n</div>"
|
||
},
|
||
"navigatoruadata.brands": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata/brands",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "90",
|
||
"ChromeAndroid": "90",
|
||
"Edge": "90",
|
||
"Opera": "76"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>brands</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> interface returns an array of brand information."
|
||
},
|
||
"navigatoruadata.gethighentropyvalues": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata/gethighentropyvalues",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "90",
|
||
"ChromeAndroid": "90",
|
||
"Edge": "90",
|
||
"Opera": "76"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>getHighEntropyValues()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> interface is a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a dictionary object containing the <em>high entropy</em> values the user-agent returns.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> The terms <em>high entropy</em> and <em>low entropy</em> refer to the amount of information these values reveal about the browser.\nThe values returned as properties are deemed low entropy, and unlikely to identify a user.\nThe values returned by <a href=\"$MDN_URL$/Web/API/NavigatorUAData/getHighEntropyValues\" aria-current=\"page\"><code>NavigatorUAData.getHighEntropyValues()</code></a> could potentially reveal more information.\nThese values are therefore retrieved via a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>, allowing time for the browser to request user permission, or make other checks.\n</div>",
|
||
"parameters": {
|
||
"hints": "An array containing the hints to be returned, one or more of: <ul> <li><code>\"architecture\"</code></li> <li><code>\"bitness\"</code></li> <li><code>\"formFactor\"</code></li> <li><code>\"fullVersionList\"</code></li> <li><code>\"model\"</code></li> <li><code>\"platformVersion\"</code></li> <li><code>\"uaFullVersion\"</code> </li> <li><code>\"wow64\"</code></li> </ul>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to an object containing some or all of the following values (based on the hints requested):\n<dl>\n <dt id=\"brands\"><a href=\"#brands\"><code>brands</code></a></dt>\n <dd>\n <p>Returns an array of objects containing <code>brand</code> and <code>version</code> specifying the browser brand and its version (the same information as provided by <a href=\"$MDN_URL$/Web/API/NavigatorUAData/brands\"><code>NavigatorUAData.brands</code></a>).\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA\"><code>Sec-CH-UA</code></a> header (a <a href=\"$MDN_URL$/Web/HTTP/Client_hints#low_entropy_hints\">low-entropy client hint</a>).\n </dd>\n <dt id=\"mobile\"><a href=\"#mobile\"><code>mobile</code></a></dt>\n <dd>\n <p>Returns <code>true</code> if the user agent is running on a mobile device (the same information as provided by <a href=\"$MDN_URL$/Web/API/NavigatorUAData/mobile\"><code>NavigatorUAData.mobile</code></a>).\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Mobile\"><code>Sec-CH-UA-Mobile</code></a> header (a <a href=\"$MDN_URL$/Web/HTTP/Client_hints#low_entropy_hints\">low-entropy client hint</a>).\n </dd>\n <dt id=\"platform\"><a href=\"#platform\"><code>platform</code></a></dt>\n <dd>\n <p>Returns a string describing the platform the user agent is running on, like <code>\"Windows\"</code> (the same information as provided by <a href=\"$MDN_URL$/Web/API/NavigatorUAData/platform\"><code>NavigatorUAData.platform</code></a>).\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Platform\"><code>Sec-CH-UA-Platform</code></a> header (a <a href=\"$MDN_URL$/Web/HTTP/Client_hints#low_entropy_hints\">low-entropy client hint</a>).\n </dd>\n <dt id=\"architecture\"><a href=\"#architecture\"><code>architecture</code></a></dt>\n <dd>\n <p>A string containing the platform architecture. For example, <code>\"x86\"</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Arch\"><code>Sec-CH-UA-Arch</code></a> header after the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"bitness\"><a href=\"#bitness\"><code>bitness</code></a></dt>\n <dd>\n <p>A string containing the architecture bitness. For example, <code>\"32\"</code> or <code>\"64\"</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Bitness\"><code>Sec-CH-UA-Bitness</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"formfactor\"><a href=\"#formfactor\"><code>formFactor</code></a></dt>\n <dd>\n <p>A string containing the form-factor of a device. For example, <code>\"Tablet\"</code> or <code>\"VR\"</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Form-Factor\" class=\"page-not-created\" title=\"This is a link to an unwritten page\"><code>Sec-CH-UA-Form-Factor</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"fullversionlist\"><a href=\"#fullversionlist\"><code>fullVersionList</code></a></dt>\n <dd>\n <p>An array of objects with properties <code>\"brand\"</code> and <code>\"version\"</code> representing the browser name and full version respectively.\n For example, <code>{\"brand\": \"Google Chrome\", \"version\": \"103.0.5060.134\"}, {\"brand\": \"Chromium\", \"version\": \"103.0.5060.134\"}</code>.\n Please note that one object may intentionally contain invalid information to prevent sites from relying on a fixed list of browsers.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Full-Version-List\"><code>Sec-CH-UA-Full-Version-List</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"model\"><a href=\"#model\"><code>model</code></a></dt>\n <dd>\n <p>A string containing the model of mobile device. For example, <code>\"Pixel 2XL\"</code>. If device is not a mobile device or if device model is not known, <code>model</code> will be <code>\"\"</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Model\"><code>Sec-CH-UA-Model</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"platformversion\"><a href=\"#platformversion\"><code>platformVersion</code></a></dt>\n <dd>\n <p>A string containing the platform version. Platform name itself is always available as low-entropy hint <code>platform</code>. For example, <code>\"10.0\"</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Platform-Version\"><code>Sec-CH-UA-Platform-Version</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"uafullversion\"><a href=\"#uafullversion\"><code>uaFullVersion</code></a> <abbr class=\"icon icon-deprecated\" title=\"Deprecated. Not for use in new websites.\">\n <span class=\"visually-hidden\">Deprecated</span>\n</abbr></dt>\n <dd>\n <p>A string containing the full browser version. For example, <code>\"103.0.5060.134\"</code>. Deprecated in favor of <code>fullVersionList</code>.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-Full-Version\"><code>Sec-CH-UA-Full-Version</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n <dt id=\"wow64\"><a href=\"#wow64\"><code>wow64</code></a></dt>\n <dd>\n <p>A boolean indicating if the user agent's binary is running in 32-bit mode on 64-bit Windows.\n Note that this information can be sent to a server in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Sec-CH-UA-WoW64\" class=\"page-not-created\" title=\"This is a link to an unwritten page\"><code>Sec-CH-UA-WoW64</code></a> header if the server explicitly requests it in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Accept-CH\"><code>Accept-CH</code></a> header.\n </dd>\n</dl>",
|
||
"throws": {
|
||
"NotAllowedError DOMException": "Thrown if the user-agent decides that one or more of the <code>hints</code> requested should not be returned."
|
||
}
|
||
},
|
||
"navigatoruadata.mobile": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata/mobile",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "90",
|
||
"ChromeAndroid": "90",
|
||
"Edge": "90",
|
||
"Opera": "76"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>mobile</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> interface returns a value indicating whether the device is a mobile device."
|
||
},
|
||
"navigatoruadata.platform": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata/platform",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "93",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>platform</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> interface returns the platform brand information."
|
||
},
|
||
"navigatoruadata.tojson": {
|
||
"url": "$MDN_URL$/web/api/navigatoruadata/tojson",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "93",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NavigatorUAData\"><code>NavigatorUAData</code></a> interface is a <em>serializer</em> that returns a JSON representation of the <em>low entropy</em> properties of the <code>NavigatorUAData</code> object.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> The terms <em>high entropy</em> and <em>low entropy</em> refer to the amount of information these values reveal about the browser. The low entropy values returned by this method are those which do not reveal information able to identify a user. High entropy values can only be returned by the <a href=\"$MDN_URL$/Web/API/NavigatorUAData/getHighEntropyValues\"><code>NavigatorUAData.getHighEntropyValues()</code></a> method.\n</div>",
|
||
"returns": "A JSON object."
|
||
},
|
||
"ndefmessage": {
|
||
"url": "$MDN_URL$/web/api/ndefmessage",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFMessage</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_NFC_API\">Web NFC API</a> represents the content of an NDEF message that has been read from or could be written to an NFC tag. An instance is acquired by calling the <code>NDEFMessage()</code> constructor or from the <a href=\"$MDN_URL$/Web/API/NDEFReadingEvent/message\"><code>NDEFReadingEvent.message</code></a> property, which is passed to the <a href=\"$MDN_URL$/Web/API/NDEFReader/reading_event\" ><code>reading</code></a> event."
|
||
},
|
||
"ndefmessage.ndefmessage": {
|
||
"url": "$MDN_URL$/web/api/ndefmessage/ndefmessage",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFMessage()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/NDEFMessage\"><code>NDEFMessage</code></a> object, initialized with the given NDEF records.",
|
||
"parameters": {
|
||
"records": "An array of objects with the following members: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Contains the data to be transmitted; one of a string, n <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, or an array of nested records. </dd> <dt id=\"encoding\"><a href=\"#encoding\"><code>encoding</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string specifying the record's encoding. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A developer-defined identifier for the record. </dd> <dt id=\"lang\"><a href=\"#lang\"><code>lang</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. </dd> <dt id=\"mediatype\"><a href=\"#mediatype\"><code>mediaType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"recordtype\"><a href=\"#recordtype\"><code>recordType</code></a></dt> <dd> <p>A string indicating the type of data stored in <code>data</code>. It must be one of the following values: <dl> <dt id=\"sect3\"><a href=\"#sect3\"> </a><p><code>\"absolute-url\"</code> <p>An absolute URL to the data. <p><code>\"empty\"</code> </dt> <dd> <p>An empty <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>. </dd> <dt id=\"mime\"><a href=\"#mime\"><code>\"mime\"</code></a></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"smart-poster\"><a href=\"#smart-poster\"><code>\"smart-poster\"</code></a></dt> <dd> <p>A smart poster as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-smartposter\" class=\"external\" target=\"_blank\">NDEF-SMARTPOSTER</a> specification. </dd> <dt id=\"text\"><a href=\"#text\"><code>\"text\"</code></a></dt> <dd> <p>Text as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-text\" class=\"external\" target=\"_blank\">NDEF-TEXT</a> specification. </dd> <dt id=\"unknown\"><a href=\"#unknown\"><code>\"unknown\"</code></a></dt> <dd> <p>The record type is not known. </dd> <dt id=\"url\"><a href=\"#url\"><code>\"URL\"</code></a></dt> <dd> <p>A URL as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-uri\" class=\"external\" target=\"_blank\">NDEF-URI</a> specification. </dd> </dl> </dd> </dl>"
|
||
}
|
||
},
|
||
"ndefmessage.records": {
|
||
"url": "$MDN_URL$/web/api/ndefmessage/records",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <code>records</code> property of\n<a href=\"$MDN_URL$/Web/API/NDEFMessage\"><code>NDEFMessage</code></a> interface represents a list of <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>s\npresent in the NDEF message."
|
||
},
|
||
"ndefreader": {
|
||
"url": "$MDN_URL$/web/api/ndefreader",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFReader</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_NFC_API\">Web NFC API</a> is used to read from and write data to compatible NFC devices, e.g. NFC tags supporting NDEF, when these devices are within the reader's magnetic induction field."
|
||
},
|
||
"ndefreader.ndefreader": {
|
||
"url": "$MDN_URL$/web/api/ndefreader/ndefreader",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFReader()</code></strong>\nconstructor of the <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a> interface returns a\nnew <code>NDEFReader</code> object, which is used to read NDEF messages from\ncompatible NFC devices, e.g. NDEF tags, within the reader's magnetic induction\nfield.",
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a>."
|
||
},
|
||
"ndefreader.scan": {
|
||
"url": "$MDN_URL$/web/api/ndefreader/scan",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <code>scan()</code> method of the <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a> interface activates a reading device and returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that either resolves when an NFC tag read operation is scheduled or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the \"nfc\" permission has not been previously granted.",
|
||
"parameters": {
|
||
"options": "An object with the following properties: <dl> <dt id=\"signal\"><a href=\"#signal\"><code>signal</code></a></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a> that allows cancelling this <code>scan()</code> operation. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves immediately after\n scheduling read operations for the NFC adapter.",
|
||
"throws": {
|
||
"AbortError DOMException": "Returned if the scan operation was aborted with the <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a> passed in the <code>options</code> argument.",
|
||
"InvalidStateError DOMException": "Returned if there's already an ongoing scan.",
|
||
"NotAllowedError DOMException": "Returned if the permission for this operation was rejected.",
|
||
"NotSupportedError DOMException": "Returned if there is no NFC adapter compatible with Web NFC or a connection cannot be established."
|
||
}
|
||
},
|
||
"ndefreader.write": {
|
||
"url": "$MDN_URL$/web/api/ndefreader/write",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <code>write()</code> method of the <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a> interface attempts to write an NDEF message to a tag and returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that either resolves when a message has been written to the tag or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the \"nfc\" permission has not been previously granted.",
|
||
"parameters": {
|
||
"message": "The message to be written, either a string object or literal, an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, or an array of records. A record has the following members: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Contains the data to be transmitted, a string object or literal, an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, or an array of nested records </dd> <dt id=\"encoding\"><a href=\"#encoding\"><code>encoding</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string specifying the record's encoding. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A developer-defined identifier for the record. </dd> <dt id=\"lang\"><a href=\"#lang\"><code>lang</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. </dd> <dt id=\"mediatype\"><a href=\"#mediatype\"><code>mediaType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"recordtype\"><a href=\"#recordtype\"><code>recordType</code></a></dt> <dd> <p>A string indicating the type of data stored in <code>data</code>. It must be one of the following values: <dl> <dt id=\"absolute-url\"><a href=\"#absolute-url\"><code>\"absolute-url\"</code></a></dt> <dd> <p>An absolute URL to the data. </dd> <dt id=\"empty\"><a href=\"#empty\"><code>\"empty\"</code></a></dt> <dd> <p>An empty <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>. </dd> <dt id=\"mime\"><a href=\"#mime\"><code>\"mime\"</code></a></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"smart-poster\"><a href=\"#smart-poster\"><code>\"smart-poster\"</code></a></dt> <dd> <p>A smart poster as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-smartposter\" class=\"external\" target=\"_blank\">NDEF-SMARTPOSTER</a> specification. </dd> <dt id=\"text\"><a href=\"#text\"><code>\"text\"</code></a></dt> <dd> <p>Text as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-text\" class=\"external\" target=\"_blank\">NDEF-TEXT</a> specification. </dd> <dt id=\"unknown\"><a href=\"#unknown\"><code>\"unknown\"</code></a></dt> <dd> <p>The record type is not known. </dd> <dt id=\"url\"><a href=\"#url\"><code>\"URL\"</code></a></dt> <dd> <p>A URL as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-uri\" class=\"external\" target=\"_blank\">NDEF-URI</a> specification. </dd> </dl> </dd> </dl>",
|
||
"options": "An object with the following properties: <dl> <dt id=\"overwrite\"><a href=\"#overwrite\"><code>overwrite</code></a></dt> <dd> <p>A boolean value specifying whether or not existing records should be overwritten, if such exists. </dd> <dt id=\"signal\"><a href=\"#signal\"><code>signal</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a> that allows the current write operation to be canceled. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that either resolves when a message has been written to the tag or rejects if a hardware or permission error is encountered.",
|
||
"throws": {
|
||
"AbortError": "The scan operation was aborted with the <a href=\"$MDN_URL$/Web/API/AbortSignal\"><code>AbortSignal</code></a> passed in the <code>options</code> argument.",
|
||
"NotAllowedError": "The permission for this operation was rejected or <code>overwrite</code> is <code>false</code> and there are already records on the tag.",
|
||
"NotSupportedError": "There is no NFC adapter compatible with Web NFC, or the available NFC adapter does not support pushing messages, or connection can not be established.",
|
||
"NotReadableError": "The UA is not allowed to access underlying NFC adapter (e.g., due to user preference).",
|
||
"NetworkError": "Transfer failed after it already started (e.g., the tag was removed from the reader)."
|
||
}
|
||
},
|
||
"ndefreadingevent": {
|
||
"url": "$MDN_URL$/web/api/ndefreadingevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFReadingEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_NFC_API\">Web NFC API</a> represents events dispatched on new NFC readings obtained by <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a>."
|
||
},
|
||
"ndefreadingevent.message": {
|
||
"url": "$MDN_URL$/web/api/ndefreadingevent/message",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>message</code></strong> property of the <a href=\"$MDN_URL$/Web/API/NDEFReadingEvent\"><code>NDEFReadingEvent</code></a> interface returns an <a href=\"$MDN_URL$/Web/API/NDEFMessage\"><code>NDEFMessage</code></a> object containing the received message."
|
||
},
|
||
"ndefreadingevent.ndefreadingevent": {
|
||
"url": "$MDN_URL$/web/api/ndefreadingevent/ndefreadingevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFReadingEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/NDEFReadingEvent\"><code>NDEFReadingEvent</code></a> object which represents events dispatched on new NFC readings obtained by <a href=\"$MDN_URL$/Web/API/NDEFReader\"><code>NDEFReader</code></a>.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers always set it to <code>reading</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"serialnumber\"><a href=\"#serialnumber\"><code>serialNumber</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The serial number of the device a message was read from. It default to <code>\"\"</code>, and can be set to <code>null</code>. </dd> <dt id=\"message\"><a href=\"#message\"><code>message</code></a></dt> <dd> <p>An object with the following members: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Contains the data to be transmitted. It can be a string object or literal, an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, or an array of nested records. </dd> <dt id=\"encoding\"><a href=\"#encoding\"><code>encoding</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string specifying the record's encoding. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A developer-defined identifier for the record. </dd> <dt id=\"lang\"><a href=\"#lang\"><code>lang</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. </dd> <dt id=\"mediatype\"><a href=\"#mediatype\"><code>mediaType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"recordtype\"><a href=\"#recordtype\"><code>recordType</code></a></dt> <dd> <p>A string indicating the type of data stored in <code>data</code>. It must be one of the following values: <dl> <dt id=\"sect3\"><a href=\"#sect3\"> </a><p><code>\"absolute-url\"</code> <p>An absolute URL to the data. <p><code>\"empty\"</code> </dt> <dd> <p>An empty <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>. </dd> <dt id=\"mime\"><a href=\"#mime\"><code>\"mime\"</code></a></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"smart-poster\"><a href=\"#smart-poster\"><code>\"smart-poster\"</code></a></dt> <dd> <p>A smart poster as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-smartposter\" class=\"external\" target=\"_blank\">NDEF-SMARTPOSTER</a> specification. </dd> <dt id=\"text\"><a href=\"#text\"><code>\"text\"</code></a></dt> <dd> <p>Text as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-text\" class=\"external\" target=\"_blank\">NDEF-TEXT</a> specification. </dd> <dt id=\"unknown\"><a href=\"#unknown\"><code>\"unknown\"</code></a></dt> <dd> <p>The record type is not known. </dd> <dt id=\"url\"><a href=\"#url\"><code>\"URL\"</code></a></dt> <dd> <p>A URL as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-uri\" class=\"external\" target=\"_blank\">NDEF-URI</a> specification. </dd> </dl> </dd> </dl> </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/NDEFReadingEvent\"><code>NDEFReadingEvent</code></a> object."
|
||
},
|
||
"ndefreadingevent.serialnumber": {
|
||
"url": "$MDN_URL$/web/api/ndefreadingevent/serialnumber",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>serialNumber</code></strong> property of the <a href=\"$MDN_URL$/Web/API/NDEFReadingEvent\"><code>NDEFReadingEvent</code></a> interface returns the serial number of the device, which is used for anti-collision and identification, or an empty string if no serial number is available."
|
||
},
|
||
"ndefrecord": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFRecord</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_NFC_API\">Web NFC API</a> provides data that can be read from, or written to, compatible NFC devices, e.g. NFC tags supporting NDEF."
|
||
},
|
||
"ndefrecord.data": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/data",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>data</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns a\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a> containing the raw bytes of the record's payload."
|
||
},
|
||
"ndefrecord.encoding": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/encoding",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>encoding</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns the encoding of\na textual payload, or <code>null</code> otherwise."
|
||
},
|
||
"ndefrecord.id": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/id",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>id</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns the record identifier, which is an\nabsolute or relative URL used to identify the record.\n<p>This identifier is created by the generator of the record which is solely responsible\nfor enforcing record identifier uniqueness. Web NFC does not sign the NFC content, thus\nrecord consumer should not make any assumptions about integrity or authenticity of the\nidentifier or any other part of the records."
|
||
},
|
||
"ndefrecord.lang": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/lang",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>lang</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns the language of\na textual payload, or <code>null</code> if one was not supplied.\n<p>The record might be missing a language tag, for example, if the recorded information is\nnot locale-specific."
|
||
},
|
||
"ndefrecord.mediatype": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/mediatype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>mediaType</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns the <a href=\"$MDN_URL$/Glossary/MIME_type\">MIME type</a> of the record. This value will be <code>null</code> if <code>recordType</code> is not equal to <code>\"mime\"</code>."
|
||
},
|
||
"ndefrecord.ndefrecord": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/ndefrecord",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NDEFRecord()</code></strong>\nconstructor of the <a href=\"$MDN_URL$/Web/API/Web_NFC_API\">Web NFC API</a> returns a\nnewly constructed <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> object that represents data that can be\nread from, or written to, compatible NFC devices; e.g. NFC tags supporting NDEF.",
|
||
"parameters": {
|
||
"options": "An object with the following properties: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Contains the data to be transmitted. It can be a string object or literal, an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypedArray\"><code>TypedArray</code></a>, a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/DataView\"><code>DataView</code></a>, or an array of nested records. </dd> <dt id=\"encoding\"><a href=\"#encoding\"><code>encoding</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string specifying the record's encoding. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A developer-defined identifier for the record. </dd> <dt id=\"lang\"><a href=\"#lang\"><code>lang</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. </dd> <dt id=\"mediatype\"><a href=\"#mediatype\"><code>mediaType</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"recordtype\"><a href=\"#recordtype\"><code>recordType</code></a></dt> <dd> <p>A string indicating the type of data stored in <code>data</code>. It must be one of the following values: <dl> <dt id=\"sect3\"><a href=\"#sect3\"> </a><p><code>\"absolute-url\"</code> <p>An absolute URL to the data. <p><code>\"empty\"</code> </dt> <dd> <p>An empty <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>. </dd> <dt id=\"mime\"><a href=\"#mime\"><code>\"mime\"</code></a></dt> <dd> <p>A valid <a href=\"$MDN_URL$/Web/HTTP/Basics_of_HTTP/MIME_types\">MIME type</a>. </dd> <dt id=\"smart-poster\"><a href=\"#smart-poster\"><code>\"smart-poster\"</code></a></dt> <dd> <p>A smart poster as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-smartposter\" class=\"external\" target=\"_blank\">NDEF-SMARTPOSTER</a> specification. </dd> <dt id=\"text\"><a href=\"#text\"><code>\"text\"</code></a></dt> <dd> <p>Text as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-text\" class=\"external\" target=\"_blank\">NDEF-TEXT</a> specification. </dd> <dt id=\"unknown\"><a href=\"#unknown\"><code>\"unknown\"</code></a></dt> <dd> <p>The record type is not known. </dd> <dt id=\"url\"><a href=\"#url\"><code>\"URL\"</code></a></dt> <dd> <p>A URL as defined by the <a href=\"https://w3c.github.io/web-nfc/#bib-ndef-uri\" class=\"external\" target=\"_blank\">NDEF-URI</a> specification. </dd> </dl> </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>."
|
||
},
|
||
"ndefrecord.recordtype": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/recordtype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>recordType</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface returns the record type of the record."
|
||
},
|
||
"ndefrecord.torecords": {
|
||
"url": "$MDN_URL$/web/api/ndefrecord/torecords",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"ChromeAndroid": "89"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>toRecords()</code></strong>\nmethod of the <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a> interface converts\n<a href=\"$MDN_URL$/Web/API/NDEFRecord/data\"><code>NDEFRecord.data</code></a> to a sequence of records based on\n<a href=\"$MDN_URL$/Web/API/NDEFRecord/recordType\"><code>NDEFRecord.recordType</code></a>, and returns the result. This allows\nparsing the payloads of record types which may contain nested records, such\nas smart poster and external type records.",
|
||
"returns": "A list of <a href=\"$MDN_URL$/Web/API/NDEFRecord\"><code>NDEFRecord</code></a>s.",
|
||
"throws": {
|
||
"NotSupported DOMException": "Indicates that the <a href=\"$MDN_URL$/Glossary/User_agent\">User Agent</a> does not know how to parse this combination of <a href=\"$MDN_URL$/Web/API/NDEFRecord/data\"><code>NDEFRecord.data</code></a> and <a href=\"$MDN_URL$/Web/API/NDEFRecord/recordType\"><code>NDEFRecord.recordType</code></a>."
|
||
}
|
||
},
|
||
"networkinformation": {
|
||
"url": "$MDN_URL$/web/api/networkinformation",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NetworkInformation</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Network_Information_API\">Network Information API</a> provides information about the connection a device is using to communicate with the network and provides a means for scripts to be notified if the connection type changes.\nThe <code>NetworkInformation</code> interface cannot be instantiated. It is instead accessed through the <code>connection</code> property of the <a href=\"$MDN_URL$/Web/API/Navigator\"><code>Navigator</code></a> interface.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"networkinformation.downlink": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/downlink",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>downlink</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NetworkInformation\"><code>NetworkInformation</code></a> interface returns the effective bandwidth estimate in\nmegabits per second, rounded to the nearest multiple of 25 kilobits per seconds. This\nvalue is based on recently observed application layer throughput across recently active\nconnections, excluding connections made to a private address space. In the absence of\nrecent bandwidth measurement data, the attribute value is determined by the properties\nof the underlying connection technology."
|
||
},
|
||
"networkinformation.downlinkmax": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/downlinkmax",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NetworkInformation.downlinkMax</code></strong> read-only property\nreturns the maximum downlink speed, in megabits per second (Mbps), for the underlying\nconnection technology.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"networkinformation.effectivetype": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/effectivetype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>effectiveType</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/NetworkInformation\"><code>NetworkInformation</code></a> interface returns the effective type of the connection\nmeaning one of <code>slow-2g</code>, <code>2g</code>, <code>3g</code>, or <code>4g</code>. This value is determined using a\ncombination of recently observed, round-trip time and downlink values."
|
||
},
|
||
"networkinformation.rtt": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/rtt",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "79",
|
||
"Opera": "48"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NetworkInformation.rtt</code></strong> read-only property returns the\nestimated effective round-trip time of the current connection, rounded to the nearest\nmultiple of 25 milliseconds. This value is based on recently observed application-layer\nRTT measurements across recently active connections. It excludes connections made to a\nprivate address space. If no recent measurement data is available, the value is based on\nthe properties of the underlying connection technology.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"networkinformation.savedata": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/savedata",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Opera": "52"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NetworkInformation.saveData</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/NetworkInformation\"><code>NetworkInformation</code></a> interface returns <code>true</code> if\nthe user has set a reduced data usage option on the user agent."
|
||
},
|
||
"networkinformation.type": {
|
||
"url": "$MDN_URL$/web/api/networkinformation/type",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>NetworkInformation.type</code></strong> read-only property returns\nthe type of connection a device is using to communicate with the network.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"node": {
|
||
"url": "$MDN_URL$/web/api/node",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Glossary/DOM\">DOM</a> <strong><code>Node</code></strong> interface is an abstract base\nclass upon which many other DOM API objects are based, thus letting those object types\nto be used similarly and often interchangeably. As an abstract class, there is\nno such thing as a plain <code>Node</code> object. All objects that implement\n<code>Node</code> functionality are based on one of its subclasses. Most notable are\n<a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>, <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, and <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>.\n<p>In addition, every kind of DOM node is represented by an interface based on\n<code>Node</code>. These include <a href=\"$MDN_URL$/Web/API/Attr\"><code>Attr</code></a>, <a href=\"$MDN_URL$/Web/API/CharacterData\"><code>CharacterData</code></a>\n(which <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a>, <a href=\"$MDN_URL$/Web/API/Comment\"><code>Comment</code></a>, <a href=\"$MDN_URL$/Web/API/CDATASection\"><code>CDATASection</code></a> and\n<a href=\"$MDN_URL$/Web/API/ProcessingInstruction\"><code>ProcessingInstruction</code></a> are all based on), and <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a>.\n<p>In some cases, a particular feature of the base <code>Node</code> interface may not\napply to one of its child interfaces; in that case, the inheriting node may\nreturn <code>null</code> or throw an exception, depending on circumstances. For example,\nattempting to add children to a node type that cannot have children will throw an\nexception."
|
||
},
|
||
"node.appendchild": {
|
||
"url": "$MDN_URL$/web/api/node/appendchild",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>appendChild()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface adds a node to the end of the list of children of a specified parent node.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> If the given child is a reference to an existing node in the document, <code>appendChild()</code> moves it from its current position to the new position.\n</div>\n<p>If the given child is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, the entire contents of the <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a> are moved into the child list of the specified parent node.\n<p><code>appendChild()</code> returns the newly appended node, or if the child is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, the emptied fragment.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Unlike this method, the <a href=\"$MDN_URL$/Web/API/Element/append\"><code>Element.append()</code></a> method supports multiple arguments and appending strings. You can prefer using it if your node is an element.\n</div>",
|
||
"parameters": {
|
||
"aChild": "The node to append to the given parent node (commonly an element)."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> that is the appended child (<code>aChild</code>), except when <code>aChild</code> is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, in which case the empty <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a> is returned.",
|
||
"throws": {
|
||
"HierarchyRequestError DOMException": "Thrown when the constraints of the DOM tree are violated, that is if one of the following cases occurs: <ul> <li>If the parent of <code>aChild</code> is not a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>, <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, or an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>.</li> <li>If the insertion of <code>aChild</code> would lead to a cycle, that is if <code>aChild</code> is an ancestor of the node.</li> <li>If <code>aChild</code> is not a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a>, an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, or a <a href=\"$MDN_URL$/Web/API/CharacterData\"><code>CharacterData</code></a>.</li> <li>If the current node is a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a>, and its parent is a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>.</li> <li>If the current node is a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a> and its parent is <em>not</em> a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>, as a <em>doctype</em> should always be a direct descendant of a <em>document</em>.</li> <li>If the parent of the node is a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> and <code>aChild</code> is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a> with more than one <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> child, or that has a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> child.</li> <li>If the insertion of <code>aChild</code> would lead to <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> with more than one <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> as child.</li> </ul>"
|
||
}
|
||
},
|
||
"node.baseuri": {
|
||
"url": "$MDN_URL$/web/api/node/baseuri",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>baseURI</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the absolute base URL of the document containing the node.\n<p>The base URL is used to resolve relative URLs when the browser needs to obtain an absolute URL, for example when processing the HTML <a href=\"$MDN_URL$/Web/HTML/Element/img\"><code><img></code></a> element's <code>src</code> attribute or the <code>xlink:href</code> or <code>href</code> attributes in SVG.\n<p>Although this property is read-only, its value is determined by an algorithm each time\nthe property is accessed, and may change if the conditions changed.\n<p>The base URL is determined as follows:\n<ol>\n<li>By default, the base URL is the location of the document (as determined by <a href=\"$MDN_URL$/Web/API/Window/location\"><code>window.location</code></a>).</li>\n<li>\nIf it is an HTML Document and there is a <a href=\"$MDN_URL$/Web/HTML/Element/base\"><code><base></code></a> element in the document,\nthe <code>href</code> value of the <em>first</em> <code>Base</code> element with such an attribute is used instead.\n</li>\n</ol>"
|
||
},
|
||
"node.childnodes": {
|
||
"url": "$MDN_URL$/web/api/node/childnodes",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.2",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>childNodes</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface returns a live\n<a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a> of child <a href=\"$MDN_URL$/Web/API/Node\" ><code>nodes</code></a> of the given element where\nthe first child node is assigned index <code>0</code>. Child nodes include elements, text and\ncomments.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a> being live means that its content is changed each time\nnew children are added or removed.\n<p>Browsers insert text nodes into a document to represent whitespace in the source markup.\nTherefore a node obtained, for example, using <code>Node.childNodes[0]</code>\nmay refer to a whitespace text node rather than the actual element the author intended to get.\n<p>See <a href=\"$MDN_URL$/Web/API/Document_Object_Model/Whitespace\">Whitespace in the DOM</a> for more information.\n</div>\n<p>The items in the collection of nodes are objects, not strings. To get data from node\nobjects, use their properties. For example, to get the name of the first\nchildNode, you can use <code>elementNodeReference.childNodes[0].nodeName</code>.\n<p>The <a href=\"$MDN_URL$/Web/API/Document\"><code>document</code></a> object itself has two children: the Doctype declaration and the\nroot element, typically referred to as <code>documentElement</code>. In HTML\ndocuments the latter is the <a href=\"$MDN_URL$/Web/HTML/Element/html\"><code><html></code></a> element.\n<p>It is important to keep in mind that <code>childNodes</code> includes <em>all</em> child nodes,\nincluding non-element nodes like text and comment.\nTo get a collection containing only elements, use <a href=\"$MDN_URL$/Web/API/Element/children\"><code>Element.children</code></a> instead."
|
||
},
|
||
"node.clonenode": {
|
||
"url": "$MDN_URL$/web/api/node/clonenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>cloneNode()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns a duplicate of the node on which this method was called.\nIts parameter controls if the subtree contained in a node is also cloned or not.\n<p>Cloning a node copies all of its attributes and their values,\nincluding intrinsic (inline) listeners. It does <em>not</em> copy event listeners added\nusing <a href=\"$MDN_URL$/Web/API/EventTarget/addEventListener\"><code>addEventListener()</code></a> or\nthose assigned to element properties (e.g., <code>node.onclick = someFunction</code>).\nAdditionally, for a <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element, the painted image is not copied.\n<div class=\"notecard warning\" id=\"sect1\">\n<p><strong>Warning:</strong> <code>cloneNode()</code> may lead to duplicate element IDs in a document!\n<p>If the original node has an <code>id</code> attribute, and the clone\nwill be placed in the same document, then you should modify the clone's ID to be\nunique.\n<p>Also, <code>name</code> attributes may need to be modified,\ndepending on whether duplicate names are expected.\n</div>\n<p>To clone a node to insert into a <em>different</em> document, use\n<a href=\"$MDN_URL$/Web/API/Document/importNode\"><code>Document.importNode()</code></a> instead.",
|
||
"parameters": {
|
||
"deep": "If <code>true</code>, then the node and its whole subtree, including text that may be in child <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> nodes, is also copied. <p>If <code>false</code>, only the node will be cloned. The subtree, including any text that the node contains, is not cloned. <p>Note that <code>deep</code> has no effect on <a href=\"$MDN_URL$/Glossary/Void_element\">void elements</a>, such as the <a href=\"$MDN_URL$/Web/HTML/Element/img\"><code><img></code></a> and <a href=\"$MDN_URL$/Web/HTML/Element/input\"><code><input></code></a> elements."
|
||
},
|
||
"returns": "The new <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> cloned.\n The cloned node has no parent and is not part of the document,\n <em>until</em> it is added to another node that is part of the document,\n using <a href=\"$MDN_URL$/Web/API/Node/appendChild\"><code>Node.appendChild()</code></a> or a similar method."
|
||
},
|
||
"node.comparedocumentposition": {
|
||
"url": "$MDN_URL$/web/api/node/comparedocumentposition",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "2",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "4",
|
||
"SafariIOS": "3.2"
|
||
},
|
||
"doc": "The <strong><code>compareDocumentPosition()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreports the position of its argument node relative to the node on which it is called.",
|
||
"parameters": {
|
||
"otherNode": "The <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> for which position should be reported, relative to the node."
|
||
},
|
||
"returns": "An integer value representing <code>otherNode</code>'s position relative to <code>node</code>\n as a <a href=\"https://en.wikipedia.org/wiki/Mask_(computing)\" class=\"external\" target=\"_blank\">bitmask</a> combining the\n following constant properties of <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a>:\n<dl>\n <dt id=\"node.document_position_disconnected\"><a href=\"#node.document_position_disconnected\"><code>Node.DOCUMENT_POSITION_DISCONNECTED</code></a> (<code>1</code>)</dt>\n <dd>\n <p>Both nodes are in different documents or different trees in the same document.\n </dd>\n <dt id=\"node.document_position_preceding\"><a href=\"#node.document_position_preceding\"><code>Node.DOCUMENT_POSITION_PRECEDING</code></a> (<code>2</code>)</dt>\n <dd>\n <p><code>otherNode</code> precedes the node in either a <a href=\"https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR\" class=\"external\" target=\"_blank\">pre-order depth-first traversal</a> of a tree containing both (e.g., as an ancestor or previous sibling or a descendant of a previous sibling or previous sibling of an ancestor) or (if they are disconnected) in an arbitrary but consistent ordering.\n </dd>\n <dt id=\"node.document_position_following\"><a href=\"#node.document_position_following\"><code>Node.DOCUMENT_POSITION_FOLLOWING</code></a> (<code>4</code>)</dt>\n <dd>\n <p><code>otherNode</code> follows the node in either a <a href=\"https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR\" class=\"external\" target=\"_blank\">pre-order depth-first traversal</a> of a tree containing both (e.g., as a descendant or following sibling or a descendant of a following sibling or following sibling of an ancestor) or (if they are disconnected) in an arbitrary but consistent ordering.\n </dd>\n <dt id=\"node.document_position_contains\"><a href=\"#node.document_position_contains\"><code>Node.DOCUMENT_POSITION_CONTAINS</code></a> (<code>8</code>)</dt>\n <dd>\n <p><code>otherNode</code> is an ancestor of the node.\n </dd>\n <dt id=\"node.document_position_contained_by\"><a href=\"#node.document_position_contained_by\"><code>Node.DOCUMENT_POSITION_CONTAINED_BY</code></a> (<code>16</code>)</dt>\n <dd>\n <p><code>otherNode</code> is a descendant of the node.\n </dd>\n <dt id=\"node.document_position_implementation_specific\"><a href=\"#node.document_position_implementation_specific\"><code>Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC</code></a> (<code>32</code>)</dt>\n <dd>\n <p>The result relies upon arbitrary and/or implementation-specific behavior and is not guaranteed to be portable.\n </dd>\n</dl>\n<p>More than one bit is set if multiple scenarios apply. For example, if\n <code>otherNode</code> is located earlier in the document <strong><em>and</em></strong>\n contains the node on which <code>compareDocumentPosition()</code> was\n called, then both the <code>DOCUMENT_POSITION_CONTAINS</code> and\n <code>DOCUMENT_POSITION_PRECEDING</code> bits would be set, producing a value of <code>10</code> (<code>0x0A</code>)."
|
||
},
|
||
"node.contains": {
|
||
"url": "$MDN_URL$/web/api/node/contains",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "9",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>contains()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns a boolean value indicating\nwhether a node is a descendant of a given node, that is the node itself,\none of its direct children (<a href=\"$MDN_URL$/Web/API/Node/childNodes\" ><code>childNodes</code></a>),\none of the children's direct children, and so on.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> A node is <em>contained</em> inside itself.\n</div>",
|
||
"parameters": {
|
||
"otherNode": "The <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> to test with. <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> <code>otherNode</code> is not optional, but can be set to <code>null</code>. </div>"
|
||
},
|
||
"returns": "A boolean value that is <code>true</code> if <code>otherNode</code> is contained in the node,\n <code>false</code> if not.\n<p>If the <code>otherNode</code> parameter is <code>null</code>,\n <code>contains()</code> always returns <code>false</code>."
|
||
},
|
||
"node.firstchild": {
|
||
"url": "$MDN_URL$/web/api/node/firstchild",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>firstChild</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the node's first child in the tree,\nor <code>null</code> if the node has no children.\n<p>If the node is a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>,\nthis property returns the first node in the list of its direct children.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This property returns any type of node that is the first child of this one.\nIt may be a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> or a <a href=\"$MDN_URL$/Web/API/Comment\"><code>Comment</code></a> node.\nIf you want to get the first <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> that is a child of another element,\nconsider using <a href=\"$MDN_URL$/Web/API/Element/firstElementChild\"><code>Element.firstElementChild</code></a>.\n</div>"
|
||
},
|
||
"node.getrootnode": {
|
||
"url": "$MDN_URL$/web/api/node/getrootnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "41",
|
||
"Safari": "10.1",
|
||
"SafariIOS": "10.3"
|
||
},
|
||
"doc": "The <strong><code>getRootNode()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the context object's root,\nwhich optionally includes the shadow root if it is available.",
|
||
"parameters": {
|
||
"options": "An object that sets options for getting the root node. The available options are: <ul> <li> <code>composed</code>: A boolean value that indicates whether the shadow root should be returned (<code>false</code>, the default), or a root node beyond shadow root (<code>true</code>). </li> </ul>"
|
||
},
|
||
"returns": "An object inheriting from <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a>. This will differ in exact form depending\n on where you call <code>getRootNode()</code>; for example:\n<ul>\n <li>\n Calling it on an element inside a standard web page will return an\n <a href=\"$MDN_URL$/Web/API/HTMLDocument\"><code>HTMLDocument</code></a> object representing the entire page (or <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a>).\n </li>\n <li>\n Calling it on an element inside a shadow DOM will return the associated\n <a href=\"$MDN_URL$/Web/API/ShadowRoot\"><code>ShadowRoot</code></a>.\n </li>\n <li>\n Calling it on an element that is not attached to a document or a shadow tree will return\n the root of the DOM tree it belongs to.\n </li>\n</ul>"
|
||
},
|
||
"node.haschildnodes": {
|
||
"url": "$MDN_URL$/web/api/node/haschildnodes",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>hasChildNodes()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns a boolean value indicating\nwhether the given <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> has <a href=\"$MDN_URL$/Web/API/Node/childNodes\">child nodes</a> or not.",
|
||
"returns": "A boolean value that is <code>true</code> if the node has child nodes, and\n <code>false</code> otherwise."
|
||
},
|
||
"node.insertbefore": {
|
||
"url": "$MDN_URL$/web/api/node/insertbefore",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>insertBefore()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\ninserts a node before a <em>reference node</em> as a child of a specified <em>parent node</em>.\n<p>If the given node already exists in the document,\n<code>insertBefore()</code> moves it from its current position to the new position.\n(That is, it will automatically be removed from its existing parent\nbefore appending it to the specified new parent.)\n<p>This means that a node cannot be in two locations of the document simultaneously.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The <a href=\"$MDN_URL$/Web/API/Node/cloneNode\"><code>Node.cloneNode()</code></a> can be used to make a copy\nof the node before appending it under the new parent. Note that the copies made with\n<code>cloneNode()</code> will not be automatically kept in sync.\n</div>\n<p>If the given child is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, the entire contents of the\n<code>DocumentFragment</code> are moved into the child list of the specified parent\nnode.",
|
||
"parameters": {
|
||
"newNode": "The node to be inserted.",
|
||
"referenceNode": "The node before which <code>newNode</code> is inserted. If this is <code>null</code>, then <code>newNode</code> is inserted at the end of node's child nodes. <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> <code>referenceNode</code> is <strong>not</strong> an optional parameter. You must explicitly pass a <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> or <code>null</code>. Failing to provide it or passing invalid values may <a href=\"https://crbug.com/419780\" class=\"external\" target=\"_blank\">behave</a> <a href=\"https://bugzil.la/119489\" class=\"external\" target=\"_blank\">differently</a> in different browser versions. </div>"
|
||
},
|
||
"returns": "Returns the added child (unless <code>newNode</code> is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>,\n in which case the empty <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a> is returned)."
|
||
},
|
||
"node.isconnected": {
|
||
"url": "$MDN_URL$/web/api/node/isconnected",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "79",
|
||
"Firefox": "49",
|
||
"Opera": "38",
|
||
"Safari": "10",
|
||
"SafariIOS": "10"
|
||
},
|
||
"doc": "The read-only <strong><code>isConnected</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns a boolean indicating whether the node is connected\n(directly or indirectly) to a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> object."
|
||
},
|
||
"node.isdefaultnamespace": {
|
||
"url": "$MDN_URL$/web/api/node/isdefaultnamespace",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>isDefaultNamespace()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface accepts a namespace URI as an argument.\nIt returns a boolean value that is <code>true</code> if the namespace is the default namespace on the given node and <code>false</code> if not.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The default namespace of an HTML element is always <code>\"\"</code>. For a SVG element, it is set by the <code>xmlns</code> attribute.\n</div>",
|
||
"parameters": {
|
||
"namespaceURI": "A string representing the namespace against which the element will be checked. <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> <code>namespaceURI</code> is not an optional parameter, but can be <code>null</code>. </div>"
|
||
},
|
||
"returns": "A boolean value that holds the return value <code>true</code> or <code>false</code>, indicating if the parameter is the default namespace, or not."
|
||
},
|
||
"node.isequalnode": {
|
||
"url": "$MDN_URL$/web/api/node/isequalnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>isEqualNode()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface tests whether two nodes are equal.\nTwo nodes are equal when they have the same type, defining characteristics (for\nelements, this would be their ID, number of children, and so forth), its attributes\nmatch, and so on. The specific set of data points that must match varies depending on\nthe types of the nodes.",
|
||
"parameters": {
|
||
"otherNode": "The <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> to compare equality with. <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> This parameter is not optional, but can be set to <code>null</code>. </div>"
|
||
},
|
||
"returns": "A boolean value that is <code>true</code> if the two nodes are equals, or <code>false</code> if not.\n If <code>otherNode</code> is <code>null</code>, <code>isEqualNode()</code> always return false."
|
||
},
|
||
"node.issamenode": {
|
||
"url": "$MDN_URL$/web/api/node/issamenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "48",
|
||
"Opera": "12.1",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>isSameNode()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nis a legacy alias the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Operators/Strict_equality\">for the <code>===</code> strict equality operator</a>.\nThat is, it tests whether two nodes are the same\n(in other words, whether they reference the same object).\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> There is no need to use <code>isSameNode()</code>; instead use the <code>===</code> strict equality operator.\n</div>",
|
||
"parameters": {
|
||
"otherNode": "The <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> to test against. <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> This parameter is not optional, but can be set to <code>null</code>. </div>"
|
||
},
|
||
"returns": "A boolean value that is <code>true</code> if both nodes are strictly equal, <code>false</code> if not."
|
||
},
|
||
"node.lastchild": {
|
||
"url": "$MDN_URL$/web/api/node/lastchild",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>lastChild</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the last child of the node, or <code>null</code> if there are no child nodes.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This property returns any type of node that is the last child of this one.\nIt may be a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> or a <a href=\"$MDN_URL$/Web/API/Comment\"><code>Comment</code></a> node.\nIf you want to get the last <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> that is a child of another element,\nconsider using <a href=\"$MDN_URL$/Web/API/Element/lastElementChild\"><code>Element.lastElementChild</code></a>.\n</div>"
|
||
},
|
||
"node.lookupnamespaceuri": {
|
||
"url": "$MDN_URL$/web/api/node/lookupnamespaceuri",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>lookupNamespaceURI()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\ntakes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and\n<code>null</code> if not).",
|
||
"parameters": {
|
||
"prefix": "The prefix to look for. <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> This parameter is not optional, but can be set to <code>null</code>. </div>"
|
||
},
|
||
"returns": "A string containing the namespace URI corresponding to the prefix.\n If the prefix is not found, it returns <code>null</code>.\n If the requested <code>prefix</code> is <code>null</code>, it returns the default namespace URI."
|
||
},
|
||
"node.lookupprefix": {
|
||
"url": "$MDN_URL$/web/api/node/lookupprefix",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>lookupPrefix()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns a string containing the prefix for a given namespace URI, if present,\nand <code>null</code> if not.\nWhen multiple prefixes are possible, the first prefix is returned.",
|
||
"parameters": {
|
||
"namespace": "A string containing the namespace to look the prefix up. <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> This parameter is not optional but can be set to <code>null</code>. </div>"
|
||
},
|
||
"returns": "A string containing the corresponding prefix, or <code>null</code> if none has been found.\n If <code>namespace</code> is null, or the empty string, <code>lookupPrefix()</code> returns <code>null</code>.\n<p>If the node is a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a> or a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>,\n <code>lookupPrefix()</code> always returns <code>null</code>."
|
||
},
|
||
"node.nextsibling": {
|
||
"url": "$MDN_URL$/web/api/node/nextsibling",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>nextSibling</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the node immediately following the specified one in their\nparent's <a href=\"$MDN_URL$/Web/API/Node/childNodes\" ><code>childNodes</code></a>, or returns <code>null</code>\nif the specified node is the last child in the parent element.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Browsers insert <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> nodes into a document to represent whitespace in the source markup.\nTherefore a node obtained, for example, using <a href=\"$MDN_URL$/Web/API/Node/firstChild\"><code>Node.firstChild</code></a>\nor <a href=\"$MDN_URL$/Web/API/Node/previousSibling\"><code>Node.previousSibling</code></a>\nmay refer to a whitespace text node rather than the actual element the author\nintended to get.\n<p>The article <a href=\"$MDN_URL$/Web/API/Document_Object_Model/Whitespace\">Whitespace in the DOM</a>\ncontains more information about this behavior.\n<p>You can use <a href=\"$MDN_URL$/Web/API/Element/nextElementSibling\"><code>Element.nextElementSibling</code></a> to obtain the next element\nskipping any whitespace nodes, other between-element text, or comments.\n<p>To navigate the opposite way through the child nodes list use <a href=\"$MDN_URL$/Web/API/Node/previousSibling\">Node.previousSibling</a>.\n</div>"
|
||
},
|
||
"node.nodename": {
|
||
"url": "$MDN_URL$/web/api/node/nodename",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>nodeName</code></strong> property of <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> returns the name of the current node as a string."
|
||
},
|
||
"node.nodetype": {
|
||
"url": "$MDN_URL$/web/api/node/nodetype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>nodeType</code></strong> property of a <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface is an integer\nthat identifies what the node is. It distinguishes different kind of nodes from each other,\nsuch as <a href=\"$MDN_URL$/Web/API/Element\" ><code>elements</code></a>, <a href=\"$MDN_URL$/Web/API/Text\" ><code>text</code></a> and <a href=\"$MDN_URL$/Web/API/Comment\" ><code>comments</code></a>."
|
||
},
|
||
"node.nodevalue": {
|
||
"url": "$MDN_URL$/web/api/node/nodevalue",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>nodeValue</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface returns or sets the value of the current node."
|
||
},
|
||
"node.normalize": {
|
||
"url": "$MDN_URL$/web/api/node/normalize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>normalize()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface puts the specified node\nand all of its sub-tree into a <em>normalized</em> form.\nIn a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.",
|
||
"returns": "None."
|
||
},
|
||
"node.ownerdocument": {
|
||
"url": "$MDN_URL$/web/api/node/ownerdocument",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "9",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>ownerDocument</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the top-level document object of the node."
|
||
},
|
||
"node.parentelement": {
|
||
"url": "$MDN_URL$/web/api/node/parentelement",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "9",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>parentElement</code></strong> property of <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the DOM node's parent <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, or <code>null</code> if the node either has no\nparent, or its parent isn't a DOM <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>."
|
||
},
|
||
"node.parentnode": {
|
||
"url": "$MDN_URL$/web/api/node/parentnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>parentNode</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the parent of the specified node in the DOM tree.\n<p><code>Document</code> and <code>DocumentFragment</code> <a href=\"$MDN_URL$/Web/API/Node/nodeType\">nodes</a> can never have a parent, so\n<code>parentNode</code> will always return <code>null</code>.\nIt also returns <code>null</code> if the node has just been created\nand is not yet attached to the tree."
|
||
},
|
||
"node.previoussibling": {
|
||
"url": "$MDN_URL$/web/api/node/previoussibling",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>previousSibling</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nreturns the node immediately preceding the specified one in its parent's\n<a href=\"$MDN_URL$/Web/API/Node/childNodes\" ><code>childNodes</code></a> list,\nor <code>null</code> if the specified node is the first in that list.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Browsers insert text nodes into a document to represent whitespace in the source markup.\nTherefore a node obtained, for example, using <a href=\"$MDN_URL$/Web/API/Node/firstChild\"><code>Node.firstChild</code></a>\nor <code>Node.previousSibling</code>\nmay refer to a whitespace text node rather than the actual element the author intended to get.\n<p>See <a href=\"$MDN_URL$/Web/API/Document_Object_Model/Whitespace\">Whitespace in the DOM</a> for more information.\n<p>You can use <a href=\"$MDN_URL$/Web/API/Element/previousElementSibling\"><code>previousElementSibling</code></a>\nto get the previous element node (skipping text nodes and any other non-element nodes).\n<p>To navigate the opposite way through the child nodes list use <a href=\"$MDN_URL$/Web/API/Node/nextSibling\">Node.nextSibling</a>.\n</div>"
|
||
},
|
||
"node.removechild": {
|
||
"url": "$MDN_URL$/web/api/node/removechild",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>removeChild()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface\nremoves a child node from the DOM and returns the removed node.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> As long as a reference is kept on the removed child,\nit still exists in memory, but is no longer part of the DOM.\nIt can still be reused later in the code.\n<p>If the return value of <code>removeChild()</code> is not stored, and no other reference is kept,\nit will be <a href=\"$MDN_URL$/Web/JavaScript/Memory_management\">automatically deleted</a> from memory after a short time.\n</div>\n<p>Unlike <a href=\"$MDN_URL$/Web/API/Node/cloneNode\"><code>Node.cloneNode()</code></a> the return value preserves the <code>EventListener</code> objects associated with it.",
|
||
"parameters": {
|
||
"child": "A <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> that is the child node to be removed from the DOM."
|
||
}
|
||
},
|
||
"node.replacechild": {
|
||
"url": "$MDN_URL$/web/api/node/replacechild",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "7",
|
||
"Safari": "1.1",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>replaceChild()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> interface replaces a child node within the given (parent) node.",
|
||
"parameters": {
|
||
"newChild": "The new node to replace <code>oldChild</code>. <div class=\"notecard warning\" id=\"sect1\"> <p><strong>Warning:</strong> If the new node is already present somewhere else in the DOM, it is first removed from that position. </div>",
|
||
"oldChild": "The child to be replaced."
|
||
},
|
||
"returns": "The replaced <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a>. This is the same node as <code>oldChild</code>.",
|
||
"throws": {
|
||
"HierarchyRequestError DOMException": "Thrown when the constraints of the DOM tree are violated, that is if one of the following cases occurs: <ul> <li>If the parent of <code>oldChild</code> is not a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>, <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, or an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>.</li> <li>If the replacement of <code>oldChild</code> by <code>newChild</code> would lead to a cycle, that is if <code>newChild</code> is an ancestor of the node.</li> <li>If <code>newChild</code> is not a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a>, a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a>, an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, or a <a href=\"$MDN_URL$/Web/API/CharacterData\"><code>CharacterData</code></a>.</li> <li>If the current node is a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a>, and its parent is a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>.</li> <li>If the current node is a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a> and its parent is <em>not</em> a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a>, as a <em>doctype</em> should always be a direct descendant of a <em>document</em>.</li> <li>If the parent of the node is a <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> and <code>newChild</code> is a <a href=\"$MDN_URL$/Web/API/DocumentFragment\"><code>DocumentFragment</code></a> with more than one <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> child, or that has a <a href=\"$MDN_URL$/Web/API/Text\"><code>Text</code></a> child.</li> <li>If the replacement of <code>oldChild</code> by <code>newChild</code> would lead to <a href=\"$MDN_URL$/Web/API/Document\"><code>Document</code></a> with more than one <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> as child.</li> <li>If the replacement of <code>oldChild</code> by <code>newChild</code> would lead to the presence of an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> node before a <a href=\"$MDN_URL$/Web/API/DocumentType\"><code>DocumentType</code></a> node.</li> </ul>",
|
||
"NotFoundError DOMException": "Thrown if the parent of <code>oldChild</code> is not the current node."
|
||
}
|
||
},
|
||
"node.textcontent": {
|
||
"url": "$MDN_URL$/web/api/node/textcontent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>textContent</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a>\ninterface represents the text content of the node and its descendants.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> <code>textContent</code> and <a href=\"$MDN_URL$/Web/API/HTMLElement/innerText\"><code>HTMLElement.innerText</code></a> are easily confused,\nbut the two properties are <a href=\"#differences_from_innertext\">different in important ways</a>.\n</div>"
|
||
},
|
||
"nodeiterator": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator</code></strong> interface represents an iterator to traverse nodes of a DOM subtree in document order."
|
||
},
|
||
"nodeiterator.detach": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/detach",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>NodeIterator.detach()</code></strong> method is a no-op, kept for\nbackward compatibility only.\n<p>Originally, it detached the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a> from the set over which it\niterates, releasing any resources used by the set and setting the iterator's state to\n<code>INVALID</code>. Once this method had been called, calls to other methods on\n<code>NodeIterator</code> would raise the <code>INVALID_STATE_ERR</code> exception.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"nodeiterator.filter": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/filter",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.filter</code></strong> read-only property returns a\n<code>NodeFilter</code> object, that is an object which implements an\n<code>acceptNode(node)</code> method, used to screen nodes.\n<p>When creating the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a>, the filter object is passed in as the\nthird parameter, and the object method <code>acceptNode(node)</code> is\ncalled on every single node to determine whether or not to accept it. This function\nshould return the constant <code>NodeFilter.FILTER_ACCEPT</code> for cases when the\nnode should be accepted and <code>NodeFilter.FILTER_REJECT</code> for cases when the\nnode should be rejected."
|
||
},
|
||
"nodeiterator.nextnode": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/nextnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.nextNode()</code></strong> method returns the next node\nin the set represented by the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a> and advances the position of\nthe iterator within the set. The first call to <code>nextNode()</code> returns the\nfirst node in the set.\n<p>This method returns <code>null</code> when there are no nodes left in the set.\n<p>In old browsers, as specified in old versions of the specifications, the method may\nthrows the <code>INVALID_STATE_ERR</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> if this method\nis called after the <a href=\"$MDN_URL$/Web/API/NodeIterator/detach\"><code>NodeIterator.detach()</code></a>method. Recent browsers never\nthrow.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> representing the node after the current node in the set represented by this <code>NodeIterator</code>, or <code>null</code> if the current node is the last node in the set."
|
||
},
|
||
"nodeiterator.pointerbeforereferencenode": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/pointerbeforereferencenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "17",
|
||
"Firefox": "3.5",
|
||
"Opera": "15",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.pointerBeforeReferenceNode</code></strong> read-only\nproperty returns a boolean flag that indicates whether the\n<code>NodeFilter</code> is anchored before (if this value is <code>true</code>) or\nafter (if this value is <code>false</code>) the anchor node indicated by the\n<a href=\"$MDN_URL$/Web/API/NodeIterator/referenceNode\"><code>NodeIterator.referenceNode</code></a> property."
|
||
},
|
||
"nodeiterator.previousnode": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/previousnode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.previousNode()</code></strong> method returns the\nprevious node in the set represented by the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a> and moves the\nposition of the iterator backwards within the set.\n<p>This method returns <code>null</code> when the current node is the first node in the\nset.\n<p>In old browsers, as specified in old versions of the specifications, the method may\nthrows the <code>INVALID_STATE_ERR</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a> if this method\nis called after the <a href=\"$MDN_URL$/Web/API/NodeIterator/detach\"><code>NodeIterator.detach()</code></a>method. Recent browsers never\nthrow.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> representing the node before the current node in the set represented by this <code>NodeIterator</code>, or <code>null</code> if the current node is the first node in the set."
|
||
},
|
||
"nodeiterator.referencenode": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/referencenode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "17",
|
||
"Firefox": "3.5",
|
||
"Opera": "15",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.referenceNode</code></strong> read-only property returns the\n<a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> to which the iterator is anchored; as new nodes are inserted, the\niterator remains anchored to the reference node as specified by this property."
|
||
},
|
||
"nodeiterator.root": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/root",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.root</code></strong> read-only property represents the\n<a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> that is the root of what the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a>\ntraverses."
|
||
},
|
||
"nodeiterator.whattoshow": {
|
||
"url": "$MDN_URL$/web/api/nodeiterator/whattoshow",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "9",
|
||
"Safari": "3",
|
||
"SafariIOS": "3"
|
||
},
|
||
"doc": "The <strong><code>NodeIterator.whatToShow</code></strong> read-only property represents\nan <code>unsigned integer</code> representing a bitmask signifying what types of nodes\nshould be returned by the <a href=\"$MDN_URL$/Web/API/NodeIterator\"><code>NodeIterator</code></a>."
|
||
},
|
||
"nodelist": {
|
||
"url": "$MDN_URL$/web/api/nodelist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "8",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<strong><code>NodeList</code></strong> objects are collections of <a href=\"$MDN_URL$/Web/API/Node\">nodes</a>, usually returned by properties such as <a href=\"$MDN_URL$/Web/API/Node/childNodes\"><code>Node.childNodes</code></a> and methods such as <a href=\"$MDN_URL$/Web/API/Document/querySelectorAll\"><code>document.querySelectorAll()</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> Although <code>NodeList</code> is not an <code>Array</code>, it is possible to iterate over it with <code>forEach()</code>. It can also be converted to a real <code>Array</code> using <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array/from\"><code>Array.from()</code></a>.\n</div>"
|
||
},
|
||
"nodelist.@@iterator": {
|
||
"url": "$MDN_URL$/web/javascript/reference/global_objects/array/@@iterator",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "38",
|
||
"ChromeAndroid": "38",
|
||
"Edge": "",
|
||
"Firefox": "36",
|
||
"Opera": "25",
|
||
"Safari": "10",
|
||
"SafariIOS": "10",
|
||
"Nodejs": "0.12.0",
|
||
"Deno": ""
|
||
},
|
||
"doc": "The <strong><code>[@@iterator]()</code></strong> method of <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> instances implements the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\">iterable protocol</a> and allows arrays to be consumed by most syntaxes expecting iterables, such as the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Operators/Spread_syntax\">spread syntax</a> and <a href=\"$MDN_URL$/Web/JavaScript/Reference/Statements/for...of\"><code>for...of</code></a> loops. It returns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Iterator\">array iterator object</a> that yields the value of each index in the array.\n<p>The initial value of this property is the same function object as the initial value of the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array/values\"><code>Array.prototype.values</code></a> property.",
|
||
"returns": "The same return value as <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array/values\"><code>Array.prototype.values()</code></a>: a new <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Iterator\">iterable iterator object</a> that yields the value of each index in the array."
|
||
},
|
||
"nodelist.entries": {
|
||
"url": "$MDN_URL$/web/api/nodelist/entries",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "16",
|
||
"Firefox": "50",
|
||
"Opera": "38",
|
||
"Safari": "10",
|
||
"SafariIOS": "10"
|
||
},
|
||
"doc": "The <strong><code>NodeList.entries()</code></strong> method returns an\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a> allowing to go through all key/value pairs\ncontained in this object. The values are <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> objects.",
|
||
"returns": "Returns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a>."
|
||
},
|
||
"nodelist.foreach": {
|
||
"url": "$MDN_URL$/web/api/nodelist/foreach",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "16",
|
||
"Firefox": "50",
|
||
"Opera": "38",
|
||
"Safari": "10",
|
||
"SafariIOS": "10"
|
||
},
|
||
"doc": "The <strong><code>forEach()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a>\ninterface calls the callback given in parameter once for each value pair in the list, in\ninsertion order.",
|
||
"parameters": {
|
||
"callback": "A function to execute on each element of <code>someNodeList</code>. It accepts 3 parameters: <dl> <dt id=\"currentvalue\"><a href=\"#currentvalue\"><code>currentValue</code></a></dt> <dd> <p>The current element being processed in <code>someNodeList</code>. </dd> <dt id=\"currentindex\"><a href=\"#currentindex\"><code>currentIndex</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The index of the <code>currentValue</code> being processed in <code>someNodeList</code>. </dd> <dt id=\"listobj\"><a href=\"#listobj\"><code>listObj</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The <code>someNodeList</code> that <code>forEach()</code> is being applied to. </dd> </dl>",
|
||
"thisArg": "Value to use as <a href=\"$MDN_URL$/Web/JavaScript/Reference/Operators/this\"><code>this</code></a> when executing <code>callback</code>."
|
||
},
|
||
"returns": "<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>."
|
||
},
|
||
"nodelist.item": {
|
||
"url": "$MDN_URL$/web/api/nodelist/item",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "Returns a node from a <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a> by index. This method\ndoesn't throw exceptions as long as you provide arguments. A value of <code>null</code>\nis returned if the index is out of range, and a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/TypeError\"><code>TypeError</code></a> is thrown if no\nargument is provided.",
|
||
"returns": "The <code>index</code>th node in the <code>nodeList</code> returned by the <code>item</code> method.",
|
||
"throws": {
|
||
"TypeError": "Thrown if no argument is provided."
|
||
}
|
||
},
|
||
"nodelist.keys": {
|
||
"url": "$MDN_URL$/web/api/nodelist/keys",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "16",
|
||
"Firefox": "50",
|
||
"Opera": "38",
|
||
"Safari": "10",
|
||
"SafariIOS": "10"
|
||
},
|
||
"doc": "The <strong><code>NodeList.keys()</code></strong> method returns an\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a> allowing to go through all keys contained\nin this object. The keys are <code>unsigned integer</code>.",
|
||
"returns": "Returns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a>."
|
||
},
|
||
"nodelist.length": {
|
||
"url": "$MDN_URL$/web/api/nodelist/length",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>NodeList.length</code></strong> property returns the number of items\nin a <a href=\"$MDN_URL$/Web/API/NodeList\"><code>NodeList</code></a>."
|
||
},
|
||
"nodelist.values": {
|
||
"url": "$MDN_URL$/web/api/nodelist/values",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "16",
|
||
"Firefox": "50",
|
||
"Opera": "38",
|
||
"Safari": "10",
|
||
"SafariIOS": "10"
|
||
},
|
||
"doc": "The <strong><code>NodeList.values()</code></strong> method returns an\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a> allowing to go through all values contained\nin this object. The values are <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> objects.",
|
||
"returns": "Returns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Iteration_protocols\"><code>iterator</code></a>."
|
||
},
|
||
"notification": {
|
||
"url": "$MDN_URL$/web/api/notification",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"Edge": "14",
|
||
"Firefox": "22",
|
||
"Opera": "23",
|
||
"Safari": "7",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Notification</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Notifications_API\">Notifications API</a> is used to configure and display desktop notifications to the user.\n<p>These notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.actions": {
|
||
"url": "$MDN_URL$/web/api/notification/actions",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "18",
|
||
"Opera": "39"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>actions</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface provides the actions available for users to choose from for interacting with the notification.\n<p>The actions are set using the <code>actions</code> option of the second argument for the <a href=\"$MDN_URL$/Web/API/ServiceWorkerRegistration/showNotification\"><code>showNotification()</code></a> method and <a href=\"$MDN_URL$/Web/API/Notification/Notification\"><code>Notification()</code></a> constructor.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> Browsers typically limit the maximum number of actions they will display for a particular notification. Check the static <a href=\"$MDN_URL$/Web/API/Notification/maxActions_static\" ><code>Notification.maxActions</code></a> property to determine the limit.\n</div><div class=\"notecard note\" id=\"sect4\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.badge": {
|
||
"url": "$MDN_URL$/web/api/notification/badge",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "18",
|
||
"Opera": "39",
|
||
"Safari": "17",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>badge</code></strong> property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a>\ninterface returns a string containing the URL of an image to represent the notification when there is not enough space to display the notification itself such as for example, the Android Notification Bar. On Android devices, the badge should accommodate devices up to 4x resolution, about 96 by 96 px, and the image will be automatically masked.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.body": {
|
||
"url": "$MDN_URL$/web/api/notification/body",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "33",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "11",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>body</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface indicates the body string of the notification, as\nspecified in the <code>body</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.close": {
|
||
"url": "$MDN_URL$/web/api/notification/close",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "22",
|
||
"Opera": "23",
|
||
"Safari": "7",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>close()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface is used to\nclose/remove a previously displayed notification.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This API shouldn't be used just to have the notification\nremoved from the screen after a fixed delay since this method will also remove the\nnotification from any notification tray, preventing users from interacting with it\nafter it was initially shown. A valid use for this API would be to remove a\nnotification that is no longer relevant (e.g. the user already read the notification\non the webpage in the case of a messaging app or the following song is already playing\nin a music app).\n</div><div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"notification.data": {
|
||
"url": "$MDN_URL$/web/api/notification/data",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "44",
|
||
"ChromeAndroid": "44",
|
||
"Edge": "16",
|
||
"Firefox": "34",
|
||
"Opera": "31",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>data</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface returns a structured clone of the notification's\ndata, as specified in the <code>data</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.\n<p>The notification's data can be any arbitrary data that you want associated with the\nnotification.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.dir": {
|
||
"url": "$MDN_URL$/web/api/notification/dir",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "7",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>dir</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface indicates the text direction of the notification, as specified in the <code>dir</code> option of the <a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.icon": {
|
||
"url": "$MDN_URL$/web/api/notification/icon",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "33",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "11",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>icon</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface contains the URL of an icon to be displayed as\npart of the notification, as specified in the <code>icon</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.image": {
|
||
"url": "$MDN_URL$/web/api/notification/image",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "56",
|
||
"ChromeAndroid": "56",
|
||
"Edge": "18",
|
||
"Opera": "43"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>image</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface contains the URL of an image to be displayed as\npart of the notification, as specified in the <code>image</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.lang": {
|
||
"url": "$MDN_URL$/web/api/notification/lang",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "33",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "11",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>lang</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface indicates the language used in the notification,\nas specified in the <code>lang</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.\n<p>The language itself is specified using a string representing a language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>.\nSee the Sitepoint <a href=\"https://www.sitepoint.com/iso-2-letter-language-codes/\" class=\"external\" target=\"_blank\">ISO 2 letter language codes</a> page for a simple reference.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.maxactions": {
|
||
"url": "$MDN_URL$/web/api/notification/maxactions_static",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "48",
|
||
"ChromeAndroid": "48",
|
||
"Edge": "18",
|
||
"Opera": "35"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>maxActions</code></strong> read-only static property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface returns the maximum number of actions supported by\nthe device and the User Agent. Effectively, this is the maximum number of elements in\n<a href=\"$MDN_URL$/Web/API/Notification/actions\"><code>Notification.actions</code></a> array which will be respected by the User Agent.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.notification": {
|
||
"url": "$MDN_URL$/web/api/notification/notification",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"Edge": "14",
|
||
"Firefox": "22",
|
||
"Opera": "23",
|
||
"Safari": "7",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Notification()</code></strong> constructor creates a new\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> object instance, which represents a user notification.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>",
|
||
"parameters": {
|
||
"title": "Defines a title for the notification, which is shown at the top of the notification window.",
|
||
"options": "An options object containing any custom settings that you want to apply to the notification. The possible options are: <dl> <dt id=\"dir\"><a href=\"#dir\"><code>dir</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The direction in which to display the notification. It defaults to <code>auto</code>, which just adopts the browser's language setting behavior, but you can override that behavior by setting values of <code>ltr</code> and <code>rtl</code> (although most browsers seem to ignore these settings.) </dd> <dt id=\"lang\"><a href=\"#lang\"><code>lang</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The notification's language, as specified using a string representing a language tag according to <a href=\"https://datatracker.ietf.org/doc/html/rfc5646\" class=\"external\" target=\"_blank\">RFC 5646: Tags for Identifying Languages (also known as BCP 47)</a>. See the Sitepoint <a href=\"https://www.sitepoint.com/iso-2-letter-language-codes/\" class=\"external\" target=\"_blank\">ISO 2 letter language codes</a> page for a simple reference. The default is the empty string. </dd> <dt id=\"badge\"><a href=\"#badge\"><code>badge</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string containing the URL of the image used to represent the notification when there isn't enough space to display the notification itself. </dd> <dt id=\"body\"><a href=\"#body\"><code>body</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing the body text of the notification, which is displayed below the title. The default is the empty string. </dd> <dt id=\"tag\"><a href=\"#tag\"><code>tag</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string representing an identifying tag for the notification. The default is the empty string. </dd> <dt id=\"icon\"><a href=\"#icon\"><code>icon</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string containing the URL of an icon to be displayed in the notification. </dd> <dt id=\"image\"><a href=\"#image\"><code>image</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>a string containing the URL of an image to be displayed in the notification. </dd> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Arbitrary data that you want associated with the notification. This can be of any data type. The default is <code>null</code>. </dd> <dt id=\"vibrate\"><a href=\"#vibrate\"><code>vibrate</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/Vibration_API#vibration_patterns\">vibration pattern</a> for the device's vibration hardware to emit with the notification. If specified, <code>silent</code> must not be <code>true</code>. </dd> <dt id=\"timestamp\"><a href=\"#timestamp\"><code>timestamp</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number representing the time at which a notification is created or applicable (past, present, or future). </dd> <dt id=\"renotify\"><a href=\"#renotify\"><code>renotify</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value specifying whether the user should be notified after a new notification replaces an old one. The default is <code>false</code>, which means they won't be notified. If <code>true</code>, then <code>tag</code> also must be set. </dd> <dt id=\"requireinteraction\"><a href=\"#requireinteraction\"><code>requireInteraction</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Indicates that a notification should remain active until the user clicks or dismisses it, rather than closing automatically. The default value is <code>false</code>. </dd> <dt id=\"actions\"><a href=\"#actions\"><code>actions</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of actions to display in the notification, for which the default is an empty array. Each element in the array can be an object with the following members: <dl> <dt id=\"action\"><a href=\"#action\"><code>action</code></a></dt> <dd> <p>A string identifying a user action to be displayed on the notification. </dd> <dt id=\"title_2\"><a href=\"#title_2\"><code>title</code></a></dt> <dd> <p>A string containing action text to be shown to the user. </dd> <dt id=\"icon_2\"><a href=\"#icon_2\"><code>icon</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string containing the URL of an icon to display with the action. </dd> </dl> <p>Appropriate responses are built using <code>event.action</code> within the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope/notificationclick_event\" ><code>notificationclick</code></a> event. </dd> <dt id=\"silent\"><a href=\"#silent\"><code>silent</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value specifying whether the notification is silent (no sounds or vibrations issued), regardless of the device settings. The default is <code>null</code>. If <code>true</code>, then <code>vibrate</code> must not be present. </dd> </dl>"
|
||
},
|
||
"returns": "An instance of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> object.",
|
||
"throws": {
|
||
"TypeError": "Thrown if: <ul> <li>The constructor is called within the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope\"><code>ServiceWorkerGlobalScope</code></a>.</li> <li>The <code>actions</code> option is specified and is not empty.</li> <li>The <code>silent</code> option is <code>true</code> and the <code>vibrate</code> option is specified.</li> <li>The <code>renotify</code> option is <code>true</code> but the <code>tag</code> option is empty.</li> </ul>",
|
||
"DataCloneError DOMException": "Thrown if serializing the <code>data</code> option failed for some reason."
|
||
}
|
||
},
|
||
"notification.permission": {
|
||
"url": "$MDN_URL$/web/api/notification/permission_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "32",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "22",
|
||
"Opera": "23",
|
||
"Safari": "7",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>permission</code></strong> read-only static property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a>\ninterface indicates the current permission granted by the user for the current origin to\ndisplay web notifications.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.renotify": {
|
||
"url": "$MDN_URL$/web/api/notification/renotify",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "79",
|
||
"Opera": "37"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>renotify</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface specifies whether the user should be notified\nafter a new notification replaces an old one, as specified in the <code>renotify</code>\noption of the <a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.requestpermission": {
|
||
"url": "$MDN_URL$/web/api/notification/requestpermission_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "22",
|
||
"Opera": "23",
|
||
"Safari": "15",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>requestPermission()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface requests permission from the user for the current origin to display notifications.",
|
||
"parameters": {
|
||
"callback": "An optional callback function that is called with the permission value. Deprecated in favor of the promise return value."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a string with the permission picked by the user. Possible values for this string are:\n<dl>\n <dt id=\"granted\"><a href=\"#granted\"><code>granted</code></a></dt>\n <dd>\n <p>The user has explicitly granted permission for the current origin to display system notifications.\n </dd>\n <dt id=\"denied\"><a href=\"#denied\"><code>denied</code></a></dt>\n <dd>\n <p>The user has explicitly denied permission for the current origin to display system notifications.\n </dd>\n <dt id=\"default\"><a href=\"#default\"><code>default</code></a></dt>\n <dd>\n <p>The user decision is unknown; in this case the application will act as if permission was <code>denied</code>.\n </dd>\n</dl>"
|
||
},
|
||
"notification.requireinteraction": {
|
||
"url": "$MDN_URL$/web/api/notification/requireinteraction",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "17",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>requireInteraction</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface returns a boolean value indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This can be set when the notification is first created by setting the <code>requireInteraction</code> option to <code>true</code> in the options object of the <a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.\n</div><div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.silent": {
|
||
"url": "$MDN_URL$/web/api/notification/silent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "17",
|
||
"Opera": "30",
|
||
"Safari": "16.6",
|
||
"SafariIOS": "16.6"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>silent</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface specifies whether the notification should be\nsilent, i.e., no sounds or vibrations should be issued, regardless of the device\nsettings. This is specified in the <code>silent</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.tag": {
|
||
"url": "$MDN_URL$/web/api/notification/tag",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "7"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>tag</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface signifies an identifying tag for the notification,\nas specified in the <code>tag</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.\n<p>The idea of notification tags is that more than one notification can share the same\ntag, linking them together. One notification can then be programmatically replaced with\nanother to avoid the users' screen being filled up with a huge number of similar\nnotifications.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.timestamp": {
|
||
"url": "$MDN_URL$/web/api/notification/timestamp",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Opera": "37"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>timestamp</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface returns a number, as\nspecified in the <code>timestamp</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.\n<p>The notification's timestamp can represent the time, in milliseconds since 00:00:00 UTC\non 1 January 1970, of the event for which the notification was created, or it can be an\narbitrary timestamp that you want associated with the notification. For example, a\ntimestamp for an upcoming meeting could be set in the future, whereas a timestamp for a\nmissed message could be set in the past.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.title": {
|
||
"url": "$MDN_URL$/web/api/notification/title",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "33",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "14",
|
||
"Firefox": "26",
|
||
"Opera": "23",
|
||
"Safari": "11",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>title</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> interface indicates the title of the notification, as\nspecified in the <code>title</code> parameter of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notification.vibrate": {
|
||
"url": "$MDN_URL$/web/api/notification/vibrate",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "53",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "79",
|
||
"Opera": "40"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>vibrate</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a>\ninterface specifies a <a href=\"$MDN_URL$/Web/API/Vibration_API#vibration_patterns\">vibration pattern</a>\nfor the device's vibration hardware to emit when the notification fires. This is\nspecified in the <code>vibrate</code> option of the\n<a href=\"$MDN_URL$/Web/API/Notification/Notification\" ><code>Notification()</code></a> constructor.<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"notificationevent": {
|
||
"url": "$MDN_URL$/web/api/notificationevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>NotificationEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Notifications_API\">Notifications API</a> represents a notification event dispatched on the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope\"><code>ServiceWorkerGlobalScope</code></a> of a <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a>.\n<p>This interface inherits from the <a href=\"$MDN_URL$/Web/API/ExtendableEvent\"><code>ExtendableEvent</code></a> interface.\n<blockquote>\n<p><strong>Note</strong>: Only persistent notification events, fired at the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope\"><code>ServiceWorkerGlobalScope</code></a> object, implement the <code>NotificationEvent</code> interface. Non-persistent notification events, fired at the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> object, implement the <code>Event</code> interface.\n</blockquote>"
|
||
},
|
||
"notificationevent.action": {
|
||
"url": "$MDN_URL$/web/api/notificationevent/action",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "48",
|
||
"ChromeAndroid": "48",
|
||
"Edge": "17",
|
||
"Firefox": "44"
|
||
},
|
||
"doc": "The <strong><code>action</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NotificationEvent\"><code>NotificationEvent</code></a> interface returns the string ID of the notification button the user clicked. This value returns an empty string if the user clicked the notification somewhere other than an action button, or the notification does not have a button. The notification id is set during the creation of the Notification via the actions array attribute and can't be modified unless the notification is replaced."
|
||
},
|
||
"notificationevent.notification": {
|
||
"url": "$MDN_URL$/web/api/notificationevent/notification",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37"
|
||
},
|
||
"doc": "The <strong><code>notification</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/NotificationEvent\"><code>NotificationEvent</code></a> interface returns the instance of the <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> that was clicked to fire the event. The <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> provides read-only access to many properties that were set at the instantiation time of the Notification such as <code>tag</code> and <code>data</code> attributes that allow you to store information for deferred use in the <code>notificationclick</code> event."
|
||
},
|
||
"notificationevent.notificationevent": {
|
||
"url": "$MDN_URL$/web/api/notificationevent/notificationevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>NotificationEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/NotificationEvent\"><code>NotificationEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>notificationclick</code> or <code>notificationclose</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/ExtendableEvent/ExtendableEvent\" ><code>ExtendableEvent()</code></a></em>, can have the following properties: <dl> <dt id=\"notification\"><a href=\"#notification\"><code>notification</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/Notification\"><code>Notification</code></a> object to be used as the notification the event is dispatched on. </dd> <dt id=\"action\"><a href=\"#action\"><code>action</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An action associated with the notification. It defaults to <code>\"\"</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/NotificationEvent\"><code>NotificationEvent()</code></a> object."
|
||
},
|
||
"offlineaudiocompletionevent": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocompletionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> <code>OfflineAudioCompletionEvent</code> interface represents events that occur when the processing of an <a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> is terminated. The <a href=\"$MDN_URL$/Web/API/OfflineAudioContext/complete_event\" ><code>complete</code></a> event uses this interface.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This interface is marked as deprecated; it is still supported for legacy reasons, but it will soon be superseded when the promise version of <a href=\"$MDN_URL$/Web/API/OfflineAudioContext/startRendering\"><code>OfflineAudioContext.startRendering</code></a> is supported in browsers, which will no longer need it.\n</div>"
|
||
},
|
||
"offlineaudiocompletionevent.offlineaudiocompletionevent": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocompletionevent/offlineaudiocompletionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "44",
|
||
"Safari": "14",
|
||
"SafariIOS": "14"
|
||
},
|
||
"doc": "The <strong><code>OfflineAudioCompletionEvent()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> creates a new\n<a href=\"$MDN_URL$/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a> object.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> You wouldn't generally use the constructor manually.\n<code>OfflineAudioCompletionEvent</code> events are dispatched to\n<a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> instances for legacy reasons.\n</div>",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>complete</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"renderedbuffer\"><a href=\"#renderedbuffer\"><code>renderedBuffer</code></a></dt> <dd> <p>The rendered <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> containing the audio data. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a> object."
|
||
},
|
||
"offlineaudiocompletionevent.renderedbuffer": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocompletionevent/renderedbuffer",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>renderedBuffer</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a> interface is an <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a>\ncontaining the result of processing an <a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a>."
|
||
},
|
||
"offlineaudiocontext": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "22",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <code>OfflineAudioContext</code> interface is an <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a> interface representing an audio-processing graph built from linked together <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a>s. In contrast with a standard <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a>, an <code>OfflineAudioContext</code> doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a>."
|
||
},
|
||
"offlineaudiocontext.length": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext/length",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "14",
|
||
"Firefox": "49",
|
||
"Opera": "38",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>length</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> interface returns an integer representing the size of\nthe buffer in sample-frames."
|
||
},
|
||
"offlineaudiocontext.offlineaudiocontext": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext/offlineaudiocontext",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "35",
|
||
"ChromeAndroid": "35",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "22",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The\n<strong><code>OfflineAudioContext()</code></strong> constructor—part of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a>—creates and returns a new\n<a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> object instance, which can then be used to render\naudio to an <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> rather than to an audio output device.",
|
||
"parameters": {
|
||
"numberOfChannels": "An integer specifying the number of channels the resulting <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> should have.",
|
||
"length": "An integer specifying the size of the buffer to create for the audio context, in sample-frames, where one sample-frame is a unit that can contain a single sample of audio data for every channel in the audio data. For example, a 5-second buffer with a <code>sampleRate</code> of 48000Hz would have a length of <code>5 * 48000 = 240000</code> sample-frames.",
|
||
"sampleRate": "The sample-rate of the linear audio data in sample-frames per second. All user agents are required to support a range of 8000Hz to 96000Hz, and may support a wider range than that. The most commonly-used rate is 44100Hz, which is the sample rate used by CD audio."
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> object whose associated\n <code>AudioBuffer</code> is configured as requested.\n<p>Like a regular <code>AudioContext</code>, an\n <code>OfflineAudioContext</code> can be the target of events, therefore it implements\n the <a href=\"$MDN_URL$/Web/API/EventTarget\"><code>EventTarget</code></a> interface."
|
||
},
|
||
"offlineaudiocontext.resume": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext/resume",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "41",
|
||
"ChromeAndroid": "41",
|
||
"Edge": "14",
|
||
"Firefox": "40",
|
||
"Opera": "28",
|
||
"Safari": "9",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "The <strong><code>resume()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> interface resumes the progression of time in an audio\ncontext that has been suspended. The promise resolves immediately because the\n<code>OfflineAudioContext</code> does not require the audio hardware.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> resolving to <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Returned if the context is not currently suspended or the rendering has not started."
|
||
}
|
||
},
|
||
"offlineaudiocontext.startrendering": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext/startrendering",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "25",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "7",
|
||
"SafariIOS": "7"
|
||
},
|
||
"doc": "The <code>startRendering()</code> method of the <a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> Interface starts rendering the audio graph, taking into account the current connections and the current scheduled changes.\n<p>The <a href=\"$MDN_URL$/Web/API/OfflineAudioContext/complete_event\" ><code>complete</code></a> event (of type <a href=\"$MDN_URL$/Web/API/OfflineAudioCompletionEvent\"><code>OfflineAudioCompletionEvent</code></a>) is raised when the rendering is finished, containing the resulting <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a> in its <code>renderedBuffer</code> property.\n<p>Browsers currently support two versions of the <code>startRendering()</code> method — an older event-based version and a newer promise-based version.\nThe former will eventually be removed, but currently both mechanisms are provided for legacy reasons.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that fulfills with an <a href=\"$MDN_URL$/Web/API/AudioBuffer\"><code>AudioBuffer</code></a>."
|
||
},
|
||
"offlineaudiocontext.suspend": {
|
||
"url": "$MDN_URL$/web/api/offlineaudiocontext/suspend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "41",
|
||
"ChromeAndroid": "41",
|
||
"Edge": "14",
|
||
"Opera": "28",
|
||
"Safari": "9",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "The <strong><code>suspend()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/OfflineAudioContext\"><code>OfflineAudioContext</code></a> interface schedules a suspension of the time\nprogression in the audio context at the specified time and returns a promise. This is\ngenerally useful at the time of manipulating the audio graph synchronously on\nOfflineAudioContext.\n<p>Note that the maximum precision of suspension is the size of the render quantum and the\nspecified suspension time will be rounded down to the nearest render quantum boundary.\nFor this reason, it is not allowed to schedule multiple suspends at the same quantized\nframe. Also scheduling should be done while the context is not running to ensure the\nprecise suspension.",
|
||
"parameters": {
|
||
"suspendTime": "A floating-point number specifying the suspend time, in seconds."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> resolving to <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Returned if the quantized frame number is one of the following: <ul> <li>a negative number</li> <li>less than or equal to the current time</li> <li>greater than or equal to the total render duration</li> <li>scheduled by another suspend for the same time</li> </ul>"
|
||
}
|
||
},
|
||
"offscreencanvas": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "When using the <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element or the <a href=\"$MDN_URL$/Web/API/Canvas_API\">Canvas API</a>, rendering, animation, and user interaction usually happen on the main execution thread of a web application.\nThe computation relating to canvas animations and rendering can have a significant impact on application performance.\n<p>The <strong><code>OffscreenCanvas</code></strong> interface provides a canvas that can be rendered off screen, decoupling the DOM and the Canvas API so that the <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element is no longer entirely dependent on the DOM.\nRendering operations can also be run inside a <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">worker</a> context, allowing you to run some tasks in a separate thread and avoid heavy work on the main thread.\n<p><code>OffscreenCanvas</code> is a <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Transferable_objects\">transferable object</a>.<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"offscreencanvas.converttoblob": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/converttoblob",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>OffscreenCanvas.convertToBlob()</code></strong> method creates a <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> object representing the image contained in the canvas.\n<p>The desired file format and image quality may be specified.\nIf the file format is not specified, or if the given format is not supported, then the data will be exported as <code>image/png</code>.\nBrowsers are required to support <code>image/png</code>; many will support additional formats including <code>image/jpeg</code> and <code>image/webp</code>.\n<p>The created image will have a resolution of 96dpi for file formats that support encoding resolution metadata.",
|
||
"parameters": {
|
||
"options": "An object with the following properties: <dl> <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt> <dd> <p>A string indicating the image format. The default type is <code>image/png</code>; this image format will be also used if the specified type is not supported. </dd> <dt id=\"quality\"><a href=\"#quality\"><code>quality</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Number\"><code>Number</code></a> between <code>0</code> and <code>1</code> indicating the image quality to be used when creating images using file formats that support lossy compression (such as <code>image/jpeg</code> or <code>image/webp</code>). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> returning a <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> object representing the image contained in the canvas.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "The <code>OffscreenCanvas</code> is not detached; in other words it still associated with the DOM and not the current worker.",
|
||
"SecurityError DOMException": "The canvas context mode is 2d and the bitmap is not origin-clean; at least some of its contents have or may have been loaded from a site other than the one from which the document itself was loaded.",
|
||
"IndexSizeError DOMException": "The canvas bitmap has no pixels (either the horizontal or vertical dimension is zero).",
|
||
"EncodingError DOMException": "The blob could not be created due to an encoding error."
|
||
}
|
||
},
|
||
"offscreencanvas.getcontext": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/getcontext",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"2d_context": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"bitmaprenderer_context": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "63",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"webgl2_context": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56"
|
||
},
|
||
"webgl_context": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56"
|
||
},
|
||
"webgpu_context": {
|
||
"Chrome": "113",
|
||
"Edge": "113",
|
||
"Opera": "99"
|
||
}
|
||
},
|
||
"doc": "The <strong><code>OffscreenCanvas.getContext()</code></strong> method returns a drawing context for an offscreen canvas, or <a href=\"$MDN_URL$/Web/JavaScript/Reference/Operators/null\"><code>null</code></a> if the context identifier is not supported.",
|
||
"parameters": {
|
||
"contextType": "A string containing the context identifier defining the drawing context associated to the canvas. Possible values are: <dl> <dt id=\"2d\"><a href=\"#2d\"><code>2d</code></a></dt> <dd> <p>Creates a <a href=\"$MDN_URL$/Web/API/OffscreenCanvasRenderingContext2D\"><code>OffscreenCanvasRenderingContext2D</code></a> object representing a two-dimensional rendering context. </dd> <dt id=\"webgl\"><a href=\"#webgl\"><code>webgl</code></a></dt> <dd> <p>Creates a <a href=\"$MDN_URL$/Web/API/WebGLRenderingContext\"><code>WebGLRenderingContext</code></a> object representing a three-dimensional rendering context. This context is only available on browsers that implement <a href=\"$MDN_URL$/Web/API/WebGL_API\">WebGL</a> version 1 (OpenGL ES 2.0). </dd> <dt id=\"webgl2\"><a href=\"#webgl2\"><code>webgl2</code></a></dt> <dd> <p>Creates a <a href=\"$MDN_URL$/Web/API/WebGL2RenderingContext\"><code>WebGL2RenderingContext</code></a> object representing a three-dimensional rendering context. This context is only available on browsers that implement <a href=\"$MDN_URL$/Web/API/WebGL_API\">WebGL</a> version 2 (OpenGL ES 3.0). </dd> <dt id=\"bitmaprenderer\"><a href=\"#bitmaprenderer\"><code>bitmaprenderer</code></a></dt> <dd> <p>Creates a <a href=\"$MDN_URL$/Web/API/ImageBitmapRenderingContext\"><code>ImageBitmapRenderingContext</code></a> which only provides functionality to replace the content of the canvas with a given <a href=\"$MDN_URL$/Web/API/ImageBitmap\"><code>ImageBitmap</code></a>. </dd> </dl> <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> The identifiers <strong><code>\"experimental-webgl\"</code></strong> or <strong><code>\"experimental-webgl2\"</code></strong> are also used in implementations of WebGL. These implementations have not reached test suite conformance, or the graphic drivers situation on the platform is not yet stable. The <a href=\"https://www.khronos.org/\" class=\"external\" target=\"_blank\">Khronos Group</a> certifies WebGL implementations under certain <a href=\"https://www.khronos.org/registry/webgl/sdk/tests/CONFORMANCE_RULES.txt\" class=\"external\" target=\"_blank\">conformance rules</a>. </div>",
|
||
"contextAttributes": "You can use several context attributes when creating your rendering context, for example: <div class=\"code-example\"><div> ```js offscreen.getContext(\"webgl\", { antialias: false, depth: false }); ``` </div></div> <p>2d context attributes: <dl> <dt id=\"alpha\"><a href=\"#alpha\"><code>alpha</code></a></dt> <dd> <p>Boolean that indicates if the canvas contains an alpha channel. If set to <code>false</code>, the browser now knows that the backdrop is always opaque, which can speed up drawing of transparent content and images then. </dd> <dt id=\"willreadfrequently\"><a href=\"#willreadfrequently\"><code>willReadFrequently</code></a> (Firefox only)</dt> <dd> <p>Boolean that indicates whether or not a lot of read-back operations are planned. This will force the use of a software (instead of hardware accelerated) 2D canvas and can save memory when calling <a href=\"$MDN_URL$/Web/API/CanvasRenderingContext2D/getImageData\" ><code>getImageData()</code></a> frequently. This option is only available, if the flag <code>gfx.canvas.willReadFrequently.enable</code> is set to <code>true</code> (which, by default, is only the case for B2G/Firefox OS). </dd> <dt id=\"storage\"><a href=\"#storage\"><code>storage</code></a> (Blink only)</dt> <dd> <p>String that indicates which storage is used (\"persistent\" by default). </dd> </dl> <p>WebGL context attributes: <dl> <dt id=\"alpha_2\"><a href=\"#alpha_2\"><code>alpha</code></a></dt> <dd> <p>Boolean that indicates if the canvas contains an alpha buffer. </dd> <dt id=\"depth\"><a href=\"#depth\"><code>depth</code></a></dt> <dd> <p>Boolean that indicates that the drawing buffer is requested to have a depth buffer of at least 16 bits. </dd> <dt id=\"stencil\"><a href=\"#stencil\"><code>stencil</code></a></dt> <dd> <p>Boolean that indicates that the drawing buffer is requested to have a stencil buffer of at least 8 bits. </dd> <dt id=\"antialias\"><a href=\"#antialias\"><code>antialias</code></a></dt> <dd> <p>Boolean that indicates whether or not to perform anti-aliasing if possible. </dd> <dt id=\"premultipliedalpha\"><a href=\"#premultipliedalpha\"><code>premultipliedAlpha</code></a></dt> <dd> <p>Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. </dd> <dt id=\"preservedrawingbuffer\"><a href=\"#preservedrawingbuffer\"><code>preserveDrawingBuffer</code></a></dt> <dd> <p>If the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author. </dd> <dt id=\"failifmajorperformancecaveat\"><a href=\"#failifmajorperformancecaveat\"><code>failIfMajorPerformanceCaveat</code></a></dt> <dd> <p>Boolean that indicates if a context will be created if the system performance is low. </dd> </dl>"
|
||
},
|
||
"returns": "A rendering context which is either a\n<ul>\n <li><a href=\"$MDN_URL$/Web/API/OffscreenCanvasRenderingContext2D\"><code>OffscreenCanvasRenderingContext2D</code></a> for <code>\"2d\"</code>,</li>\n <li><a href=\"$MDN_URL$/Web/API/WebGLRenderingContext\"><code>WebGLRenderingContext</code></a> for <code>\"webgl\"</code> and <code>\"experimental-webgl\"</code>,</li>\n <li><a href=\"$MDN_URL$/Web/API/WebGL2RenderingContext\"><code>WebGL2RenderingContext</code></a> for <code>\"webgl2\"</code> and <code>\"experimental-webgl2\"</code> <abbr class=\"icon icon-experimental\" title=\"Experimental. Expect behavior to change in the future.\">\n <span class=\"visually-hidden\">Experimental</span>\n</abbr>, or</li>\n <li><a href=\"$MDN_URL$/Web/API/ImageBitmapRenderingContext\"><code>ImageBitmapRenderingContext</code></a> for <code>\"bitmaprenderer\"</code>.</li>\n</ul>\n<p>If the <code>contextType</code> doesn't match a possible drawing context, <code>null</code> is returned."
|
||
},
|
||
"offscreencanvas.height": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>height</code></strong> property returns and sets the height of an <a href=\"$MDN_URL$/Web/API/OffscreenCanvas\"><code>OffscreenCanvas</code></a> object."
|
||
},
|
||
"offscreencanvas.offscreencanvas": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/offscreencanvas",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>OffscreenCanvas()</code></strong> constructor returns a newly instantiated <a href=\"$MDN_URL$/Web/API/OffscreenCanvas\"><code>OffscreenCanvas</code></a> object.",
|
||
"parameters": {
|
||
"width": "The width of the offscreen canvas.",
|
||
"height": "The height of the offscreen canvas."
|
||
}
|
||
},
|
||
"offscreencanvas.transfertoimagebitmap": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/transfertoimagebitmap",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>OffscreenCanvas.transferToImageBitmap()</code></strong> method creates an <a href=\"$MDN_URL$/Web/API/ImageBitmap\"><code>ImageBitmap</code></a> object from the most recently rendered image of the <code>OffscreenCanvas</code>. The <code>OffscreenCanvas</code> allocates a new image for its subsequent rendering.",
|
||
"returns": "A newly-allocated <a href=\"$MDN_URL$/Web/API/ImageBitmap\"><code>ImageBitmap</code></a>.\n<p>This <code>ImageBitmap</code> references a potentially large graphics resource, and to ensure your web application remains robust, it is important to avoid allocating too many of these resources at any point in time. For this reason it is important to ensure that the <code>ImageBitmap</code> is either <em>consumed</em> or <em>closed</em>.\n<p>As described in the <a href=\"$MDN_URL$/Web/API/OffscreenCanvas\"><code>OffscreenCanvas</code></a> examples, passing this <code>ImageBitmap</code> to <a href=\"$MDN_URL$/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap\"><code>ImageBitmapRenderingContext.transferFromImageBitmap()</code></a> <em>consumes</em> the <code>ImageBitmap</code> object; it no longer references the underlying graphics resource, and can not be passed to any other web APIs.\n<p>If your goal is to pass the <code>ImageBitmap</code> to other web APIs which do not consume it - for example, <a href=\"$MDN_URL$/Web/API/CanvasRenderingContext2D/drawImage\"><code>CanvasRenderingContext2D.drawImage()</code></a> - then you should <em>close</em> it when you're done with it by calling <a href=\"$MDN_URL$/Web/API/ImageBitmap/close\"><code>ImageBitmap.close()</code></a>. Don't simply drop the JavaScript reference to the <code>ImageBitmap</code>; doing so will keep its graphics resource alive until the next time the garbage collector runs.\n<p>If you call <code>transferToImageBitmap()</code> and don't intend to pass it to <a href=\"$MDN_URL$/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap\"><code>ImageBitmapRenderingContext.transferFromImageBitmap()</code></a>, consider whether you need to call <code>transferToImageBitmap()</code> at all. Many web APIs which accept <code>ImageBitmap</code> also accept <code>OffscreenCanvas</code> as an argument."
|
||
},
|
||
"offscreencanvas.width": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvas/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>width</code></strong> property returns and sets the width of an <a href=\"$MDN_URL$/Web/API/OffscreenCanvas\"><code>OffscreenCanvas</code></a> object."
|
||
},
|
||
"offscreencanvasrenderingcontext2d": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvasrenderingcontext2d",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "69",
|
||
"Edge": "79",
|
||
"Firefox": "105",
|
||
"Opera": "56",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>OffscreenCanvasRenderingContext2D</code></strong> interface is a <a href=\"$MDN_URL$/Web/API/CanvasRenderingContext2D\"><code>CanvasRenderingContext2D</code></a> rendering context for drawing to the bitmap of an <code>OffscreenCanvas</code> object.\nIt is similar to the <code>CanvasRenderingContext2D</code> object, with the following differences:\n<ul>\n<li>there is no support for user-interface features (<code>drawFocusIfNeeded</code>, and <code>scrollPathIntoView</code>)</li>\n<li>its <code>canvas</code> attribute refers to an <code>OffscreenCanvas</code> object rather than a <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element</li>\n<li>it has a <code>commit()</code> method for pushing rendered images to the context's <code>OffscreenCanvas</code> object's placeholder <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element</li>\n</ul>"
|
||
},
|
||
"offscreencanvasrenderingcontext2d.commit": {
|
||
"url": "$MDN_URL$/web/api/offscreencanvasrenderingcontext2d/commit",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "105",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The\n<strong><code>OffscreenCanvasRenderingContext2D.commit()</code></strong>\nmethod of the <a href=\"$MDN_URL$/Web/API/OffscreenCanvasRenderingContext2D\">Canvas 2D API</a> copies the rendering context's bitmap to the bitmap of the placeholder <a href=\"$MDN_URL$/Web/HTML/Element/canvas\"><code><canvas></code></a> element of the associated <code>OffscreenCanvas</code> object.\nThe copy operation is synchronous. Calling this method is not needed for the transfer, since it happens automatically during the event-loop execution."
|
||
},
|
||
"orientationsensor": {
|
||
"url": "$MDN_URL$/web/api/orientationsensor",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <strong><code>OrientationSensor</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Sensor_APIs\">Sensor APIs</a> is the base class for orientation sensors. This interface cannot be used directly. Instead it provides properties and methods accessed by interfaces that inherit from it.\n<p>This feature may be blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a> set on your server."
|
||
},
|
||
"orientationsensor.populatematrix": {
|
||
"url": "$MDN_URL$/web/api/orientationsensor/populatematrix",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <strong><code>populateMatrix</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/OrientationSensor\"><code>OrientationSensor</code></a> interface populates the given target matrix with the\nrotation matrix based on the latest sensor reading. The rotation matrix is shown\nbelow.\n<p>where:\n<ul>\n<li>W = cos(θ/2)</li>\n<li>X = Vx * sin(θ/2)</li>\n<li>Y = Vy * sin(θ/2)</li>\n<li>Z = Vz * sin(θ/2)</li>\n</ul>",
|
||
"parameters": {
|
||
"targetMatrix": "TBD"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"orientationsensor.quaternion": {
|
||
"url": "$MDN_URL$/web/api/orientationsensor/quaternion",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "67",
|
||
"Edge": "79",
|
||
"Opera": "54"
|
||
},
|
||
"doc": "The <strong><code>quaternion</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/OrientationSensor\"><code>OrientationSensor</code></a> interface returns a four element\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> whose elements contain the components of the unit\n<a href=\"$MDN_URL$/Glossary/Quaternion\">quaternion</a> representing the device's orientation.\n<p>Because <a href=\"$MDN_URL$/Web/API/OrientationSensor\"><code>OrientationSensor</code></a> is a base class, <code>quaternion</code> may\nonly be read from one of its derived classes."
|
||
},
|
||
"origin": {
|
||
"url": "$MDN_URL$/web/api/origin",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "18",
|
||
"Firefox": "54",
|
||
"Opera": "46",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The global <strong><code>origin</code></strong> read-only property returns the origin of the global\nscope, serialized as a string."
|
||
},
|
||
"oscillatornode": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>OscillatorNode</code></strong> interface represents a periodic waveform, such as a sine wave. It is an <a href=\"$MDN_URL$/Web/API/AudioScheduledSourceNode\"><code>AudioScheduledSourceNode</code></a> audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone.\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>0</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count mode</th>\n<td><code>max</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td><code>2</code> (not used in the default count mode)</td>\n</tr>\n<tr>\n<th scope=\"row\">Channel interpretation</th>\n<td><code>speakers</code></td>\n</tr>\n</tbody>\n</table></figure>"
|
||
},
|
||
"oscillatornode.detune": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode/detune",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>detune</code> property of the <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> interface is an <a href=\"$MDN_URL$/Web/API/AudioParam#a-rate\">a-rate</a> <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> representing detuning of oscillation in <a href=\"https://en.wikipedia.org/wiki/Cent_%28music%29\" class=\"external\" target=\"_blank\">cents</a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> though the <code>AudioParam</code> returned is read-only, the value it represents is not.\n</div>"
|
||
},
|
||
"oscillatornode.frequency": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode/frequency",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>frequency</code></strong> property of the <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> interface is an <a href=\"$MDN_URL$/Web/API/AudioParam#a-rate\">a-rate</a> <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> representing the frequency of oscillation in hertz.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> though the <code>AudioParam</code> returned is read-only, the value it represents is not.\n</div>"
|
||
},
|
||
"oscillatornode.oscillatornode": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode/oscillatornode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "42",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>OscillatorNode()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> creates a new\n<a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> object which is an <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> that\nrepresents a periodic waveform, like a sine wave, optionally setting the node's\nproperties' values to match values in a specified object.\n<p>If the default values of the properties are acceptable, you can optionally use the\n<a href=\"$MDN_URL$/Web/API/BaseAudioContext/createOscillator\"><code>BaseAudioContext.createOscillator()</code></a> factory method instead; see\n<a href=\"$MDN_URL$/Web/API/AudioNode#creating_an_audionode\">Creating an AudioNode</a>.",
|
||
"parameters": {
|
||
"context": "A reference to an <a href=\"$MDN_URL$/Web/API/AudioContext\"><code>AudioContext</code></a>.",
|
||
"options": "An object whose properties specify the initial values for the oscillator node's properties. Any properties omitted from the object will take on the default value as documented. <dl> <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt> <dd> <p>The shape of the wave produced by the node. Valid values are '<code>sine</code>', '<code>square</code>', '<code>sawtooth</code>', '<code>triangle</code>' and '<code>custom</code>'. The default is '<code>sine</code>'. </dd> <dt id=\"detune\"><a href=\"#detune\"><code>detune</code></a></dt> <dd> <p>A detuning value (in cents) which will offset the <code>frequency</code> by the given amount. Its default is 0. </dd> <dt id=\"frequency\"><a href=\"#frequency\"><code>frequency</code></a></dt> <dd> <p>The frequency (in <a href=\"https://en.wikipedia.org/wiki/Hertz\" class=\"external\" target=\"_blank\">hertz</a>) of the periodic waveform. Its default is 440. </dd> <dt id=\"periodicwave\"><a href=\"#periodicwave\"><code>periodicWave</code></a></dt> <dd> <p>An arbitrary period waveform described by a <a href=\"$MDN_URL$/Web/API/PeriodicWave\"><code>PeriodicWave</code></a> object. </dd> <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt> <dd> <p>Represents an integer used to determine how many channels are used when <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> connections to any inputs to the node. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> for more information.) Its usage and precise definition depend on the value of <code>channelCountMode</code>. </dd> <dt id=\"channelcountmode\"><a href=\"#channelcountmode\"><code>channelCountMode</code></a></dt> <dd> <p>Represents an enumerated value describing the way channels must be matched between the node's inputs and outputs. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> <dt id=\"channelinterpretation\"><a href=\"#channelinterpretation\"><code>channelInterpretation</code></a></dt> <dd> <p>Represents an enumerated value describing the meaning of the channels. This interpretation will define how audio <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> will happen. The possible values are <code>\"speakers\"</code> or <code>\"discrete\"</code>. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> object instance."
|
||
},
|
||
"oscillatornode.setperiodicwave": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode/setperiodicwave",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "30",
|
||
"ChromeAndroid": "30",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "17",
|
||
"Safari": "8",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>setPeriodicWave()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> interface is used to point to a <a href=\"$MDN_URL$/Web/API/PeriodicWave\"><code>PeriodicWave</code></a>\ndefining a periodic waveform that can be used to shape the oscillator's output, when\n<a href=\"$MDN_URL$/Web/API/OscillatorNode/type\" ><code>type</code></a> is <code>custom</code>.",
|
||
"parameters": {
|
||
"wave": "A <a href=\"$MDN_URL$/Web/API/PeriodicWave\"><code>PeriodicWave</code></a> object representing the waveform to use as the shape of the oscillator's output."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"oscillatornode.type": {
|
||
"url": "$MDN_URL$/web/api/oscillatornode/type",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "20",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>type</code></strong> property of the <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a> interface specifies what shape of <a href=\"https://en.wikipedia.org/wiki/Waveform\" class=\"external\" target=\"_blank\">waveform</a> the\noscillator will output. There are several common waveforms available, as well as an\noption to specify a custom waveform shape. The shape of the waveform will affect the\ntone that is produced.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the value <code>custom</code> was specified. To set a custom waveform, just call <a href=\"$MDN_URL$/Web/API/OscillatorNode/setPeriodicWave\" ><code>setPeriodicWave()</code></a>. Doing so automatically sets the type for you."
|
||
}
|
||
},
|
||
"otpcredential": {
|
||
"url": "$MDN_URL$/web/api/otpcredential",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>OTPCredential</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/WebOTP_API\">WebOTP API</a> is returned when a WebOTP <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\" ><code>navigator.credentials.get()</code></a> call (i.e. invoked with an <code>otp</code> option) fulfills. It includes a <code>code</code> property that contains the retrieved one-time password (OTP)."
|
||
},
|
||
"otpcredential.code": {
|
||
"url": "$MDN_URL$/web/api/otpcredential/code",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "93",
|
||
"ChromeAndroid": "84",
|
||
"Edge": "93",
|
||
"Opera": "79"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>code</code></strong> property of the <a href=\"$MDN_URL$/Web/API/OTPCredential\"><code>OTPCredential</code></a> interface contains the one-time password (OTP)."
|
||
},
|
||
"overconstrainederror": {
|
||
"url": "$MDN_URL$/web/api/overconstrainederror",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "63",
|
||
"ChromeAndroid": "63",
|
||
"Edge": "79",
|
||
"Opera": "50",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>OverconstrainedError</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Media_Capture_and_Streams_API\">Media Capture and Streams API</a> indicates that the set of desired capabilities for the current <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> cannot currently 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."
|
||
},
|
||
"overconstrainederror.constraint": {
|
||
"url": "$MDN_URL$/web/api/overconstrainederror/constraint",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "63",
|
||
"ChromeAndroid": "63",
|
||
"Edge": "79",
|
||
"Opera": "50",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "The <strong><code>constraint</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/OverconstrainedError\"><code>OverconstrainedError</code></a> interface returns the constraint that was supplied\nin the constructor, meaning the constraint that was not satisfied."
|
||
},
|
||
"overconstrainederror.overconstrainederror": {
|
||
"url": "$MDN_URL$/web/api/overconstrainederror/overconstrainederror",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "63",
|
||
"ChromeAndroid": "63",
|
||
"Edge": "79",
|
||
"Opera": "50",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>OverconstrainedError()</code></strong> constructor\ncreates a new <a href=\"$MDN_URL$/Web/API/OverconstrainedError\"><code>OverconstrainedError</code></a> object which indicates that the set of\ndesired capabilities for the current <a href=\"$MDN_URL$/Web/API/MediaStreamTrack\"><code>MediaStreamTrack</code></a> cannot currently be\nmet. When this event is thrown on a <code>MediaStreamTrack</code>, it is muted until\neither the current constraints can be established or until satisfiable constraints are\napplied.",
|
||
"parameters": {
|
||
"constraint": "The constraint that was not satisfied.",
|
||
"message": "Text for the error's <code>message</code> property. Defaults to an empty string."
|
||
}
|
||
},
|
||
"pagetransitionevent": {
|
||
"url": "$MDN_URL$/web/api/pagetransitionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "4",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "1.5",
|
||
"Opera": "15",
|
||
"Safari": "5",
|
||
"SafariIOS": "4"
|
||
},
|
||
"doc": "The <strong><code>PageTransitionEvent</code></strong> event object is available inside handler functions for the <a href=\"$MDN_URL$/Web/API/Window/pageshow_event\"><code>pageshow</code></a> and <a href=\"$MDN_URL$/Web/API/Window/pagehide_event\"><code>pagehide</code></a> events, fired when a document is being loaded or unloaded."
|
||
},
|
||
"pagetransitionevent.pagetransitionevent": {
|
||
"url": "$MDN_URL$/web/api/pagetransitionevent/pagetransitionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79",
|
||
"Firefox": "11",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>PageTransitionEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/PageTransitionEvent\"><code>PageTransitionEvent</code></a> object, that is used by the <a href=\"$MDN_URL$/Web/API/Window/pageshow_event\" ><code>pageshow</code></a> or <a href=\"$MDN_URL$/Web/API/Window/pagehide_event\" ><code>pagehide</code></a> events, fired at the <a href=\"$MDN_URL$/Web/API/Window\"><code>window</code></a> object when a page is loaded or unloaded.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> A web developer doesn't typically need to call this constructor, as the browser creates these objects itself when firing <a href=\"$MDN_URL$/Web/API/Window/pageshow_event\" ><code>pageshow</code></a> or <a href=\"$MDN_URL$/Web/API/Window/pagehide_event\" ><code>pagehide</code></a> events.\n</div>",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>pageshow</code> or <code>pagehide</code>.",
|
||
"options": "An object that, <em>in addition to the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, has the following property: <dl> <dt id=\"persisted\"><a href=\"#persisted\"><code>persisted</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean indicating if the document is loading from a cache. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PageTransitionEvent\"><code>PageTransitionEvent</code></a> object."
|
||
},
|
||
"pagetransitionevent.persisted": {
|
||
"url": "$MDN_URL$/web/api/pagetransitionevent/persisted",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "4",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "11",
|
||
"Opera": "15",
|
||
"Safari": "5",
|
||
"SafariIOS": "4"
|
||
},
|
||
"doc": "The <strong><code>persisted</code></strong> read-only property indicates if a webpage is loading from a cache."
|
||
},
|
||
"paintworkletglobalscope": {
|
||
"url": "$MDN_URL$/web/api/paintworkletglobalscope",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Opera": "52"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PaintWorkletGlobalScope</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/CSS_Painting_API\">CSS Painting API</a> represents the global object available inside a paint <a href=\"$MDN_URL$/Web/API/Worklet\"><code>Worklet</code></a>."
|
||
},
|
||
"paintworkletglobalscope.devicepixelratio": {
|
||
"url": "$MDN_URL$/web/api/paintworkletglobalscope/devicepixelratio",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Opera": "52"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>devicePixelRatio</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PaintWorkletGlobalScope\"><code>PaintWorkletGlobalScope</code></a> interface returns the current device's ratio of physical pixels to logical pixels."
|
||
},
|
||
"paintworkletglobalscope.registerpaint": {
|
||
"url": "$MDN_URL$/web/api/paintworkletglobalscope/registerpaint",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Opera": "52"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>registerPaint()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PaintWorkletGlobalScope\"><code>PaintWorkletGlobalScope</code></a> interface registers a class to programmatically generate an\nimage where a CSS property expects a file.",
|
||
"parameters": {
|
||
"name": "The name of the worklet class to register.",
|
||
"classRef": "A reference to the class that implements the worklet."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>).",
|
||
"throws": {
|
||
"TypeError": "Thrown when one of the arguments is invalid or missing.",
|
||
"InvalidModificationError DOMException": "Thrown when the a worklet already exists with the specified name."
|
||
}
|
||
},
|
||
"pannernode": {
|
||
"url": "$MDN_URL$/web/api/pannernode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>PannerNode</code> interface defines an audio-processing object that represents the location, direction, and behavior of an audio source signal in a simulated physical space. This <a href=\"$MDN_URL$/Web/API/AudioNode\"><code>AudioNode</code></a> uses right-hand Cartesian coordinates to describe the source's <em>position</em> as a vector and its <em>orientation</em> as a 3D directional cone.\n<p>A <code>PannerNode</code> always has exactly one input and one output: the input can be <em>mono</em> or <em>stereo</em> but the output is always <em>stereo</em> (2 channels); you can't have panning effects without at least two audio channels!\n<figure class=\"table-container\"><table class=\"properties\">\n<tbody>\n<tr>\n<th scope=\"row\">Number of inputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Number of outputs</th>\n<td><code>1</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count mode</th>\n<td><code>\"clamped-max\"</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel count</th>\n<td><code>2</code></td>\n</tr>\n<tr>\n<th scope=\"row\">Channel interpretation</th>\n<td><code>\"speakers\"</code></td>\n</tr>\n</tbody>\n</table></figure>"
|
||
},
|
||
"pannernode.coneinnerangle": {
|
||
"url": "$MDN_URL$/web/api/pannernode/coneinnerangle",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>coneInnerAngle</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.\n<p>The <code>coneInnerAngle</code> property's default value is <code>360</code>, suitable for a non-directional source."
|
||
},
|
||
"pannernode.coneouterangle": {
|
||
"url": "$MDN_URL$/web/api/pannernode/coneouterangle",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>coneOuterAngle</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>coneOuterGain</code></a> property.\n<p>The <code>coneOuterAngle</code> property's default value is <code>0</code>."
|
||
},
|
||
"pannernode.coneoutergain": {
|
||
"url": "$MDN_URL$/web/api/pannernode/coneoutergain",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>coneOuterGain</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value, describing the amount of volume reduction outside the cone, defined by the <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a> attribute.\n<p>The <code>coneOuterGain</code> property's default value is <code>0</code>, meaning that no sound can be heard outside the cone.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if the property has been given a value outside the accepted range (0–1)."
|
||
}
|
||
},
|
||
"pannernode.distancemodel": {
|
||
"url": "$MDN_URL$/web/api/pannernode/distancemodel",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>distanceModel</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.\n<p>The possible values are:\n<ul>\n<li>\n<code>linear</code>: A <em>linear distance model</em> calculating the gain induced by the distance according to:\n<code>1 - rolloffFactor * (distance - refDistance) / (maxDistance - refDistance)</code>\n</li>\n<li>\n<code>inverse</code>: An <em>inverse distance model</em> calculating the gain induced by the distance according to:\n<code>refDistance / (refDistance + rolloffFactor * (Math.max(distance, refDistance) - refDistance))</code>\n</li>\n<li>\n<code>exponential</code>: An <em>exponential distance model</em> calculating the gain induced by the distance according to:\n<code>pow((Math.max(distance, refDistance) / refDistance, -rolloffFactor)</code>.\n</li>\n</ul>\n<p><code>inverse</code> is the default value of <code>distanceModel</code>."
|
||
},
|
||
"pannernode.maxdistance": {
|
||
"url": "$MDN_URL$/web/api/pannernode/maxdistance",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>maxDistance</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further. This value is used only by the <code>linear</code> distance model.\n<p>The <code>maxDistance</code> property's default value is <code>10000</code>.",
|
||
"throws": {
|
||
"RangeError": "Thrown if the property has been given a value that is outside the accepted range."
|
||
}
|
||
},
|
||
"pannernode.orientationx": {
|
||
"url": "$MDN_URL$/web/api/pannernode/orientationx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>orientationX</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface indicates the X (horizontal) component of the\ndirection in which the audio source is facing, in a 3D Cartesian coordinate space.\n<p>The complete vector is defined by the position of the audio source, given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" ><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" ><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" ><code>positionZ</code></a>), and the orientation\nof the audio source (that is, the direction in which it's facing), given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" aria-current=\"page\"><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" ><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" ><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>coneOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.orientationy": {
|
||
"url": "$MDN_URL$/web/api/pannernode/orientationy",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>orientationY</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface\nindicates the Y (vertical) component of the direction the audio source is facing, in 3D Cartesian coordinate space.\n<p>The complete vector is defined by the position of the audio source, given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" ><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" ><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" ><code>positionZ</code></a>), and the orientation\nof the audio source (that is, the direction in which it's facing), given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" ><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" aria-current=\"page\"><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" ><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>codeOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.orientationz": {
|
||
"url": "$MDN_URL$/web/api/pannernode/orientationz",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>orientationZ</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface\nindicates the Z (depth) component of the direction the audio source is facing, in 3D Cartesian coordinate space.\n<p>The complete vector is defined by the position of the audio source, given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" ><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" ><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" ><code>positionZ</code></a>), and the orientation\nof the audio source (that is, the direction in which it's facing), given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" ><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" ><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" aria-current=\"page\"><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>codeOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.pannernode": {
|
||
"url": "$MDN_URL$/web/api/pannernode/pannernode",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "42",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>PannerNode()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> creates a new <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> object instance.",
|
||
"parameters": {
|
||
"context": "A <a href=\"$MDN_URL$/Web/API/BaseAudioContext\"><code>BaseAudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "A <a href=\"https://webaudio.github.io/web-audio-api/#idl-def-PannerOptions\" class=\"external\" target=\"_blank\"><code>PannerOptions</code></a> dictionary object defining the properties you want the <code>PannerNode</code> to have: <dl> <dt id=\"panningmodel\"><a href=\"#panningmodel\"><code>panningModel</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/panningModel\"><code>PannerNode.panningModel</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>equalpower</code>.) </dd> <dt id=\"distancemodel\"><a href=\"#distancemodel\"><code>distanceModel</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/distanceModel\"><code>PannerNode.distanceModel</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>inverse</code>.) </dd> <dt id=\"positionx\"><a href=\"#positionx\"><code>positionX</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/positionX\"><code>PannerNode.positionX</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>0</code>.) </dd> <dt id=\"positiony\"><a href=\"#positiony\"><code>positionY</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\"><code>PannerNode.positionY</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>0</code>.) </dd> <dt id=\"positionz\"><a href=\"#positionz\"><code>positionZ</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\"><code>PannerNode.positionZ</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>0</code>.) </dd> <dt id=\"orientationx\"><a href=\"#orientationx\"><code>orientationX</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\"><code>PannerNode.orientationX</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>1</code>.) </dd> <dt id=\"orientationy\"><a href=\"#orientationy\"><code>orientationY</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\"><code>PannerNode.orientationY</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>0</code>.) </dd> <dt id=\"orientationz\"><a href=\"#orientationz\"><code>orientationZ</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\"><code>PannerNode.orientationZ</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>0</code>.) </dd> <dt id=\"refdistance\"><a href=\"#refdistance\"><code>refDistance</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/refDistance\"><code>PannerNode.refDistance</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have. The default is <code>1</code>, and negative values are not allowed. </dd> <dt id=\"maxdistance\"><a href=\"#maxdistance\"><code>maxDistance</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/maxDistance\"><code>PannerNode.maxDistance</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have. The default is <code>10000</code>, and non-positive values are not allowed. </dd> <dt id=\"rollofffactor\"><a href=\"#rollofffactor\"><code>rolloffFactor</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/rolloffFactor\"><code>PannerNode.rolloffFactor</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have. The default is <code>1</code>, and negative values are not allowed. </dd> <dt id=\"coneinnerangle\"><a href=\"#coneinnerangle\"><code>coneInnerAngle</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\"><code>PannerNode.coneInnerAngle</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>360</code>.) </dd> <dt id=\"coneouterangle\"><a href=\"#coneouterangle\"><code>coneOuterAngle</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\"><code>PannerNode.coneOuterAngle</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have (the default is <code>360</code>.) </dd> <dt id=\"coneoutergain\"><a href=\"#coneoutergain\"><code>coneOuterGain</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\"><code>PannerNode.coneOuterGain</code></a> you want the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> to have. The default is <code>0</code>, and its value can be in the range 0–1. </dd> <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt> <dd> <p>Represents an integer used to determine how many channels are used when <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> connections to any inputs to the node. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> for more information.) Its usage and precise definition depend on the value of <code>channelCountMode</code>. </dd> <dt id=\"channelcountmode\"><a href=\"#channelcountmode\"><code>channelCountMode</code></a></dt> <dd> <p>Represents an enumerated value describing the way channels must be matched between the node's inputs and outputs. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> <dt id=\"channelinterpretation\"><a href=\"#channelinterpretation\"><code>channelInterpretation</code></a></dt> <dd> <p>Represents an enumerated value describing the meaning of the channels. This interpretation will define how audio <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> will happen. The possible values are <code>\"speakers\"</code> or <code>\"discrete\"</code>. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> </dl>"
|
||
},
|
||
"throws": {
|
||
"RangeError": "Thrown if the <code>refDistance</code>, <code>maxDistance</code>, or <code>rolloffFactor</code> properties have been given a value that is outside the accepted range.",
|
||
"InvalidStateError DOMException": "Thrown if the <code>coneOuterGain</code> property has been given a value outside the accepted range (0–1)."
|
||
}
|
||
},
|
||
"pannernode.panningmodel": {
|
||
"url": "$MDN_URL$/web/api/pannernode/panningmodel",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>panningModel</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is an enumerated value determining which spatialization algorithm to use to position the audio in 3D space.\n<p>The possible values are:\n<ul>\n<li><code>equalpower</code>: Represents the equal-power panning algorithm, generally regarded as simple and efficient. <code>equalpower</code> is the default value.</li>\n<li><code>HRTF</code>: Renders a stereo output of higher quality than <code>equalpower</code> — it uses a convolution with measured impulse responses from human subjects.</li>\n</ul>"
|
||
},
|
||
"pannernode.positionx": {
|
||
"url": "$MDN_URL$/web/api/pannernode/positionx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>positionX</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface specifies the X coordinate of the audio source's position in 3D Cartesian\ncoordinates, corresponding to the <em>horizontal</em> axis (left-right).\n<p>The complete vector is defined by the position of the audio source, given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" aria-current=\"page\"><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" ><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" ><code>positionZ</code></a>), and the orientation\nof the audio source (that is, the direction in which it's facing), given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" ><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" ><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" ><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>codeOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.positiony": {
|
||
"url": "$MDN_URL$/web/api/pannernode/positiony",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>positionY</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface specifies the Y coordinate of the audio source's position in 3D Cartesian\ncoordinates, corresponding to the <em>vertical</em> axis (top-bottom). The complete\nvector is defined by the position of the audio source, given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" ><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" aria-current=\"page\"><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" ><code>positionZ</code></a>), and the orientation\nof the audio source (that is, the direction in which it's facing), given as\n(<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" ><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" ><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" ><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>codeOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.positionz": {
|
||
"url": "$MDN_URL$/web/api/pannernode/positionz",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "50",
|
||
"Opera": "39",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>positionZ</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface specifies the Z coordinate of the audio source's position in 3D Cartesian\ncoordinates, corresponding to the <em>depth</em> axis (behind-in front of the\nlistener). The complete vector is defined by the position of the audio source, given\nas (<a href=\"$MDN_URL$/Web/API/PannerNode/positionX\" ><code>positionX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/positionY\" ><code>positionY</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\" aria-current=\"page\"><code>positionZ</code></a>), and the orientation of the audio source (that is, the direction in\nwhich it's facing), given as (<a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\" ><code>orientationX</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\" ><code>orientationY</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\" ><code>orientationZ</code></a>).\n<p>Depending on the directionality of the sound (as specified using the attributes\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\" ><code>coneInnerAngle</code></a>,\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\" ><code>coneOuterAngle</code></a>, and\n<a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\" ><code>codeOuterGain</code></a>), the orientation of the\nsound may alter the perceived volume of the sound as it's being played. If the sound\nis pointing toward the listener, it will be louder than if the sound is pointed away\nfrom the listener.\n<p>The <a href=\"$MDN_URL$/Web/API/AudioParam\"><code>AudioParam</code></a> contained by this property is read only; however, you\ncan still change the value of the parameter by assigning a new value to its\n<a href=\"$MDN_URL$/Web/API/AudioParam/value\"><code>AudioParam.value</code></a> property."
|
||
},
|
||
"pannernode.refdistance": {
|
||
"url": "$MDN_URL$/web/api/pannernode/refdistance",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>refDistance</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value representing the reference distance for reducing volume as the audio source moves further from the listener – i.e. the distance at which the volume reduction starts taking effect. This value is used by all distance models.\n<p>The <code>refDistance</code> property's default value is <code>1</code>.",
|
||
"throws": {
|
||
"RangeError": "Thrown if the property has been given a value that is outside the accepted range."
|
||
}
|
||
},
|
||
"pannernode.rollofffactor": {
|
||
"url": "$MDN_URL$/web/api/pannernode/rollofffactor",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <code>rolloffFactor</code> property of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> interface is a double value describing how quickly the volume is reduced as the source moves away from the listener. This value is used by all distance models. The <code>rolloffFactor</code> property's default value is <code>1</code>.",
|
||
"throws": {
|
||
"RangeError": "Thrown if the property has been given a value that is outside the accepted range."
|
||
}
|
||
},
|
||
"pannernode.setorientation": {
|
||
"url": "$MDN_URL$/web/api/pannernode/setorientation",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> The suggested replacement for this deprecated method is to instead set the <a href=\"$MDN_URL$/Web/API/PannerNode/orientationX\"><code>orientationX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/orientationY\"><code>orientationY</code></a>, and <a href=\"$MDN_URL$/Web/API/PannerNode/orientationZ\"><code>orientationZ</code></a> attributes directly.\n</div>\n<p>The <code>setOrientation()</code> method of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> Interface defines the direction the audio source is playing in.\n<p>This can have a big effect if the sound is very directional — controlled by the three cone-related attributes <a href=\"$MDN_URL$/Web/API/PannerNode/coneInnerAngle\"><code>PannerNode.coneInnerAngle</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterAngle\"><code>PannerNode.coneOuterAngle</code></a>, and <a href=\"$MDN_URL$/Web/API/PannerNode/coneOuterGain\"><code>PannerNode.coneOuterGain</code></a>. In such a case, a sound pointing away from the listener can be very quiet or even silent.\n<p>The three parameters <code>x</code>, <code>y</code> and <code>z</code> are unitless and describe a direction vector in 3D space using the right-hand Cartesian coordinate system. The default value of the direction vector is <code>(1, 0, 0)</code>.",
|
||
"parameters": {
|
||
"x": "The x value of the panner's direction vector in 3D space.",
|
||
"y": "The y value of the panner's direction vector in 3D space.",
|
||
"z": "The z value of the panner's direction vector in 3D space."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"pannernode.setposition": {
|
||
"url": "$MDN_URL$/web/api/pannernode/setposition",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "14",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> The suggested replacement for this deprecated method is to instead set the <a href=\"$MDN_URL$/Web/API/PannerNode/positionX\"><code>positionX</code></a>, <a href=\"$MDN_URL$/Web/API/PannerNode/positionY\"><code>positionY</code></a>, and <a href=\"$MDN_URL$/Web/API/PannerNode/positionZ\"><code>positionZ</code></a> attributes directly.\n</div>\n<p>The <code>setPosition()</code> method of the <a href=\"$MDN_URL$/Web/API/PannerNode\"><code>PannerNode</code></a> Interface defines the position of the audio source relative to the listener (represented by an <a href=\"$MDN_URL$/Web/API/AudioListener\"><code>AudioListener</code></a> object stored in the <a href=\"$MDN_URL$/Web/API/BaseAudioContext/listener\"><code>BaseAudioContext.listener</code></a> attribute.) The three parameters <code>x</code>, <code>y</code> and <code>z</code> are unitless and describe the source's position in 3D space using the right-hand Cartesian coordinate system.\n<p>The <code>setPosition()</code> method's default value of the position is <code>(0, 0, 0)</code>.",
|
||
"parameters": {
|
||
"x": "The x position of the panner in 3D space.",
|
||
"y": "The y position of the panner in 3D space.",
|
||
"z": "The z position of the panner in 3D space."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"passwordcredential": {
|
||
"url": "$MDN_URL$/web/api/passwordcredential",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "79",
|
||
"Opera": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The interface of the <a href=\"$MDN_URL$/Web/API/Credential_Management_API\">Credential Management API</a> provides information about a username/password pair. In supporting browsers an instance of this class may be passed in the <code>credential</code> member of the <code>init</code> object for global <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a>.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This interface is restricted to top-level contexts and cannot be used from an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a>.\n</div>"
|
||
},
|
||
"passwordcredential.iconurl": {
|
||
"url": "$MDN_URL$/web/api/passwordcredential/iconurl",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "79",
|
||
"Opera": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>iconURL</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/PasswordCredential\"><code>PasswordCredential</code></a> interface returns a string\ncontaining a URL pointing to an image for an icon. This image is intended for display\nin a credential chooser. The URL must be accessible without authentication."
|
||
},
|
||
"passwordcredential.name": {
|
||
"url": "$MDN_URL$/web/api/passwordcredential/name",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "79",
|
||
"Opera": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>name</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/PasswordCredential\"><code>PasswordCredential</code></a> interface returns a string\ncontaining a human-readable public name for display in a credential chooser."
|
||
},
|
||
"passwordcredential.password": {
|
||
"url": "$MDN_URL$/web/api/passwordcredential/password",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "79",
|
||
"Opera": "47"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>password</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/PasswordCredential\"><code>PasswordCredential</code></a> interface returns a string\ncontaining the password of the credential."
|
||
},
|
||
"passwordcredential.passwordcredential": {
|
||
"url": "$MDN_URL$/web/api/passwordcredential/passwordcredential",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "51",
|
||
"ChromeAndroid": "51",
|
||
"Edge": "79",
|
||
"Opera": "38"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PasswordCredential()</code></strong>\nconstructor creates a new <a href=\"$MDN_URL$/Web/API/PasswordCredential\"><code>PasswordCredential</code></a> object. In\nsupporting browsers, an instance of this class may be passed the <code>credential</code>\nfrom the <code>init</code> object for global <a href=\"$MDN_URL$/Web/API/fetch\"><code>fetch()</code></a>.",
|
||
"parameters": {
|
||
"passwordCredentialData": "An object with the following properties: <dl> <dt id=\"iconurl\"><a href=\"#iconurl\"><code>iconURL</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The URL of a user's avatar image. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a></dt> <dd> <p>The ID of the user signing in. </dd> <dt id=\"name\"><a href=\"#name\"><code>name</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The name of the user signing in. </dd> <dt id=\"password\"><a href=\"#password\"><code>password</code></a></dt> <dd> <p>The password of the user signing in. </dd> </dl>",
|
||
"htmlFormElement": "A reference to an <a href=\"$MDN_URL$/Web/API/HTMLFormElement\"><code>HTMLFormElement</code></a> with appropriate input fields. The form should, at the very least, contain an id and password. It could also require a CSRF token."
|
||
}
|
||
},
|
||
"path2d": {
|
||
"url": "$MDN_URL$/web/api/path2d",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "36",
|
||
"ChromeAndroid": "36",
|
||
"Edge": "14",
|
||
"Firefox": "31",
|
||
"Opera": "23",
|
||
"Safari": "8",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>Path2D</code></strong> interface of the Canvas 2D API is used to declare a path that can then be used on a <a href=\"$MDN_URL$/Web/API/CanvasRenderingContext2D\"><code>CanvasRenderingContext2D</code></a> object. The <a href=\"$MDN_URL$/Web/API/CanvasRenderingContext2D#paths\">path methods</a> of the <code>CanvasRenderingContext2D</code> interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired."
|
||
},
|
||
"path2d.addpath": {
|
||
"url": "$MDN_URL$/web/api/path2d/addpath",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "68",
|
||
"ChromeAndroid": "68",
|
||
"Edge": "79",
|
||
"Firefox": "34",
|
||
"Opera": "55",
|
||
"Safari": "9",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "The <strong><code>Path2D.addPath()</code></strong> method\nof the Canvas 2D API adds one <a href=\"$MDN_URL$/Web/API/Path2D\"><code>Path2D</code></a> object to another\n<code>Path2D</code> object.",
|
||
"parameters": {
|
||
"path": "A <a href=\"$MDN_URL$/Web/API/Path2D\"><code>Path2D</code></a> path to add.",
|
||
"transform": "A <a href=\"$MDN_URL$/Web/API/DOMMatrix\"><code>DOMMatrix</code></a> to be used as the transformation matrix for the path that is added. (Technically a <code>DOMMatrixInit</code> object)."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"path2d.path2d": {
|
||
"url": "$MDN_URL$/web/api/path2d/path2d",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "36",
|
||
"ChromeAndroid": "36",
|
||
"Edge": "14",
|
||
"Firefox": "31",
|
||
"Opera": "23",
|
||
"Safari": "8",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>Path2D()</code></strong> constructor returns a newly instantiated\n<code>Path2D</code> object, optionally with another path as an argument (creates a\ncopy), or optionally with a string consisting of <a href=\"$MDN_URL$/Web/SVG/Tutorial/Paths\">SVG path</a> data.",
|
||
"parameters": {
|
||
"path": "When invoked with another <code>Path2D</code> object, a copy of the <code>path</code> argument is created.",
|
||
"d": "When invoked with a string consisting of <a href=\"$MDN_URL$/Web/SVG/Tutorial/Paths\">SVG path</a> data, a new path is created from that description."
|
||
}
|
||
},
|
||
"paymentaddress": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>PaymentAddress</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API</a> is used to store shipping or payment address information.\n<p>It may be useful to refer to the Universal Postal Union website's <a href=\"https://www.upu.int/en/Postal-Solutions/Programmes-Services/Addressing-Solutions#addressing-s42-standard\" class=\"external\" target=\"_blank\">Addressing S42 standard</a> materials, which provide information about international standards for postal addresses."
|
||
},
|
||
"paymentaddress.addressline": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/addressline",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>addressLine</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface is an array of\nstrings, each specifying a line of the address that is not\ncovered by one of the other properties of <code>PaymentAddress</code>.\n<p>These\nlines may include the street name, house number, apartment number, rural delivery route,\ndescriptive instructions, or post office box."
|
||
},
|
||
"paymentaddress.city": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/city",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>city</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing the city or\ntown portion of the address."
|
||
},
|
||
"paymentaddress.country": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/country",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>country</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface is a string identifying the address's country\nusing the <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\" class=\"external\" target=\"_blank\">ISO 3166-1 alpha-2</a> standard. The string is\nalways in its canonical upper-case form.\n<p>Some examples of valid <code>country</code> values: <code>\"US\"</code>,\n<code>\"GB\"</code>, <code>\"CN\"</code>, or <code>\"JP\"</code>."
|
||
},
|
||
"paymentaddress.dependentlocality": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/dependentlocality",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The read-only <strong><code>dependentLocality</code></strong>\nproperty of the <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface is a string containing a\nsublocality designation within a city, such as a neighborhood, borough, district, or,\nin the United Kingdom, a dependent locality. Also known as a <em>post\ntown</em>."
|
||
},
|
||
"paymentaddress.organization": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/organization",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>organization</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing\nthe name of the organization, firm, company, or institution at the address."
|
||
},
|
||
"paymentaddress.phone": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/phone",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The read-only <strong><code>phone</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing the telephone number\nof the recipient or contact person."
|
||
},
|
||
"paymentaddress.postalcode": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/postalcode",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>postalCode</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing a code used by a\njurisdiction for mail routing, for example, the <a href=\"https://en.wikipedia.org/wiki/ZIP_Code\" class=\"external\" target=\"_blank\">ZIP Code</a>\nin the United States or the <a href=\"https://en.wikipedia.org/wiki/Postal_Index_Number\" class=\"external\" target=\"_blank\">Postal Index Number</a> (PIN code)\nin India."
|
||
},
|
||
"paymentaddress.recipient": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/recipient",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The read-only <strong><code>recipient</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing the name of the\nrecipient, purchaser, or contact person at the payment address."
|
||
},
|
||
"paymentaddress.region": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/region",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The read-only <strong><code>region</code></strong> property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing the top-level\nadministrative subdivision of the country in which the address is located. For example,\nthis may be a state, province, oblast, or prefecture."
|
||
},
|
||
"paymentaddress.sortingcode": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/sortingcode",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>sortingCode</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface returns a string containing a postal sorting\ncode such as is used in France."
|
||
},
|
||
"paymentaddress.tojson": {
|
||
"url": "$MDN_URL$/web/api/paymentaddress/tojson",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> interface is a standard serializer that returns a JSON representation of the PaymentAddress object's properties.",
|
||
"returns": "A JSON object."
|
||
},
|
||
"paymentmanager": {
|
||
"url": "$MDN_URL$/web/api/paymentmanager",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PaymentManager</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Handler_API\" >Payment Handler API</a> is used to manage various aspects of payment app functionality.\n<p>It is accessed via the <a href=\"$MDN_URL$/Web/API/ServiceWorkerRegistration/paymentManager\"><code>ServiceWorkerRegistration.paymentManager</code></a> property."
|
||
},
|
||
"paymentmanager.enabledelegations": {
|
||
"url": "$MDN_URL$/web/api/paymentmanager/enabledelegations",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>enableDelegations()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentManager\"><code>PaymentManager</code></a> interface delegates responsibility for providing various parts of the required payment information to the payment app rather than collecting it from the browser (for example, via autofill).\n<p>For example, if the <code>requestShipping</code> option is set to <code>true</code> in the options object when invoking the <a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest()</code></a> constructor, a shipping address will be returned.\n<ul>\n<li>If <code>enableDelegations()</code> was used to delegate <code>shippingAddress</code>, that address will come from the payment app.</li>\n<li>If not, it will come from the browser autofill.</li>\n</ul>",
|
||
"parameters": {
|
||
"delegations": "An array containing one or more enumerated values that specify the payment information you want to delegate to the payment app. Possible values can be: <dl> <dt id=\"payeremail\"><a href=\"#payeremail\"><code>payerEmail</code></a></dt> <dd> <p>The payment app will provide the payer's email whenever it is needed. </dd> <dt id=\"payername\"><a href=\"#payername\"><code>payerName</code></a></dt> <dd> <p>The payment app will provide the payer's name whenever it is needed. </dd> <dt id=\"payerphone\"><a href=\"#payerphone\"><code>payerPhone</code></a></dt> <dd> <p>The payment app will provide the payer's phone number whenever it is needed. </dd> <dt id=\"shippingaddress\"><a href=\"#shippingaddress\"><code>shippingAddress</code></a></dt> <dd> <p>The payment app will provide the shipping address whenever it is needed. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a value of <code>undefined</code>."
|
||
},
|
||
"paymentmanager.userhint": {
|
||
"url": "$MDN_URL$/web/api/paymentmanager/userhint",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>userHint</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PaymentManager\"><code>PaymentManager</code></a> interface provides a hint for the browser to display along with the payment app's name and icon in the Payment Handler UI."
|
||
},
|
||
"paymentmethodchangeevent": {
|
||
"url": "$MDN_URL$/web/api/paymentmethodchangeevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Opera": "63",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentMethodChangeEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API</a> describes the <a href=\"$MDN_URL$/Web/API/PaymentRequest/paymentmethodchange_event\" ><code>paymentmethodchange</code></a> event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a \"store\" card to make a purchase while using Apple Pay)."
|
||
},
|
||
"paymentmethodchangeevent.methoddetails": {
|
||
"url": "$MDN_URL$/web/api/paymentmethodchangeevent/methoddetails",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Opera": "63",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The read-only <strong><code>methodDetails</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a> interface is an object\ncontaining any data the payment handler may provide to describe the change the user\nhas made to their payment method. The value is <code>null</code> if no details\nare available."
|
||
},
|
||
"paymentmethodchangeevent.methodname": {
|
||
"url": "$MDN_URL$/web/api/paymentmethodchangeevent/methodname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Opera": "63",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The read-only <strong><code>methodName</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a> interface is a string which\nuniquely identifies the payment handler currently selected by the user. The\npayment handler may be a payment technology, such as Apple Pay or Android Pay, and each\npayment handler may support multiple payment methods; changes to the payment method\nwithin the payment handler are described by the <code>PaymentMethodChangeEvent</code>."
|
||
},
|
||
"paymentmethodchangeevent.paymentmethodchangeevent": {
|
||
"url": "$MDN_URL$/web/api/paymentmethodchangeevent/paymentmethodchangeevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Opera": "63",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentMethodChangeEvent()</code></strong>\nconstructor creates a new <a href=\"$MDN_URL$/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a> object providing\ndetails about a <a href=\"$MDN_URL$/Web/API/PaymentRequest/paymentmethodchange_event\" ><code>paymentmethodchange</code></a> event.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>paymentmethodchange</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"methodname\"><a href=\"#methodname\"><code>methodName</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A string containing the payment method identifier for the payment handler being used. This is an empty string by default. </dd> <dt id=\"methoddetails\"><a href=\"#methoddetails\"><code>methodDetails</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An object providing payment method-specific information describing the changes made to the payment, or <code>null</code> if there is no additional information available or required. This is <code>null</code> by default. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a> object describing a change to\n the options specified for the payment method given in the <code>methodName</code>\n property.\n<p>The type of the <code>methodDetails</code> property depends on the payment method. For\n example, if <code>methodName</code> is <code>https://example.com/pay</code>, indicating that the\n Example Pay payment method is being used for validation, the shape of <code>methodDetails</code>\n is defined by the payment method."
|
||
},
|
||
"paymentrequest": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API's</a> <strong><code>PaymentRequest</code></strong> interface is the primary access point into the API, and lets web content and apps accept payments from the end user on behalf of the operator of the site or the publisher of the app."
|
||
},
|
||
"paymentrequest.abort": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/abort",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <code>PaymentRequest.abort()</code> method of the <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a>\ninterface causes the user agent to end the payment request and to remove any user\ninterface that might be shown.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"paymentrequest.canmakepayment": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/canmakepayment",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "16",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> method\n<strong><code>canMakePayment()</code></strong> determines whether or not the request\nis configured in a way that is compatible with at least one payment method supported\nby the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>.\n<p>You can call this before calling\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/show\" ><code>show()</code></a> to provide a streamlined user experience\nwhen the user's browser can't handle any of the payment methods you accept.\n<p>For instance, you might call <code>canMakePayment()</code> to determine if the browser\nwill let the user pay using Payment Request API, and if it won't, you could fall back to\nanother payment method, or offer a list of methods that aren't handled by Payment\nRequest API (or even provide instructions for paying by mail or by phone).",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> to a boolean value that resolves to <code>true</code>\n if the user agent supports any of the payment methods supplied when instantiating the\n request using the <a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" title=\"PaymentRequest\"><code>PaymentRequest</code></a>\n constructor. If the payment can't be processed, the promise receives a value of\n <code>false</code>.\n<div class=\"notecard note\" id=\"sect2\">\n <p><strong>Note:</strong> If you call this too often, the browser may reject the\n returned promise with a <code>DOMException</code>.\n</div>"
|
||
},
|
||
"paymentrequest.id": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/id",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "16",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>id</code></strong> read-only attribute of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> interface returns a unique identifier for a particular\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> instance.\n<p>When constructing an instance of the <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a>, you are able to\nsupply an custom id. If none is provided, the browser automatically sets the id value to a UUID."
|
||
},
|
||
"paymentrequest.paymentrequest": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/paymentrequest",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentRequest()</code></strong> constructor\ncreates a new <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object which will be used to handle the\nprocess of generating, validating, and submitting a payment request.",
|
||
"parameters": {
|
||
"methodData": "Contains an array of identifiers for the payment methods the merchant website accepts and any associated payment method specific data. Each item in the array contains the following fields: <dl> <dt id=\"supportedmethods\"><a href=\"#supportedmethods\"><code>supportedMethods</code></a></dt> <dd> <p>A string containing a <a href=\"$MDN_URL$/Web/API/Payment_Request_API/Concepts#payment_method_identifiers\">payment method identifier</a>. This is either a URL or one of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API/Concepts#standardized_payment_method_identifiers\">standardized payment method identifiers</a>. The value and structure of the <code>data</code> field will vary depending on the value of the <code>supportedMethods</code> field. </dd> <dt id=\"data\"><a href=\"#data\"><code>data</code></a></dt> <dd> <p>A JSON-serializable object that provides optional information that might be needed by the supported payment methods. This has to conform to the type expected by the payment handler indicated by <code>supportedMethods</code>. Developers need to consult whomever controls the payment methods for the expected shape of the data object. If <code>supportedMethods</code> is <code>secure-payment-confirmation</code>, then <code>data</code> needs to conform to the <a href=\"$MDN_URL$/Web/API/SecurePaymentConfirmationRequest\"><code>SecurePaymentConfirmationRequest</code></a> dictionary. </dd> </dl>",
|
||
"details": "Provides information about the requested transaction. This parameter contains the following fields: <dl> <dt id=\"total\"><a href=\"#total\"><code>total</code></a></dt> <dd> <p>The total amount of the payment request. </dd> <dt id=\"id\"><a href=\"#id\"><code>id</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A free-form identifier for this payment request. If a value is not supplied, the browser will construct one. </dd> <dt id=\"displayitems\"><a href=\"#displayitems\"><code>displayItems</code></a></dt> <dd> <p>An array of optional line items for the payment request that the user agent may display, such as product details, tax, and shipping. </dd> <dt id=\"shippingoptions\"><a href=\"#shippingoptions\"><code>shippingOptions</code></a></dt> <dd> <p>The shipping options the user may choose from. If this sequence is blank, it indicates the merchant cannot ship to the current shipping address. The default shipping option may be indicated in this sequence. </dd> <dt id=\"modifiers\"><a href=\"#modifiers\"><code>modifiers</code></a></dt> <dd> <p>Modifiers for specific payment methods; for example, adjusting the total amount based on the payment method. This parameter contains the following fields: <dl> <dt id=\"additionaldisplayitems\"><a href=\"#additionaldisplayitems\"><code>additionalDisplayItems</code></a></dt> <dd> <p>An array of items to be appended to the <code>details.displayItems</code> property. This property is commonly used to add a discount or surcharge line item indicating the different amount in <code>details.modifiers.total</code>. </dd> <dt id=\"data_2\"><a href=\"#data_2\"><code>data</code></a></dt> <dd> <p>A JSON-serializable object that provides optional information that might be needed by the supported payment methods. </dd> <dt id=\"total_2\"><a href=\"#total_2\"><code>total</code></a></dt> <dd> <p>A total amount for the payment request that overrides value in details.total. This is typically used when <code>details.modifiers.additionalItems</code> adds a discount or a purchase to the request. </dd> </dl> </dd> </dl>",
|
||
"options": "Lets you set options that control the behavior of the user agent. This parameter contains the following fields: <dl> <dt id=\"requestpayername\"><a href=\"#requestpayername\"><code>requestPayerName</code></a></dt> <dd> <p>A Boolean indicating whether the user agent should collect the payer's name and submit it with the payment request. The default is <code>false</code>. </dd> <dt id=\"requestpayeremail\"><a href=\"#requestpayeremail\"><code>requestPayerEmail</code></a></dt> <dd> <p>A Boolean indicating whether the user agent should collect the payer's email address and submit it with the payment request. The default is <code>false</code>. </dd> <dt id=\"requestpayerphone\"><a href=\"#requestpayerphone\"><code>requestPayerPhone</code></a></dt> <dd> <p>A Boolean indicating whether the user agent should collect the payer's phone number and submit it with the payment request. The default is <code>false</code>. </dd> <dt id=\"requestshipping\"><a href=\"#requestshipping\"><code>requestShipping</code></a></dt> <dd> <p>A Boolean indicating whether the user agent should collect the payer's shipping address and submit it with the payment request. If you set this type to true, you should select an appropriate <code>shippingType</code>. The default is <code>false</code>. </dd> <dt id=\"shippingtype\"><a href=\"#shippingtype\"><code>shippingType</code></a></dt> <dd> <p>Lets you specify how the user interface refers to shipping when the word 'shipping' isn't appropriate for your use case. For example, in English speaking countries you would say \"pizza delivery\" not \"pizza shipping\". Valid values are <code>\"shipping\"</code>, <code>\"delivery\"</code>, and <code>\"pickup\"</code>. Quotation marks must be included. The default value is <code>\"shipping\"</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object, configured for use as configured by the\n input parameters.",
|
||
"throws": {
|
||
"SecurityError DOMException": "Use of this feature was blocked by a <a href=\"$MDN_URL$/Web/HTTP/Permissions_Policy\">Permissions Policy</a>."
|
||
}
|
||
},
|
||
"paymentrequest.shippingaddress": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/shippingaddress",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>shippingAddress</code></strong> read-only property of\nthe <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> interface returns the shipping address provided by the\nuser. It is <code>null</code> by default."
|
||
},
|
||
"paymentrequest.shippingoption": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/shippingoption",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>shippingOption</code></strong> read-only attribute of\nthe <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> interface returns either the id of a selected shipping\noption, null (if no shipping option was set to be selected) or a shipping option\nselected by the user. It is initially <code>null</code> by when no \"selected\" shipping\noptions are provided.\n<p>This attribute is only populated if the constructor is called with the\n<code>requestShipping</code> flag set to <code>true</code>. If\n<code>requestShipping</code> was <code>false</code> (or missing),\n<code>shippingOption</code> returns <code>null</code>, even the developer provides\na selected a shipping option."
|
||
},
|
||
"paymentrequest.shippingtype": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/shippingtype",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>shippingType</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> interface returns one of <code>\"shipping\"</code>,\n<code>\"delivery\"</code>, <code>\"pickup\"</code>, or <code>null</code> if one was not\nprovided by the constructor."
|
||
},
|
||
"paymentrequest.show": {
|
||
"url": "$MDN_URL$/web/api/paymentrequest/show",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a></strong> interface's\n<strong><code>show()</code></strong> method instructs the user agent to begin the\nprocess of showing and handling the user interface for the payment request to the\nuser.\n<p>Only one payment request can be in the process of being handled at once, across all\ndocuments. Once one <code>PaymentRequest</code>'s <code>show()</code> method has been\ncalled, any other call to <code>show()</code> will by rejected with an\n<code>AbortError</code> until the returned promise has been concluded, either by being\nfulfilled with a <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> indicating the results of the payment\nrequest, or by being rejected with an error.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> In reality, despite the fact that the specification says this\ncan't be done, some browsers, including Firefox, support multiple active payment\nrequests at a time.\n</div>\n<p>If your architecture doesn't necessarily have all of the data ready to go at the moment\nit instantiates the payment interface by calling <code>show()</code>, specify the\n<code>detailsPromise</code> parameter, providing a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that is\nfulfilled once the data is ready. If this is provided, <code>show()</code> will not\nallow the user to interact with the payment interface until the promise is fulfilled, so\nthat data can be updated prior to the user engaging with the payment process.\n<p>Processing the result and, if necessary, calling <a href=\"$MDN_URL$/Web/API/PaymentResponse/retry\"><code>PaymentResponse.retry()</code></a>\nto retry a failed payment can all be done either asynchronously or synchronously,\ndepending on your needs. For the best user experience, asynchronous solutions are\ntypically the best way to go. Most examples on MDN and elsewhere use\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Statements/async_function\"><code>async</code></a>/<a href=\"$MDN_URL$/Web/JavaScript/Reference/Operators/await\"><code>await</code></a>\nto wait asynchronously while results are validated and so forth.",
|
||
"parameters": {
|
||
"detailsPromise": "An optional <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that you can provide if your architecture requires that the payment request's details need to be updated between instantiating the payment interface and the user beginning to interact with it. The promise should resolve with an object containing the updated information: <dl> <dt id=\"displayitems\"><a href=\"#displayitems\"><code>displayItems</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice, each with the following properties: <dl> <dt id=\"amount\"><a href=\"#amount\"><code>amount</code></a></dt> <dd> <p>An object describing the monetary value of the item. This object includes the following fields: <dl> <dt id=\"currency\"><a href=\"#currency\"><code>currency</code></a></dt> <dd> <p>A string containing a valid 3-letter <a href=\"https://www.iso.org/iso-4217-currency-codes.html\" class=\"external\" target=\"_blank\">ISO 4217</a> currency identifier (<a href=\"https://en.wikipedia.org/wiki/ISO_4217\" class=\"external\" target=\"_blank\">ISO 4217</a>) indicating the currency used for the payment <code>value</code>. </dd> <dt id=\"value\"><a href=\"#value\"><code>value</code></a></dt> <dd> <p>A string containing a valid decimal value representing the mount of currency constituting the payment amount. This string must only contain an optional leading \"-\" to indicate a negative value, then one or more digits from 0 to 9, and an optional decimal point (\".\", regardless of locale) followed by at least one more digit. No whitespace is permitted. </dd> </dl> </dd> <dt id=\"label\"><a href=\"#label\"><code>label</code></a></dt> <dd> <p>A string specifying a human-readable name or description of the item or service being charged for. This may be displayed to the user by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>, depending on the design of the interface. </dd> <dt id=\"pending\"><a href=\"#pending\"><code>pending</code></a></dt> <dd> <p>A Boolean value which is <code>true</code> if the specified <code>amount</code> 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. </dd> </dl> </dd> <dt id=\"error\"><a href=\"#error\"><code>error</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>A string specifying an error message to present to the user*.* When calling <a href=\"$MDN_URL$/Web/API/PaymentRequestUpdateEvent/updateWith\" ><code>updateWith()</code></a>, including <code>error</code> in the updated data causes the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> to display the text as a general error message. For address-field specific errors, use the <code>shippingAddressErrors</code> field. </dd> <dt id=\"modifiers\"><a href=\"#modifiers\"><code>modifiers</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of objects, each describing a modifier for particular payment method identifiers, each with the following properties: <dl> <dt id=\"supportedmethods\"><a href=\"#supportedmethods\"><code>supportedMethods</code></a></dt> <dd> <p>A string that represents the payment method identifier. The payment method identifier only applies if the user selects this payment method. </dd> <dt id=\"total\"><a href=\"#total\"><code>total</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An object that overrides the <code>total</code> property of the <code>detailsPromise</code> parameter if this payment method is selected by the user. The property takes the same input with the <code>total</code> property of the <code>detailsPromise</code> parameter. </dd> <dt id=\"additionaldisplayitems\"><a href=\"#additionaldisplayitems\"><code>additionalDisplayItems</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of objects provide additional display items that are appended to the <code>displayItems</code> property of the <code>detailsPromise</code> parameter if this payment method is selected by the user. This property is commonly used to add a discount or surcharge line item indicating the reason for the different total amount for the selected payment method that the user agent may display. The property takes the same input with the <code>displayItems</code> property of the <code>detailsPromise</code> parameter. </dd> <dt id=\"data\"><a href=\"#data\"><code>data</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A serializable object that provides optional information that might be needed by the supported payment methods. </dd> </dl> <p>For example, you can use one to adjust the total payment amount based on the selected payment method (\"5% cash discount!\"). </dd> <dt id=\"shippingaddresserrors\"><a href=\"#shippingaddresserrors\"><code>shippingAddressErrors</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>An object which includes an error message for each property of the shipping address that could not be validated. </dd> <dt id=\"shippingoptions\"><a href=\"#shippingoptions\"><code>shippingOptions</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>An array of objects, each describing one available shipping option from which the user may choose. </dd> <dt id=\"total_2\"><a href=\"#total_2\"><code>total</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An object with the same properties as the objects in <code>displayItems</code> providing an updated total for the payment. Make sure this equals the sum of all of the items in <code>displayItems</code>. <em>This is not calculated automatically</em>. 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. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that eventually resolves with a <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a>.\n The promise is resolved when the user accepts the payment request (such as by clicking a\n \"Pay\" button in the browser's payment sheet).",
|
||
"throws": {
|
||
"AbortError DOMException": "Returned if the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> is already showing a payment panel. Only one payment panel may be visible at a time <em>across all documents loaded by the user agent</em>. <p>The promise is also rejected with <code>AbortError</code> if the user cancels the payment request.",
|
||
"InvalidStateError DOMException": "Returned if the same payment has already been shown for this request (its state is <code>interactive</code> because it is being shown already).",
|
||
"NotSupportedError DOMException": "Returned if the user agent does not support the payment methods specified when the <a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest</code></a> constructor was called.",
|
||
"SecurityError DOMException": "Returned if the call to <code>show()</code> was not in response to a user action, such as a <a href=\"$MDN_URL$/Web/API/Element/click_event\" ><code>click</code></a> or <a href=\"$MDN_URL$/Web/API/Element/keyup_event\" ><code>keyup</code></a> event. Other reasons a <code>SecurityError</code> may be thrown are at the discretion of the user agent, and may include situations such as too many calls to <code>show()</code> being made in a short time or <code>show()</code> being called while payment requests are blocked by parental controls."
|
||
}
|
||
},
|
||
"paymentrequestevent": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PaymentRequestEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Handler_API\">Payment Handler API</a> is the object passed to a payment handler when a <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> is made."
|
||
},
|
||
"paymentrequestevent.changepaymentmethod": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/changepaymentmethod",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>changePaymentMethod()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface is used by the payment handler to get an updated total, given such payment method details as the billing address.\n<p>When this method is invoked, a <a href=\"$MDN_URL$/Web/API/PaymentMethodChangeEvent\"><code>PaymentMethodChangeEvent</code></a> is fired.",
|
||
"parameters": {
|
||
"methodName": "The name of the payment method to be used.",
|
||
"methodDetails": "An object containing method-specific details that are being updated."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a <code>PaymentRequestDetailsUpdate</code> object. This object contains the following properties:\n<dl>\n <dt id=\"error\"><a href=\"#error\"><code>error</code></a></dt>\n <dd>\n <p>A string that explains why the user-selected payment method cannot be used.\n </dd>\n <dt id=\"total\"><a href=\"#total\"><code>total</code></a></dt>\n <dd>\n <p>An updated total based on the changed payment method. The total can change, for example, because the billing address of the payment method selected by the user changes the applicable sales tax.\n </dd>\n <dt id=\"modifiers\"><a href=\"#modifiers\"><code>modifiers</code></a></dt>\n <dd>\n <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <code>PaymentDetailsModifier</code> objects, whose properties are described in <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent/modifiers\"><code>PaymentRequestEvent.modifiers</code></a>.\n </dd>\n <dt id=\"paymentmethoderrors\"><a href=\"#paymentmethoderrors\"><code>paymentMethodErrors</code></a></dt>\n <dd>\n <p>An object containing validation errors for the payment method, if any.\n </dd>\n</dl>"
|
||
},
|
||
"paymentrequestevent.instrumentkey": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/instrumentKey",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>instrumentKey</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns a\n<code>PaymentInstrument</code> object reflecting the payment instrument selected by\nthe user or an empty string if the user has not registered or chosen a payment\ninstrument."
|
||
},
|
||
"paymentrequestevent.methoddata": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/methoddata",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>methodData</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns an array of\n<code>PaymentMethodData</code> objects containing payment method identifiers for the\npayment methods that the website accepts and any associated payment method-specific\ndata."
|
||
},
|
||
"paymentrequestevent.modifiers": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/modifiers",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>modifiers</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <code>PaymentDetailsModifier</code> objects containing modifiers for payment details."
|
||
},
|
||
"paymentrequestevent.openwindow": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/openwindow",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>openWindow()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface opens the specified URL in a new window, only if the given URL is on the same origin as the calling page. It returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a reference to a <a href=\"$MDN_URL$/Web/API/WindowClient\"><code>WindowClient</code></a>.",
|
||
"parameters": {
|
||
"url": "The URL to open in the new window. It must be on the same origin as the calling page."
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a reference to a\n <a href=\"$MDN_URL$/Web/API/WindowClient\"><code>WindowClient</code></a>."
|
||
},
|
||
"paymentrequestevent.paymentrequestevent": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/paymentrequestevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PaymentRequestEvent</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> object instance.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>paymentrequest</code>.",
|
||
"options": "An object that, in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/ExtendableEvent/ExtendableEvent\" ><code>ExtendableEvent()</code></a>, can have the following properties: <dl> <dt id=\"methoddata\"><a href=\"#methoddata\"><code>methodData</code></a></dt> <dd> <p>An array of <code>PaymentMethodData</code> objects (see <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent/methodData#value\"><code>methodData</code> > Value</a>) containing payment method identifiers for the payment methods that the website accepts and any associated payment method-specific data. </dd> <dt id=\"modifiers\"><a href=\"#modifiers\"><code>modifiers</code></a></dt> <dd> <p>An array of objects containing changes to payment details. </dd> <dt id=\"paymentrequestid\"><a href=\"#paymentrequestid\"><code>paymentRequestId</code></a></dt> <dd> <p>The ID of the <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object. </dd> <dt id=\"paymentrequestorigin\"><a href=\"#paymentrequestorigin\"><code>paymentRequestOrigin</code></a></dt> <dd> <p>The origin where the <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object was initialized. </dd> <dt id=\"toporigin\"><a href=\"#toporigin\"><code>topOrigin</code></a></dt> <dd> <p>The top-level origin where the <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object was initialized. </dd> <dt id=\"total\"><a href=\"#total\"><code>total</code></a></dt> <dd> <p>The total amount being requested for payment. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> object."
|
||
},
|
||
"paymentrequestevent.paymentrequestid": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/paymentrequestid",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>paymentRequestId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns the ID of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object."
|
||
},
|
||
"paymentrequestevent.paymentrequestorigin": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/paymentrequestorigin",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>paymentRequestOrigin</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns the origin where the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object was initialized."
|
||
},
|
||
"paymentrequestevent.respondwith": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/respondwith",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>respondWith()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface prevents the default event handling and allows you to provide a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> for a <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> object yourself.",
|
||
"parameters": {
|
||
"promise": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a <code>PaymentHandlerResponse</code> object."
|
||
},
|
||
"returns": "A <code>PaymentHandlerResponse</code> object. This contains the following properties:\n<dl>\n <dt id=\"methodname\"><a href=\"#methodname\"><code>methodName</code></a></dt>\n <dd>\n <p>The payment method identifier for the payment method that the user selected to fulfill the transaction.\n </dd>\n <dt id=\"details\"><a href=\"#details\"><code>details</code></a></dt>\n <dd>\n <p>A JSON-serializable object that provides a payment method-specific message used by the merchant to process the transaction and determine a successful fund transfer. See <a href=\"https://w3c.github.io/payment-handler/#details-attribute\" class=\"external\" target=\"_blank\">7.1.2 details attribute</a> for more details.\n </dd>\n</dl>"
|
||
},
|
||
"paymentrequestevent.toporigin": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/toporigin",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>topOrigin</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns the top-level payee origin where\nthe <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> object was initialized."
|
||
},
|
||
"paymentrequestevent.total": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestevent/total",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "70",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "79",
|
||
"Opera": "57"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>total</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent\"><code>PaymentRequestEvent</code></a> interface returns a\n<code>PaymentCurrencyAmount</code> object containing the total amount being requested for payment."
|
||
},
|
||
"paymentrequestupdateevent": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestupdateevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentRequestUpdateEvent</code></strong> interface is used for events sent to a <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> instance when changes are made to shipping-related information for a pending <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a>. Those events are:\n<dl>\n<dt id=\"shippingaddresschange\"><a href=\"$MDN_URL$/Web/API/PaymentRequest/shippingaddresschange_event\" ><code>shippingaddresschange</code></a></dt>\n<dd>\n<p>Dispatched whenever the user changes their shipping address.\n</dd>\n<dt id=\"shippingoptionchange\"><a href=\"$MDN_URL$/Web/API/PaymentRequest/shippingoptionchange_event\" ><code>shippingoptionchange</code></a></dt>\n<dd>\n<p>Dispatched whenever the user changes a shipping option.\n</dd>\n</dl>"
|
||
},
|
||
"paymentrequestupdateevent.paymentrequestupdateevent": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestupdateevent/paymentrequestupdateevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentRequestUpdateEvent()</code></strong> constructor creates a new\n<a href=\"$MDN_URL$/Web/API/PaymentRequestUpdateEvent\"><code>PaymentRequestUpdateEvent</code></a> object which enables a web page to update the\ndetails of a <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> in response to a user action. Actual updates\nare made by passing options to the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestUpdateEvent/updateWith\" ><code>updateWith()</code></a> method.",
|
||
"returns": "A new <code>PaymentRequestUpdateEvent</code>."
|
||
},
|
||
"paymentrequestupdateevent.updatewith": {
|
||
"url": "$MDN_URL$/web/api/paymentrequestupdateevent/updatewith",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>updateWith()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequestUpdateEvent\"><code>PaymentRequestUpdateEvent</code></a> interface updates the details of an existing\n<a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a>.",
|
||
"parameters": {
|
||
"details": "An object specifying the changes applied to the payment request: <dl> <dt id=\"displayitems\"><a href=\"#displayitems\"><code>displayItems</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An array of objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice, each with the following properties: <dl> <dt id=\"amount\"><a href=\"#amount\"><code>amount</code></a></dt> <dd> <p>An object describing the monetary value of the item. This object includes the following fields: <dl> <dt id=\"currency\"><a href=\"#currency\"><code>currency</code></a></dt> <dd> <p>A string containing a valid 3-letter <a href=\"https://www.iso.org/iso-4217-currency-codes.html\" class=\"external\" target=\"_blank\">ISO 4217</a> currency identifier (<a href=\"https://en.wikipedia.org/wiki/ISO_4217\" class=\"external\" target=\"_blank\">ISO 4217</a>) indicating the currency used for the payment <code>value</code>. </dd> <dt id=\"value\"><a href=\"#value\"><code>value</code></a></dt> <dd> <p>A string containing a valid decimal value representing the mount of currency constituting the payment amount. This string must only contain an optional leading \"-\" to indicate a negative value, then one or more digits from 0 to 9, and an optional decimal point (\".\", regardless of locale) followed by at least one more digit. No whitespace is permitted. </dd> </dl> </dd> <dt id=\"label\"><a href=\"#label\"><code>label</code></a></dt> <dd> <p>A string specifying a human-readable name or description of the item or service being charged for. This may be displayed to the user by the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>, depending on the design of the interface. </dd> <dt id=\"pending\"><a href=\"#pending\"><code>pending</code></a></dt> <dd> <p>A Boolean value which is <code>true</code> if the specified <code>amount</code> 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. </dd> </dl> </dd> <dt id=\"error\"><a href=\"#error\"><code>error</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>A string specifying an error message to present to the user*.* When calling <code>updateWith()</code>, including <code>error</code> in the updated data causes the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> to display the text as a general error message. For address field-specific errors, use the <code>shippingAddressErrors</code> field. </dd> <dt id=\"modifiers\"><a href=\"#modifiers\"><code>modifiers</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <code>PaymentDetailsModifier</code> objects, whose properties are described in <a href=\"$MDN_URL$/Web/API/PaymentRequestEvent/modifiers\"><code>PaymentRequestEvent.modifiers</code></a>. <p>For example, you can use one to adjust the total payment amount based on the selected payment method (\"5% cash discount!\"). </dd> <dt id=\"shippingaddresserrors\"><a href=\"#shippingaddresserrors\"><code>shippingAddressErrors</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>An object which includes an error message for each property of the shipping address that could not be validated. </dd> <dt id=\"shippingoptions\"><a href=\"#shippingoptions\"><code>shippingOptions</code></a> <span class=\"badge inline optional\">Optional</span> </dt> <dd> <p>An array of objects, each describing one available shipping option from which the user may choose. </dd> <dt id=\"total\"><a href=\"#total\"><code>total</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An object with the same properties as the objects in <code>displayItems</code> providing an updated total for the payment. Make sure this equals the sum of all of the items in <code>displayItems</code>. <em>This is not calculated automatically</em>. 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. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"paymentresponse": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PaymentResponse</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API</a> is returned after a user selects a payment method and approves a payment request."
|
||
},
|
||
"paymentresponse.complete": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/complete",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a> method\n<strong><code>complete()</code></strong> of the <a href=\"$MDN_URL$/Web/API/Payment_Request_API\">Payment Request API</a> notifies the\n<a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> that the user interaction is over, and causes any remaining\nuser interface to be closed.\n<p>This method must be called after the user accepts\nthe payment request and the <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> returned by the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/show\"><code>PaymentRequest.show()</code></a> method is resolved.",
|
||
"parameters": {
|
||
"result": "A string indicating the state of the payment operation upon completion. It must be one of the following: <dl> <dt id=\"success\"><a href=\"#success\"><code>success</code></a></dt> <dd> <p>The payment was successfully processed. The user agent may or may not present some form of \"payment successful\" indication to the user. </dd> <dt id=\"fail\"><a href=\"#fail\"><code>fail</code></a></dt> <dd> <p>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. </dd> <dt id=\"unknown\"><a href=\"#unknown\"><code>unknown</code></a></dt> <dd> <p>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. <em>This is the default value.</em> </dd> </dl> <div class=\"notecard note\" id=\"sect2\"> <p><strong>Note:</strong> In older versions of the specification, an empty string, <code>\"\"</code>, was used instead of <code>unknown</code> to indicate a completion without a known result state. See the <a href=\"#browser_compatibility\">Browser compatibility</a> section below for details. </div>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves with no input value once the payment interface\n has been fully closed. If an error occurs, the promise instead rejects, returning one of\n the exceptions listed below.",
|
||
"throws": {
|
||
"AbortError DOMException": "Returned if the document in which the payment request is taking place became inactive while the user interface was shown.",
|
||
"InvalidStateError DOMException": "Returned if the payment has already completed, or <code>complete()</code> 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."
|
||
}
|
||
},
|
||
"paymentresponse.details": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/details",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>details</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface returns a JSON-serializable object that\nprovides a payment method specific message used by the merchant to process the\ntransaction and determine a successful funds transfer.\n<p>This data is returned by the payment app that satisfies the payment request. Developers need to consult whomever controls the URL for the expected shape of the details object."
|
||
},
|
||
"paymentresponse.methodname": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/methodname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>methodName</code></strong> read-only\nproperty of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface returns a string uniquely\nidentifying the payment handler selected by the user.\n<p>This string may be either\none of the standardized payment method identifiers or a URL used by the payment handler\nto process payments."
|
||
},
|
||
"paymentresponse.payeremail": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/payeremail",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <code>payerEmail</code> read-only property of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a>\ninterface returns the email address supplied by the user. This option is only present\nwhen the <code>requestPayerEmail</code> option is set to <code>true</code> in the\n<a class=\"page-not-created\" ><code>PaymentOptions</code></a> object passed to the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest</code></a> constructor."
|
||
},
|
||
"paymentresponse.payername": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/payername",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "56",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>payerName</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface returns the name supplied by the user. This\noption is only present when the <code>requestPayerName</code> option is set to\n<code>true</code> in the options parameter of the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest()</code></a> constructor."
|
||
},
|
||
"paymentresponse.payerphone": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/payerphone",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <code>payerPhone</code> read-only property of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a>\ninterface returns the phone number supplied by the user. This option is only present\nwhen the <code>requestPayerPhone</code> option is set to <code>true</code> in the\n<a class=\"page-not-created\" ><code>PaymentOptions</code></a> object passed to the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest</code></a> constructor."
|
||
},
|
||
"paymentresponse.requestid": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/requestid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "16",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>requestId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface returns the free-form identifier supplied by\nthe <code>PaymentResponse()</code> constructor by details.id."
|
||
},
|
||
"paymentresponse.retry": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/retry",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "78",
|
||
"ChromeAndroid": "78",
|
||
"Edge": "79",
|
||
"Opera": "47",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface's\n<strong><code>retry()</code></strong> method makes it possible to ask the user to\nretry a payment after an error occurs during processing.\n<p>This lets your app\ngracefully deal with situations such as invalid shipping addresses or declined credit\ncards.",
|
||
"parameters": {
|
||
"errorFields": "An object, with the following properties: <dl> <dt id=\"error\"><a href=\"#error\"><code>error</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information. <code>error</code> can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values guide the user to errors in specific fields in the payment form. </dd> <dt id=\"paymentmethod\"><a href=\"#paymentmethod\">`paymentMethod </a><span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Any payment-method-specific errors which may have occurred. This object's contents will vary depending on the payment method used. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which is resolved when the payment is successfully completed.\n The promise is rejected with an appropriate exception value if the payment fails again.\n<p>Typically you will use this by calling <a href=\"$MDN_URL$/Web/API/PaymentRequest/show\" title=\"show()\"><code>show()</code></a>,\n then entering a loop or recursive function that checks the\n <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> for errors or other reasons to retry the payment request.\n If a retry is needed, the loop calls <code>retry()</code>, then loops back to check the\n response when it comes in. The loop exits only when the user either cancels the payment\n request or the request is successful.\n<p>See the <a href=\"#examples\">example</a> below for a thorough example, but the basic\n concept, in outline form, is:\n<ol>\n <li>\n Create a new <a href=\"$MDN_URL$/Web/API/PaymentRequest\"><code>PaymentRequest</code></a>\n (<code>new</code> <a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" title=\"PaymentRequest()\"><code>PaymentRequest()</code></a>)\n </li>\n <li>Display the payment request (<a href=\"$MDN_URL$/Web/API/PaymentRequest/show\"><code>PaymentRequest.show()</code></a></li>\n <li>\n If <code>show()</code> resolves, the returned <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a>\n describes the requested payment and the options chosen by the user. Continue with the following steps:\n <ol>\n <li>\n Validate the returned response; if there are any fields whose values are not\n acceptable, call the response's <a href=\"$MDN_URL$/Web/API/PaymentResponse/complete\" title=\"complete()\"><code>complete()</code></a> method with a value of <code>\"fail\"</code> to indicate failure.\n </li>\n <li>\n If the response's data is valid and acceptable, call\n <code>complete(\"success\")</code> to finalize the payment and process it.\n </li>\n </ol>\n </li>\n <li>\n If <code>show()</code> is rejected, the payment request failed, usually because\n either there's already one being processed, because the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a>\n doesn't support any of the specified payment methods, or because of a security issue.\n See the <a href=\"$MDN_URL$/Web/API/PaymentRequest/show#exceptions\">list of exceptions</a> for <code>show()</code> for further details. Call\n <code>complete(\"fail\")</code> to close the payment request.\n </li>\n</ol>\n<div class=\"code-example\"><div class=\"example-header\"><span class=\"language-name\">js</span></div><pre class=\"brush: js notranslate\"><code><span class=\"token keyword\">async</span> <span class=\"token keyword\">function</span> <span class=\"token function\">handlePayment</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n <span class=\"token keyword\">const</span> payRequest <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">PaymentRequest</span><span class=\"token punctuation\">(</span>methodData<span class=\"token punctuation\">,</span> details<span class=\"token punctuation\">,</span> options<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n <span class=\"token keyword\">try</span> <span class=\"token punctuation\">{</span>\n <span class=\"token keyword\">let</span> payResponse <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> payRequest<span class=\"token punctuation\">.</span><span class=\"token function\">show</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n <span class=\"token keyword\">while</span> <span class=\"token punctuation\">(</span><span class=\"token function\">validate</span><span class=\"token punctuation\">(</span>payResponse<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n <span class=\"token comment\">/* let the user edit the payment information,\n wait until they submit */</span>\n <span class=\"token keyword\">await</span> response<span class=\"token punctuation\">.</span><span class=\"token function\">retry</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n <span class=\"token punctuation\">}</span>\n <span class=\"token keyword\">await</span> payResponse<span class=\"token punctuation\">.</span><span class=\"token function\">complete</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"success\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n <span class=\"token punctuation\">}</span> <span class=\"token keyword\">catch</span> <span class=\"token punctuation\">(</span>err<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n <span class=\"token comment\">/* handle the exception */</span>\n <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span>\n</code></pre></div>"
|
||
},
|
||
"paymentresponse.shippingaddress": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/shippingaddress",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>shippingAddress</code></strong> read-only property of\nthe <code>PaymentRequest</code> interface returns a <a href=\"$MDN_URL$/Web/API/PaymentAddress\"><code>PaymentAddress</code></a> object\ncontaining the shipping address provided by the user."
|
||
},
|
||
"paymentresponse.shippingoption": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/shippingoption",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "53",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard deprecated\" id=\"sect2\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect3\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>shippingOption</code></strong> read-only property of\nthe <code>PaymentRequest</code> interface returns the ID attribute of the shipping\noption selected by the user. This option is only present when the\n<code>requestShipping</code> option is set to <code>true</code> in the\n<a class=\"page-not-created\" ><code>PaymentOptions</code></a> object passed to the\n<a href=\"$MDN_URL$/Web/API/PaymentRequest/PaymentRequest\" ><code>PaymentRequest</code></a> constructor."
|
||
},
|
||
"paymentresponse.tojson": {
|
||
"url": "$MDN_URL$/web/api/paymentresponse/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "15",
|
||
"Opera": "47",
|
||
"Safari": "11.1",
|
||
"SafariIOS": "11.3"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PaymentResponse\"><code>PaymentResponse</code></a> object."
|
||
},
|
||
"pbkdf2params": {
|
||
"url": "$MDN_URL$/web/api/pbkdf2params",
|
||
"doc": "The <strong><code>Pbkdf2Params</code></strong> dictionary of the <a href=\"$MDN_URL$/Web/API/Web_Crypto_API\">Web Crypto API</a> represents the object that should be passed as the <code>algorithm</code> parameter into <a href=\"$MDN_URL$/Web/API/SubtleCrypto/deriveKey\"><code>SubtleCrypto.deriveKey()</code></a>, when using the <a href=\"$MDN_URL$/Web/API/SubtleCrypto/deriveKey#pbkdf2\">PBKDF2</a> algorithm."
|
||
},
|
||
"performance": {
|
||
"url": "$MDN_URL$/web/api/performance",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9",
|
||
"Deno": ""
|
||
},
|
||
"doc": "The <strong><code>Performance</code></strong> interface provides access to performance-related information for the current page.\n<p>An object of this type can be obtained by calling <code>window.performance</code> or <code>self.performance</code> in workers. Note that Performance entries are per context. If you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa. See <a href=\"$MDN_URL$/Web/API/performance_property\"><code>self.performance</code></a> for which APIs are available in window and worker contexts."
|
||
},
|
||
"performance.clearmarks": {
|
||
"url": "$MDN_URL$/web/api/performance/clearmarks",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "29",
|
||
"ChromeAndroid": "29",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>clearMarks()</code></strong> method removes all or specific <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> objects from the browser's performance timeline.",
|
||
"parameters": {
|
||
"name": "A string representing the <a href=\"$MDN_URL$/Web/API/PerformanceEntry/name\" ><code>name</code></a> of the <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> object. If this argument is omitted, all entries with an <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> of \"<code>mark</code>\" will be removed."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performance.clearmeasures": {
|
||
"url": "$MDN_URL$/web/api/performance/clearmeasures",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "29",
|
||
"ChromeAndroid": "29",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "16.7.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>clearMeasures()</code></strong> method removes all or specific <a href=\"$MDN_URL$/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a> objects from the browser's performance timeline.",
|
||
"parameters": {
|
||
"name": "A string representing the <a href=\"$MDN_URL$/Web/API/PerformanceEntry/name\" ><code>name</code></a> of the <a href=\"$MDN_URL$/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a> object. If this argument is omitted, all entries with an <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> of \"<code>measure</code>\" will be removed."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performance.clearresourcetimings": {
|
||
"url": "$MDN_URL$/web/api/performance/clearresourcetimings",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "46",
|
||
"ChromeAndroid": "46",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>clearResourceTimings()</code></strong> method removes all performance entries with an <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> of \"<code>resource</code>\" from the browser's performance timeline and sets the size of the performance resource data buffer to zero.\n<p>To set the size of the browser's performance resource data buffer, use the\n<a href=\"$MDN_URL$/Web/API/Performance/setResourceTimingBufferSize\"><code>Performance.setResourceTimingBufferSize()</code></a> method.\n<p>To get notified when the browser's resource timing buffer is full, listen for the <a href=\"$MDN_URL$/Web/API/Performance/resourcetimingbufferfull_event\" ><code>resourcetimingbufferfull</code></a> event.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performance.eventcounts": {
|
||
"url": "$MDN_URL$/web/api/performance/eventcounts",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "85",
|
||
"ChromeAndroid": "85",
|
||
"Edge": "85",
|
||
"Firefox": "89",
|
||
"Opera": "71"
|
||
},
|
||
"doc": "The read-only <code>performance.eventCounts</code> property is an <a href=\"$MDN_URL$/Web/API/EventCounts\"><code>EventCounts</code></a> map containing the number of events which have been dispatched per event type.\n<p>Not all event types are exposed. You can only get counts for event types supported by the <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a> interface."
|
||
},
|
||
"performance.getentries": {
|
||
"url": "$MDN_URL$/web/api/performance/getentries",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "16.7.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>getEntries()</code></strong> method returns an array of all <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects currently present in the performance timeline.\n<p>If you are only interested in performance entries of certain types or that have certain names, see <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByType\" ><code>getEntriesByType()</code></a> and <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByName\" ><code>getEntriesByName()</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method does not notify you about new performance entries; you will only get entries that are present in the performance timeline at the time you call this method.\nTo receive notifications about entries as they become available, use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a>.\n</div>\n<p>The following entry types are not supported by this method at all and won't be returned even if entries for these types might exist:\n<ul>\n<li><code>\"element\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a>)</li>\n<li><code>\"event\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a>)</li>\n<li><code>\"largest-contentful-paint\"</code> (<a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a>)</li>\n<li><code>\"layout-shift\"</code> (<a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a>)</li>\n<li><code>\"longtask\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a>)</li>\n</ul>\n<p>To access entries of these types, you must use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> instead.",
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects. The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>."
|
||
},
|
||
"performance.getentriesbyname": {
|
||
"url": "$MDN_URL$/web/api/performance/getentriesbyname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "16.7.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>getEntriesByName()</code></strong> method returns an array of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects currently present in the performance timeline with the given <em>name</em> and <em>type</em>.\n<p>If you are interested in performance entries of certain types, see <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByType\" ><code>getEntriesByType()</code></a>. For all performance entries, see <a href=\"$MDN_URL$/Web/API/Performance/getEntries\" ><code>getEntries()</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method does not notify you about new performance entries; you will only get entries that are present in the performance timeline at the time you call this method.\nTo receive notifications about entries as they become available, use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a>.\n</div>\n<p>The following entry types are not supported by this method at all and won't be returned even if entries for these types might exist:\n<ul>\n<li><code>\"element\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a>)</li>\n<li><code>\"event\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a>)</li>\n<li><code>\"largest-contentful-paint\"</code> (<a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a>)</li>\n<li><code>\"layout-shift\"</code> (<a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a>)</li>\n<li><code>\"longtask\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a>)</li>\n</ul>\n<p>To access entries of these types, you must use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> instead.",
|
||
"parameters": {
|
||
"name": "The name of the entries to retrieve.",
|
||
"type": "The type of entries to retrieve such as \"<code>mark</code>\". The valid entry types are listed in <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a>."
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects that have the specified <code>name</code> and <code>type</code>.\n The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>. If no objects meet the\n specified criteria, an empty array is returned."
|
||
},
|
||
"performance.getentriesbytype": {
|
||
"url": "$MDN_URL$/web/api/performance/getentriesbytype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "16.7.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>getEntriesByType()</code></strong> method returns an array of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects currently present in the performance timeline for a given <em>type</em>.\n<p>If you are interested in performance entries of certain name, see <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByName\" ><code>getEntriesByName()</code></a>. For all performance entries, see <a href=\"$MDN_URL$/Web/API/Performance/getEntries\" ><code>getEntries()</code></a>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This method does not notify you about new performance entries; you will only get entries that are present in the performance timeline at the time you call this method.\nTo receive notifications about entries as they become available, use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a>.\n</div>\n<p>The following entry types are not supported by this method at all and won't be returned even if entries for these types might exist:\n<ul>\n<li><code>\"element\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a>)</li>\n<li><code>\"event\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a>)</li>\n<li><code>\"largest-contentful-paint\"</code> (<a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a>)</li>\n<li><code>\"layout-shift\"</code> (<a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a>)</li>\n<li><code>\"longtask\"</code> (<a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a>)</li>\n</ul>\n<p>To access entries of these types, you must use a <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> instead.",
|
||
"parameters": {
|
||
"type": "The type of entry to retrieve such as \"<code>mark</code>\". The valid entry types are listed in <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a>. The supported <code>entryTypes</code> can be retrieved using the static property <a href=\"$MDN_URL$/Web/API/PerformanceObserver/supportedEntryTypes_static\" ><code>PerformanceObserver.supportedEntryTypes</code></a>."
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects that have the specified <code>type</code>. The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>. If no objects have the specified <code>type</code>, or no argument is provided, an empty array is returned."
|
||
},
|
||
"performance.mark": {
|
||
"url": "$MDN_URL$/web/api/performance/mark",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>mark()</code></strong> method creates a named <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> object representing a high resolution timestamp marker in the browser's performance timeline.",
|
||
"parameters": {
|
||
"name": "A string representing the name of the mark. Must not be the same name as one of the properties of the deprecated <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> interface.",
|
||
"markOptions": "An object for specifying a timestamp and additional metadata for the mark. <dl> <dt id=\"detail\"><a href=\"#detail\"><code>detail</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Arbitrary metadata to include in the mark. Defaults to <code>null</code>. Must be <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a>. </dd> <dt id=\"starttime\"><a href=\"#starttime\"><code>startTime</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p><a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> to use as the mark time. Defaults to <a href=\"$MDN_URL$/Web/API/Performance/now\"><code>performance.now()</code></a>. </dd> </dl>"
|
||
},
|
||
"returns": "The <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> entry that was created."
|
||
},
|
||
"performance.measure": {
|
||
"url": "$MDN_URL$/web/api/performance/measure",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>measure()</code></strong> method creates a named <a href=\"$MDN_URL$/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a> object representing a time measurement between two marks in the browser's performance timeline.\n<p>When measuring between two marks, there is a <em>start mark</em> and <em>end mark</em>, respectively.\nThe named timestamp is referred to as a <em>measure</em>.",
|
||
"parameters": {
|
||
"measureName": "A string representing the name of the measure.",
|
||
"measureOptions": "An object that may contain measure options. <dl> <dt id=\"detail\"><a href=\"#detail\"><code>detail</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Arbitrary metadata to be included in the measure. Defaults to <code>null</code>. Must be <a href=\"$MDN_URL$/Web/API/Web_Workers_API/Structured_clone_algorithm\">structured-cloneable</a>. </dd> <dt id=\"start\"><a href=\"#start\"><code>start</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Timestamp (<a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a>) to be used as the start time, or string that names a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> to use for the start time. <p>If this is a string naming a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a>, then it is defined in the same way as <code>startMark</code>. </dd> <dt id=\"duration\"><a href=\"#duration\"><code>duration</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Duration (in milliseconds) between the start and end mark times. If omitted, this defaults to <a href=\"$MDN_URL$/Web/API/Performance/now\"><code>performance.now()</code></a>; the time that has elapsed since the context was created. If provided, you must also specify either <code>start</code> or <code>end</code> but not both. </dd> <dt id=\"end\"><a href=\"#end\"><code>end</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Timestamp (<a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a>) to be used as the end time, or string that names a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> to use for the end time. <p>If this is a string naming a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a>, then it is defined in the same way as <code>endMark</code>. </dd> </dl>",
|
||
"startMark": "A string naming a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> in the performance timeline. The <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\"><code>PerformanceEntry.startTime</code></a> property of this mark will be used for calculating the measure.",
|
||
"endMark": "A string naming a <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> in the performance timeline. The <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\"><code>PerformanceEntry.startTime</code></a> property of this mark will be used for calculating the measure. If you want to pass this argument, you must also pass either <code>startMark</code> or an empty <code>measureOptions</code> object."
|
||
},
|
||
"returns": "The <a href=\"$MDN_URL$/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a> entry that was created.\n<p>The returned <em>measure</em> will have the following property values:\n<ul>\n <li><a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" title=\"entryType\"><code>entryType</code></a> - set to \"<code>measure</code>\".</li>\n <li><a href=\"$MDN_URL$/Web/API/PerformanceEntry/name\" title=\"name\"><code>name</code></a> - set to the \"<code>name</code>\" argument.</li>\n <li><a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a> - set to:\n <ul>\n <li>a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" title=\"timestamp\"><code>timestamp</code></a>, if specified in <code>measureOptions.start</code>.</li>\n <li>the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" title=\"timestamp\"><code>timestamp</code></a> of a start mark, if specified in <code>measureOptions.start</code> or <code>startMark</code></li>\n <li>a timestamp calculated from the <code>measureOptions.end</code> and <code>measureOptions.duration</code> (if <code>measureOptions.start</code> was not specified)</li>\n <li>0, if it isn't specified and can't be determined from other values.</li>\n </ul>\n </li>\n <li>\n <a href=\"$MDN_URL$/Web/API/PerformanceEntry/duration\" title=\"duration\"><code>duration</code></a> - set to a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> that is the duration of the measure calculated by subtracting the <code>startTime</code> from the end timestamp.\n The end timestamp is one of:\n <ul>\n <li>a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" title=\"timestamp\"><code>timestamp</code></a>, if specified in <code>measureOptions.end</code>.</li>\n <li>the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" title=\"timestamp\"><code>timestamp</code></a> of an end mark, if one is specified in <code>measureOptions.end</code> or <code>endMark</code></li>\n <li>a timestamp calculated from the <code>measureOptions.start</code> and <code>measureOptions.duration</code> (if <code>measureOptions.end</code> was not specified)</li>\n <li>the value returned by <a href=\"$MDN_URL$/Web/API/Performance/now\"><code>Performance.now()</code></a>, if no end mark is specified or can be determined from other values.</li>\n </ul>\n </li>\n <li><a href=\"$MDN_URL$/Web/API/PerformanceMeasure\" title=\"detail\"><code>detail</code></a> - set to the value passed in <code>measureOptions</code>.</li>\n</ul>",
|
||
"throws": {
|
||
"TypeError": "This can be thrown in any case where the start, end or duration might be ambiguous: <ul> <li>Both <code>endMark</code> and <code>measureOptions</code> are specified.</li> <li><code>measureOptions</code> is specified with <code>duration</code> but without specifying either <code>start</code> or <code>end</code>.</li> <li><code>measureOptions</code> is specified with all of <code>start</code>, <code>end</code>, and <code>duration</code>.</li> </ul>",
|
||
"SyntaxError DOMException": "The named mark does not exist. <ul> <li>An end mark is specified using either <code>endMark</code> or <code>measureOptions.end</code>, but there is no <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> in the performance buffer with the matching name.</li> <li>An end mark is specified using either <code>endMark</code> or <code>measureOptions.end</code>, but it cannot be converted to match that of a read only attribute in the <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> interface.</li> <li>A start mark is specified using either <code>startMark</code> or <code>measureOptions.start</code>, but there is no <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> in the performance buffer with the matching name.</li> <li>A start mark is specified using either <code>startMark</code> or <code>measureOptions.start</code>, but it cannot be converted to match that of a read only attribute in the <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> interface.</li> </ul>",
|
||
"DataCloneError DOMException": "The <code>measureOptions.detail</code> value is non-<code>null</code> and cannot be serialized using the HTML \"StructuredSerialize\" algorithm.",
|
||
"RangeError": "The <code>measureOptions.detail</code> value is non-<code>null</code> and memory cannot be allocated during serialization using the HTML \"StructuredSerialize\" algorithm."
|
||
}
|
||
},
|
||
"performance.measureuseragentspecificmemory": {
|
||
"url": "$MDN_URL$/web/api/performance/measureuseragentspecificmemory",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "89",
|
||
"ChromeAndroid": "89",
|
||
"Edge": "89",
|
||
"Opera": "75"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>measureUserAgentSpecificMemory()</code></strong> method is used to estimate the memory usage of a web application including all its iframes and workers.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to an object containing the following properties:\n<dl>\n <dt id=\"bytes\"><a href=\"#bytes\"><code>bytes</code></a></dt>\n <dd>\n <p>A number representing the total memory usage.\n </dd>\n <dt id=\"breakdown\"><a href=\"#breakdown\"><code>breakdown</code></a></dt>\n <dd>\n <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of objects partitioning the total <code>bytes</code> and providing attribution and type information. The object contains the following properties:\n <dl>\n <dt id=\"bytes_2\"><a href=\"#bytes_2\"><code>bytes</code></a></dt>\n <dd>\n <p>The size of the memory that this entry describes.\n </dd>\n <dt id=\"attribution\"><a href=\"#attribution\"><code>attribution</code></a></dt>\n <dd>\n <p>An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a> of container elements of the JavaScript realms that use the memory. This object has the following properties:\n <dl>\n <dt id=\"url\"><a href=\"#url\"><code>url</code></a></dt>\n <dd>\n <p>If this attribution corresponds to a same-origin JavaScript realm, then this property contains the realm's URL. Otherwise it is the string \"cross-origin-url\".\n </dd>\n <dt id=\"container\"><a href=\"#container\"><code>container</code></a></dt>\n <dd>\n <p>An object describing the DOM element that contains this JavaScript realm. This object has the following properties:\n <dl>\n <dt id=\"id\"><a href=\"#id\"><code>id</code></a></dt>\n <dd>\n <p>The <code>id</code> attribute of the container element.\n </dd>\n <dt id=\"src\"><a href=\"#src\"><code>src</code></a></dt>\n <dd>\n <p>The <code>src</code> attribute of the container element. If the container element is an <a href=\"$MDN_URL$/Web/HTML/Element/object\"><code><object></code></a> element, then this field contains the value of the <code>data</code> attribute.\n </dd>\n </dl>\n </dd>\n <dt id=\"scope\"><a href=\"#scope\"><code>scope</code></a></dt>\n <dd>\n <p>A string describing the type of the same-origin JavaScript realm. Either <code>\"Window\"</code>, <code>\"DedicatedWorkerGlobalScope\"</code>, <code>\"SharedWorkerGlobalScope\"</code>, <code>\"ServiceWorkerGlobalScope\"</code> or <code>\"cross-origin-aggregated\"</code> for the cross-origin case.\n </dd>\n </dl>\n </dd>\n <dt id=\"types\"><a href=\"#types\"><code>types</code></a></dt>\n <dd>\n <p>An array of implementation-defined memory types associated with the memory.\n </dd>\n </dl>\n </dd>\n</dl>\n<p>An example return value looks like this:\n<div class=\"code-example\"><div class=\"example-header\"><span class=\"language-name\">js</span></div><pre class=\"brush: js notranslate\"><code><span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">bytes</span><span class=\"token operator\">:</span> <span class=\"token number\">1500000</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">breakdown</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">bytes</span><span class=\"token operator\">:</span> <span class=\"token number\">1000000</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">attribution</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">url</span><span class=\"token operator\">:</span> <span class=\"token string\">\"https://example.com\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">scope</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Window\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">types</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"DOM\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"JS\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">bytes</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">attribution</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">types</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">bytes</span><span class=\"token operator\">:</span> <span class=\"token number\">500000</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">attribution</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">url</span><span class=\"token operator\">:</span> <span class=\"token string\">\"https://example.com/iframe.html\"</span>\n <span class=\"token literal-property property\">container</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> <span class=\"token string\">\"example-id\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">src</span><span class=\"token operator\">:</span> <span class=\"token string\">\"redirect.html?target=iframe.html\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">scope</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Window\"</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span>\n <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token literal-property property\">types</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"JS\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"DOM\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span>\n</code></pre></div>",
|
||
"throws": {
|
||
"SecurityError DOMException": "Thrown if the security requirements for preventing cross-origin information leaks aren't fulfilled."
|
||
}
|
||
},
|
||
"performance.memory": {
|
||
"url": "$MDN_URL$/web/api/performance/memory",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "7",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79",
|
||
"Opera": "15"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The non-standard and legacy <code>performance.memory</code> property returns the size of the JavaScript heap which can be helpful to measure and reduce the memory footprint of websites.\n<p>Note that the information this API provides is unreliable as it might overestimate actual memory usage if web pages share the same heap, or might underestimate actual memory usage if web pages use workers and/or cross-site iframes that are allocated in separate heaps. It is not standardized what \"heap\" means exactly. The API is only available in Chromium-based browsers.\n<p>A new API aiming to replace <code>performance.memory</code> is <a href=\"$MDN_URL$/Web/API/Performance/measureUserAgentSpecificMemory\"><code>Performance.measureUserAgentSpecificMemory()</code></a>. It tries to estimate the memory used by a web page."
|
||
},
|
||
"performance.navigation": {
|
||
"url": "$MDN_URL$/web/api/performance/navigation",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "10",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The legacy\n<strong><code>Performance.navigation</code></strong>\nread-only property returns a <a href=\"$MDN_URL$/Web/API/PerformanceNavigation\"><code>PerformanceNavigation</code></a> object representing\nthe type of navigation that occurs in the given browsing context, such as the number of\nredirections needed to fetch the resource.\n<p>This property is not available in workers.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the\n<a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>"
|
||
},
|
||
"performance.now": {
|
||
"url": "$MDN_URL$/web/api/performance/now",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "24",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "15",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": ""
|
||
},
|
||
"doc": "The <strong><code>performance.now()</code></strong> method returns a high resolution timestamp in milliseconds. It represents the time elapsed since <a href=\"$MDN_URL$/Web/API/Performance/timeOrigin\"><code>Performance.timeOrigin</code></a> (the time when navigation has started in window contexts, or the time when the worker is run in <a href=\"$MDN_URL$/Web/API/Worker\"><code>Worker</code></a> and <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a> contexts).",
|
||
"returns": "Returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> measured in milliseconds."
|
||
},
|
||
"performance.setresourcetimingbuffersize": {
|
||
"url": "$MDN_URL$/web/api/performance/setresourcetimingbuffersize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "46",
|
||
"ChromeAndroid": "46",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>setResourceTimingBufferSize()</code></strong> method sets the desired size of the browser's resource timing buffer which stores the \"<code>resource</code>\" performance entries.\n<p>The specification requires the resource timing buffer initially to be 250 or greater.\n<p>To clear the browser's performance resource data buffer, use the\n<a href=\"$MDN_URL$/Web/API/Performance/clearResourceTimings\"><code>Performance.clearResourceTimings()</code></a> method.\n<p>To get notified when the browser's resource timing buffer is full, listen for the <a href=\"$MDN_URL$/Web/API/Performance/resourcetimingbufferfull_event\" ><code>resourcetimingbufferfull</code></a> event.",
|
||
"parameters": {
|
||
"maxSize": "A <code>number</code> representing the maximum number of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" ><code>performance entry</code></a> objects the browser should hold in its performance entry buffer."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performance.timeorigin": {
|
||
"url": "$MDN_URL$/web/api/performance/timeorigin",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "62",
|
||
"ChromeAndroid": "62",
|
||
"Edge": "16",
|
||
"Firefox": "53",
|
||
"Opera": "49",
|
||
"Safari": "15",
|
||
"SafariIOS": "15",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.22"
|
||
},
|
||
"doc": "The <strong><code>timeOrigin</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n<p>In Window contexts, this value represents the time when navigation has started. In <a href=\"$MDN_URL$/Web/API/Worker\"><code>Worker</code></a> and <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a> contexts, this value represents the time when the worker is run. You can use this property to synchronize the time origins between the contexts (see example below).\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> The value of <code>performance.timeOrigin</code> may differ from the value returned by <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Date/now\"><code>Date.now()</code></a> executed at the time origin, because <code>Date.now()</code> may have been impacted by system and user clock adjustments, clock skew, etc. The <code>timeOrigin</code> property is a <a href=\"https://w3c.github.io/hr-time/#dfn-monotonic-clock\" class=\"external\" target=\"_blank\">monotonic clock</a> which current time never decreases and which isn't subject to these adjustments.\n</div>"
|
||
},
|
||
"performance.timing": {
|
||
"url": "$MDN_URL$/web/api/performance/timing",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The legacy\n<strong><code>Performance.timing</code></strong> read-only\nproperty returns a <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> object containing latency-related\nperformance information.\n<p>This property is not available in workers.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>"
|
||
},
|
||
"performance.tojson": {
|
||
"url": "$MDN_URL$/web/api/performance/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "56",
|
||
"ChromeAndroid": "56",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5",
|
||
"Nodejs": "16.1.0",
|
||
"Deno": "1.22"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> object.\n<p>The returned JSON doesn't contain the <a href=\"$MDN_URL$/Web/API/Performance/eventCounts\" title=\"eventCounts\"><code>eventCounts</code></a> property because it is of type <a href=\"$MDN_URL$/Web/API/EventCounts\"><code>EventCounts</code></a>, which doesn't provide a <code>toJSON()</code> operation.\n<div class=\"notecard note\" id=\"sect1\">\n <p><strong>Note:</strong> The JSON object contains the serialization of the deprecated <a href=\"$MDN_URL$/Web/API/Performance/timing\"><code>performance.timing</code></a> and <a href=\"$MDN_URL$/Web/API/Performance/navigation\"><code>performance.navigation</code></a> properties. To get a JSON representation of the newer <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface, call <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/toJSON\"><code>PerformanceNavigationTiming.toJSON()</code></a> instead.\n</div>"
|
||
},
|
||
"performance_property": {
|
||
"url": "$MDN_URL$/web/api/performance_property",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9",
|
||
"Deno": ""
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The global <strong><code>performance</code></strong> property returns a <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> object, which can be used to gather performance information about the context it is called in (window or worker).\n<p>Performance entries are per context. If you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa."
|
||
},
|
||
"performanceelementtiming": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PerformanceElementTiming</code></strong> interface contains render timing information for image and text node elements the developer annotated with an <a href=\"$MDN_URL$/Web/HTML/Attributes/elementtiming\"><code>elementtiming</code></a> attribute for observation."
|
||
},
|
||
"performanceelementtiming.element": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/element",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>element</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns an <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a> which is a pointer to the observed element."
|
||
},
|
||
"performanceelementtiming.id": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/id",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>id</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the <a href=\"$MDN_URL$/Web/HTML/Global_attributes#id\"><code>id</code></a> of the associated element."
|
||
},
|
||
"performanceelementtiming.identifier": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/identifier",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>identifier</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the value of the <a href=\"$MDN_URL$/Web/HTML/Attributes/elementtiming\"><code>elementtiming</code></a> attribute on the element."
|
||
},
|
||
"performanceelementtiming.intersectionrect": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/intersectionrect",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>intersectionRect</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the rectangle of the element within the viewport."
|
||
},
|
||
"performanceelementtiming.loadtime": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/loadtime",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>loadTime</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface always returns <code>0</code> for text. For images it returns the time which is the latest between the time the image resource is loaded and the time it is attached to the element."
|
||
},
|
||
"performanceelementtiming.naturalheight": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/naturalheight",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>naturalHeight</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the intrinsic height of the image element."
|
||
},
|
||
"performanceelementtiming.naturalwidth": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/naturalwidth",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>naturalWidth</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the intrinsic width of the image element."
|
||
},
|
||
"performanceelementtiming.rendertime": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/rendertime",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>renderTime</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the render time of the associated element."
|
||
},
|
||
"performanceelementtiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/tojson",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> object.\n<p>The JSON doesn't contain the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming/element\" title=\"element\"><code>element</code></a> property because it is of type <a href=\"$MDN_URL$/Web/API/Element\"><code>Element</code></a>, which doesn't provide a <code>toJSON()</code> operation. The <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming/id\" title=\"id\"><code>id</code></a> of the element is provided, though."
|
||
},
|
||
"performanceelementtiming.url": {
|
||
"url": "$MDN_URL$/web/api/performanceelementtiming/url",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>url</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceElementTiming\"><code>PerformanceElementTiming</code></a> interface returns the initial URL of the resource request when the element is an image."
|
||
},
|
||
"performanceentry": {
|
||
"url": "$MDN_URL$/web/api/performanceentry",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "46",
|
||
"ChromeAndroid": "46",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>PerformanceEntry</code></strong> object encapsulates a single performance metric that is part of the browser's performance timeline.\n<p>The Performance API offers built-in metrics which are specialized subclasses of <code>PerformanceEntry</code>. This includes entries for resource loading, event timing, <a href=\"$MDN_URL$/Glossary/First_input_delay\">first input delay</a> (FID), and more.\n<p>A performance entry can also be created by calling the <a href=\"$MDN_URL$/Web/API/Performance/mark\"><code>Performance.mark()</code></a> or <a href=\"$MDN_URL$/Web/API/Performance/measure\"><code>Performance.measure()</code></a> methods at an explicit point in an application. This allows you to add your own metrics to the performance timeline.\n<p>The <code>PerformanceEntry</code> instances will always be one of the following subclasses:\n<ul>\n<li><a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/LayoutShift\"><code>LayoutShift</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceMeasure\"><code>PerformanceMeasure</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformancePaintTiming\"><code>PerformancePaintTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/TaskAttributionTiming\"><code>TaskAttributionTiming</code></a></li>\n<li><a href=\"$MDN_URL$/Web/API/VisibilityStateEntry\"><code>VisibilityStateEntry</code></a></li>\n</ul>"
|
||
},
|
||
"performanceentry.duration": {
|
||
"url": "$MDN_URL$/web/api/performanceentry/duration",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The read-only <strong><code>duration</code></strong> property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" >timestamp</a> that is the duration of the <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a>. The meaning of this property depends on the value of this entry's <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a>."
|
||
},
|
||
"performanceentry.entrytype": {
|
||
"url": "$MDN_URL$/web/api/performanceentry/entrytype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The read-only <strong><code>entryType</code></strong> property returns a string representing the type of performance metric that this entry represents.\n<p>All supported <code>entryTypes</code> are available using the static property <a href=\"$MDN_URL$/Web/API/PerformanceObserver/supportedEntryTypes_static\" ><code>PerformanceObserver.supportedEntryTypes</code></a>."
|
||
},
|
||
"performanceentry.name": {
|
||
"url": "$MDN_URL$/web/api/performanceentry/name",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The read-only <strong><code>name</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> interface is a string representing the name for a performance entry. It acts as an identifier, but it does not have to be unique. The value depends on the subclass."
|
||
},
|
||
"performanceentry.starttime": {
|
||
"url": "$MDN_URL$/web/api/performanceentry/starttime",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "35",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The read-only <strong><code>startTime</code></strong> property returns the first <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" >timestamp</a> recorded for this <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a>. The meaning of this property depends on the value of this entry's <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a>."
|
||
},
|
||
"performanceentry.tojson": {
|
||
"url": "$MDN_URL$/web/api/performanceentry/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "45",
|
||
"ChromeAndroid": "45",
|
||
"Edge": "16",
|
||
"Firefox": "35",
|
||
"Opera": "32",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> object."
|
||
},
|
||
"performanceeventtiming": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "The <code>PerformanceEventTiming</code> interface of the Event Timing API provides insights into the latency of certain event types triggered by user interaction."
|
||
},
|
||
"performanceeventtiming.cancelable": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/cancelable",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "The read-only <strong><code>cancelable</code></strong> property returns the associated event's <a href=\"$MDN_URL$/Web/API/Event/cancelable\"><code>cancelable</code></a> property, indicating whether the event can be canceled."
|
||
},
|
||
"performanceeventtiming.interactionid": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/interactionid",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "96",
|
||
"ChromeAndroid": "96",
|
||
"Edge": "96",
|
||
"Opera": "82"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The read-only <strong><code>interactionId</code></strong> property returns an ID that uniquely identifies a user interaction which triggered a series of associated events."
|
||
},
|
||
"performanceeventtiming.processingend": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/processingend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "The read-only <strong><code>processingEnd</code></strong> property returns the time the last event handler finished executing.\n<p>It's equal to <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming/processingStart\"><code>PerformanceEventTiming.processingStart</code></a> when there are no such event handlers."
|
||
},
|
||
"performanceeventtiming.processingstart": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/processingstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "The read-only <strong><code>processingStart</code></strong> property returns the time at which event dispatch started. This is when event handlers are about to be executed."
|
||
},
|
||
"performanceeventtiming.target": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/target",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "85",
|
||
"ChromeAndroid": "85",
|
||
"Edge": "85",
|
||
"Firefox": "89",
|
||
"Opera": "71"
|
||
},
|
||
"doc": "The read-only <strong><code>target</code></strong> property returns the associated event's last <a href=\"$MDN_URL$/Web/API/Event/target\"><code>target</code></a> which is the node onto which the event was last dispatched."
|
||
},
|
||
"performanceeventtiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performanceeventtiming/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "63"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a> object.\n<p>The JSON doesn't contain the <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming/target\" title=\"target\"><code>target</code></a> property because it is of type <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a>, which doesn't provide a <code>toJSON()</code> operation."
|
||
},
|
||
"performancelongtasktiming": {
|
||
"url": "$MDN_URL$/web/api/performancelongtasktiming",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "58",
|
||
"ChromeAndroid": "58",
|
||
"Edge": "79",
|
||
"Opera": "45"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PerformanceLongTaskTiming</code></strong> interface provides information about tasks that occupy the UI thread for 50 milliseconds or more."
|
||
},
|
||
"performancelongtasktiming.attribution": {
|
||
"url": "$MDN_URL$/web/api/performancelongtasktiming/attribution",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "58",
|
||
"ChromeAndroid": "58",
|
||
"Edge": "79",
|
||
"Opera": "45"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>attribution</code></strong> readonly property of the <a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a> interface returns an array of <a href=\"$MDN_URL$/Web/API/TaskAttributionTiming\"><code>TaskAttributionTiming</code></a> objects."
|
||
},
|
||
"performancelongtasktiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performancelongtasktiming/tojson",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "58",
|
||
"ChromeAndroid": "58",
|
||
"Edge": "79",
|
||
"Opera": "45"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceLongTaskTiming\"><code>PerformanceLongTaskTiming</code></a> object."
|
||
},
|
||
"performancemark": {
|
||
"url": "$MDN_URL$/web/api/performancemark",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "28",
|
||
"ChromeAndroid": "28",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "15",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "<strong><code>PerformanceMark</code></strong> is an interface for <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects with an <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> of \"<code>mark</code>\".\n<p>Entries of this type are typically created by calling <a href=\"$MDN_URL$/Web/API/Performance/mark\" ><code>performance.mark()</code></a> to add a <em>named</em> <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> (the <em>mark</em>) to the browser's performance timeline. To create a performance mark that isn't added to the browser's performance timeline, use the constructor.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"performancemark.detail": {
|
||
"url": "$MDN_URL$/web/api/performancemark/detail",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "78",
|
||
"ChromeAndroid": "78",
|
||
"Edge": "79",
|
||
"Firefox": "101",
|
||
"Opera": "65",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5",
|
||
"Nodejs": "16.0.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The read-only <strong><code>detail</code></strong> property returns arbitrary metadata that was included in the mark upon construction (either when using <a href=\"$MDN_URL$/Web/API/Performance/mark\" ><code>performance.mark()</code></a> or the <a href=\"$MDN_URL$/Web/API/PerformanceMark/PerformanceMark\" ><code>PerformanceMark()</code></a> constructor)."
|
||
},
|
||
"performancemark.performancemark": {
|
||
"url": "$MDN_URL$/web/api/performancemark/performancemark",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "76",
|
||
"ChromeAndroid": "76",
|
||
"Edge": "79",
|
||
"Firefox": "101",
|
||
"Opera": "63",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5",
|
||
"Nodejs": "16.0.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The <strong><code>PerformanceMark()</code></strong> constructor creates a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> with the given name.\n<p>Unlike <a href=\"$MDN_URL$/Web/API/Performance/mark\" ><code>performance.mark()</code></a>, performance marks created by the constructor aren't added to the browser's performance timeline. This means that calls to the <a href=\"$MDN_URL$/Web/API/Performance\"><code>Performance</code></a> interface's <code>getEntries*()</code> methods (<a href=\"$MDN_URL$/Web/API/Performance/getEntries\" ><code>getEntries()</code></a>, <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByName\" ><code>getEntriesByName()</code></a> or <a href=\"$MDN_URL$/Web/API/Performance/getEntriesByType\" ><code>getEntriesByType()</code></a>) won't show entries for these marks.",
|
||
"parameters": {
|
||
"name": "A string representing the name of the mark.",
|
||
"markOptions": "An object for specifying a timestamp and additional metadata for the mark. <dl> <dt id=\"detail\"><a href=\"#detail\"><code>detail</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>Arbitrary metadata to include in the mark. Defaults to <code>null</code>. </dd> <dt id=\"starttime\"><a href=\"#starttime\"><code>startTime</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p><a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> to use as the mark time. Defaults to <a href=\"$MDN_URL$/Web/API/Performance/now\"><code>performance.now()</code></a>. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/PerformanceMark\"><code>PerformanceMark</code></a> object."
|
||
},
|
||
"performancemeasure": {
|
||
"url": "$MDN_URL$/web/api/performancemeasure",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "25",
|
||
"ChromeAndroid": "25",
|
||
"Edge": "",
|
||
"Firefox": "38",
|
||
"Opera": "33",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "<strong><code>PerformanceMeasure</code></strong> is an <em>abstract</em> interface for <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects with an <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> of \"<code>measure</code>\". Entries of this type are created by calling <a href=\"$MDN_URL$/Web/API/Performance/measure\" ><code>performance.measure()</code></a> to add a <em>named</em> <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> (the <em>measure</em>) between two <em>marks</em> to the browser's <em>performance timeline</em>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>"
|
||
},
|
||
"performancemeasure.detail": {
|
||
"url": "$MDN_URL$/web/api/performancemeasure/detail",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "78",
|
||
"ChromeAndroid": "78",
|
||
"Edge": "79",
|
||
"Firefox": "103",
|
||
"Opera": "65",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5",
|
||
"Nodejs": "16.0.0",
|
||
"Deno": "1.2"
|
||
},
|
||
"doc": "The read-only <strong><code>detail</code></strong> property returns arbitrary metadata that was included in the mark upon construction (when using <a href=\"$MDN_URL$/Web/API/Performance/measure\" ><code>performance.measure()</code></a>."
|
||
},
|
||
"performancenavigation": {
|
||
"url": "$MDN_URL$/web/api/performancenavigation",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "10",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The legacy <strong><code>PerformanceNavigation</code></strong> interface represents information about how the navigation to the current document was done.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>.\nPlease use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>\n<p>An object of this type can be obtained by calling the <a href=\"$MDN_URL$/Web/API/Performance/navigation\"><code>Performance.navigation</code></a> read-only attribute."
|
||
},
|
||
"performancenavigation.redirectcount": {
|
||
"url": "$MDN_URL$/web/api/performancenavigation/redirectcount",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "10",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The legacy\n<strong><code>PerformanceNavigation.redirectCount</code></strong>\nread-only property returns an <code>unsigned short</code> representing the number of\nREDIRECTs done before reaching the page.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>.\nPlease use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>"
|
||
},
|
||
"performancenavigation.tojson": {
|
||
"url": "$MDN_URL$/web/api/performancenavigation/tojson",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "56",
|
||
"ChromeAndroid": "56",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "43",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigation\"><code>PerformanceNavigation</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigation\"><code>PerformanceNavigation</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigation\"><code>PerformanceNavigation</code></a> object."
|
||
},
|
||
"performancenavigation.type": {
|
||
"url": "$MDN_URL$/web/api/performancenavigation/type",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "10",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The legacy\n<strong><code>PerformanceNavigation.type</code></strong>\nread-only property returns an <code>unsigned short</code> containing a constant\ndescribing how the navigation to this page was done.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>.\nPlease use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>"
|
||
},
|
||
"performancenavigationtiming": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>PerformanceNavigationTiming</code></strong> interface provides methods and properties to store and retrieve metrics regarding the browser's document navigation events. For example, this interface can be used to determine how much time it takes to load or unload a document.\n<p>Only the current document is included in the performance timeline, so there is only one <code>PerformanceNavigationTiming</code> object in the performance timeline. It inherits all of the properties and methods of <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a> and <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a>.\n<p>The following diagram shows all of the timestamp properties defined in <code>PerformanceNavigationTiming</code>."
|
||
},
|
||
"performancenavigationtiming.activationstart": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/activationStart",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "108",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "108",
|
||
"Opera": "94"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>activationStart</code></strong> read-only property represents the time between when a document starts prerendering and when it is activated."
|
||
},
|
||
"performancenavigationtiming.domcomplete": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/domcomplete",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>domComplete</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately before the user agent sets the document's <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>readyState</code></a> to <code>\"complete\"</code>.\n<p>See also the <code>complete</code> state of <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>Document.readyState</code></a> which corresponds to this property and refers to the state in which the document and all sub-resources have finished loading. The state also indicates that the <a href=\"$MDN_URL$/Web/API/Window/load_event\" ><code>load</code></a> event is about to fire."
|
||
},
|
||
"performancenavigationtiming.domcontentloadedeventend": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/domcontentloadedeventend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>domContentLoadedEventEnd</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately after the current document's <a href=\"$MDN_URL$/Web/API/Document/DOMContentLoaded_event\"><code>DOMContentLoaded</code></a> event handler completes.\n<p>Typically frameworks and libraries wait for the <code>DOMContentLoaded</code> event before starting to run their code. We can use the <code>domContentLoadedEventEnd</code> and the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/domContentLoadedEventStart\"><code>domContentLoadedEventStart</code></a> properties to calculate how long this takes to run."
|
||
},
|
||
"performancenavigationtiming.domcontentloadedeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/domcontentloadedeventstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>domContentLoadedEventStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately before the current document's <a href=\"$MDN_URL$/Web/API/Document/DOMContentLoaded_event\"><code>DOMContentLoaded</code></a> event handler starts.\n<p>Typically frameworks and libraries wait for the <code>DOMContentLoaded</code> event before starting to run their code. We can use the <code>domContentLoadedEventStart</code> and the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/domContentLoadedEventEnd\"><code>domContentLoadedEventEnd</code></a> properties to calculate how long this takes to run."
|
||
},
|
||
"performancenavigationtiming.dominteractive": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/dominteractive",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>domInteractive</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately before the user agent sets the document's <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>readyState</code></a> to <code>\"interactive\"</code>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This property is <strong>not</strong> <a href=\"$MDN_URL$/Glossary/Time_to_interactive\">Time to interactive</a> (TTI). This property refers to the time when DOM construction is finished and interaction to it from JavaScript is possible. See also the <code>interactive</code> state of <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>Document.readyState</code></a> which corresponds to this property.\n</div>\n<p>Measuring DOM processing time may not be consequential unless your site has a very large HTML source to a construct a Document Object Model from.\n<p>If there is no parser-blocking JavaScript then the <a href=\"$MDN_URL$/Web/API/Document/DOMContentLoaded_event\"><code>DOMContentLoaded</code></a> event (see <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/domContentLoadedEventStart\"><code>domContentLoadedEventStart</code></a> for the timestamp) will fire immediately after <code>domInteractive</code>."
|
||
},
|
||
"performancenavigationtiming.loadeventend": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/loadeventend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>loadEventEnd</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately after the current document's <a href=\"$MDN_URL$/Web/API/Window/load_event\"><code>load</code></a> event handler completes."
|
||
},
|
||
"performancenavigationtiming.loadeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/loadeventstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>loadEventStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately before the current document's <a href=\"$MDN_URL$/Web/API/Window/load_event\"><code>load</code></a> event handler starts."
|
||
},
|
||
"performancenavigationtiming.redirectcount": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/redirectcount",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>redirectCount</code></strong> read-only property returns a number representing the number of redirects since the last non-redirect navigation in the current browsing context.\n<p>The higher the number of redirects on a page, the longer the page load time. To improve the performance of your web page, avoid multiple redirects.\n<p>The <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming/redirectStart\" ><code>redirectStart</code></a> and <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming/redirectEnd\" ><code>redirectEnd</code></a> properties can be used to measure redirection time. Note that they will return <code>0</code> for cross-origin redirects.\n<p>Note that client side redirects, such as <code><meta http-equiv=\"refresh\" content=\"0; url=https://example.com/\"></code> are not considered here."
|
||
},
|
||
"performancenavigationtiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "16",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> object."
|
||
},
|
||
"performancenavigationtiming.type": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/type",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>type</code></strong> read-only property returns the type of navigation.\n<p>You can use this property to categorize your navigation timing data as each of these types will have different performance characteristics. Users going back and forth might experience a faster site than users performing navigation for the first time or submitting forms, etc.\n<p>For example, if your site provides new content frequently, you might want to refresh that content using <a href=\"$MDN_URL$/Web/API/Fetch_API\">Fetch</a> or similar and avoid users having to hit reload for the entire page all the time. The <code>\"reload\"</code> type can help you find pages that are reloaded frequently."
|
||
},
|
||
"performancenavigationtiming.unloadeventend": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/unloadeventend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>unloadEventEnd</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately after the current document's <a href=\"$MDN_URL$/Web/API/Window/unload_event\"><code>unload</code></a> event handler completes."
|
||
},
|
||
"performancenavigationtiming.unloadeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancenavigationtiming/unloadeventstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "",
|
||
"Firefox": "58",
|
||
"Opera": "44",
|
||
"Safari": "15",
|
||
"SafariIOS": "15.1"
|
||
},
|
||
"doc": "The <strong><code>unloadEventStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> representing the time immediately before the current document's <a href=\"$MDN_URL$/Web/API/Window/unload_event\"><code>unload</code></a> event handler starts."
|
||
},
|
||
"performanceobserver": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>PerformanceObserver</code></strong> interface is used to observe performance measurement events and be notified of new <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entries</a> as they are recorded in the browser's <em>performance timeline</em>."
|
||
},
|
||
"performanceobserver.disconnect": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver/disconnect",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>disconnect()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> interface is used to stop the performance observer from receiving any <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a> events.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performanceobserver.observe": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver/observe",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>observe()</code></strong> method of the <strong><a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a></strong> interface is used to specify the set of performance entry types to observe.\n<p>See <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a> for a list of entry types and <a href=\"$MDN_URL$/Web/API/PerformanceObserver/supportedEntryTypes_static\" ><code>PerformanceObserver.supportedEntryTypes</code></a> for a list of entry types the user agent supports.\n<p>When a matching performance entry is recorded, the performance observer's callback function—set when creating the <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a>—is invoked.",
|
||
"parameters": {
|
||
"options": "An object with the following possible members: <dl> <dt id=\"buffered\"><a href=\"#buffered\"><code>buffered</code></a></dt> <dd> <p>A boolean flag to indicate whether buffered entries should be queued into the observer's buffer. Must be used only with the \"<code>type</code>\" option. </dd> <dt id=\"durationthreshold\"><a href=\"#durationthreshold\"><code>durationThreshold</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> defining the threshold for <a href=\"$MDN_URL$/Web/API/PerformanceEventTiming\"><code>PerformanceEventTiming</code></a> entries. Defaults to 104ms and is rounded to the nearest of 8ms. Lowest possible threshold is 16ms. May not be used together with the <code>entryTypes</code> option. </dd> <dt id=\"entrytypes\"><a href=\"#entrytypes\"><code>entryTypes</code></a></dt> <dd> <p>An array of string objects, each specifying one performance entry type to observe. May not be used together with the \"<code>type</code>\", \"<code>buffered</code>\", or \"<code>durationThreshold</code>\" options. <p>See <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a> for a list of valid performance entry type names. Unrecognized types are ignored, though the browser may output a warning message to the console to help developers debug their code. If no valid types are found, <code>observe()</code> has no effect. </dd> <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt> <dd> <p>A single string specifying exactly one performance entry type to observe. May not be used together with the <code>entryTypes</code> option. </dd> </dl>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"performanceobserver.performanceobserver": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver/performanceobserver",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>PerformanceObserver()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> object with the given observer <code>callback</code>. The observer callback is invoked when <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry events</a> are recorded for the <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" >entry types</a> that have been registered, via the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe\" ><code>observe()</code></a> method.",
|
||
"parameters": {
|
||
"callback": "A <code>PerformanceObserverCallback</code> callback that will be invoked when observed performance events are recorded. When the callback is invoked, the following parameters are available: <dl> <dt id=\"entries\"><a href=\"#entries\"><code>entries</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PerformanceObserverEntryList\" >list of performance observer entries</a>. </dd> <dt id=\"observer\"><a href=\"#observer\"><code>observer</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/API/PerformanceObserver\" ><code>observer</code></a> object that is receiving the above entries. </dd> <dt id=\"droppedentriescount\"><a href=\"#droppedentriescount\"><code>droppedEntriesCount</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>The number of buffered entries which got dropped from the buffer due to the buffer being full. See the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe#parameters\"><code>buffered</code></a> flag. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> object which will call the specified <code>callback</code> when observed performance events occur."
|
||
},
|
||
"performanceobserver.supportedentrytypes": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver/supportedentrytypes_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "73",
|
||
"ChromeAndroid": "73",
|
||
"Edge": "79",
|
||
"Firefox": "68",
|
||
"Opera": "60",
|
||
"Safari": "13",
|
||
"SafariIOS": "13",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The static <strong><code>supportedEntryTypes</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> interface returns an array of the <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entryType</code></a> values supported by the user agent.\n<p>As the list of supported entries varies per browser and is evolving, this property allows web developers to check which are available."
|
||
},
|
||
"performanceobserver.takerecords": {
|
||
"url": "$MDN_URL$/web/api/performanceobserver/takerecords",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "60",
|
||
"Opera": "52",
|
||
"Safari": "15",
|
||
"SafariIOS": "15"
|
||
},
|
||
"doc": "The <strong><code>takeRecords()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceObserver\"><code>PerformanceObserver</code></a> interface returns the current list of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" ><code>performance entries</code></a> stored in the performance observer, emptying it out.",
|
||
"returns": "A list of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects."
|
||
},
|
||
"performanceobserverentrylist": {
|
||
"url": "$MDN_URL$/web/api/performanceobserverentrylist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>PerformanceObserverEntryList</code></strong> interface is a list of <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance events</a> that were explicitly observed via the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe\" ><code>observe()</code></a> method."
|
||
},
|
||
"performanceobserverentrylist.getentries": {
|
||
"url": "$MDN_URL$/web/api/performanceobserverentrylist/getentries",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>getEntries()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceObserverEntryList\"><code>PerformanceObserverEntryList</code></a> interface returns a list of explicitly observed <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a> objects. The list's members are determined by the set of <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" >entry types</a> specified in the call to the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe\" ><code>observe()</code></a> method. The list is available in the observer's callback function (as the first parameter in the callback).",
|
||
"returns": "A list of explicitly observed <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects. The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>. If no objects are found, an empty list is returned."
|
||
},
|
||
"performanceobserverentrylist.getentriesbyname": {
|
||
"url": "$MDN_URL$/web/api/performanceobserverentrylist/getentriesbyname",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>getEntriesByName()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceObserverEntryList\"><code>PerformanceObserverEntryList</code></a> interface returns a list of explicitly observed <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a> objects for a given <a href=\"$MDN_URL$/Web/API/PerformanceEntry/name\" ><code>name</code></a> and <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" ><code>entry type</code></a>. The list's members are determined by the set of <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" >entry types</a> specified in the call to the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe\" ><code>observe()</code></a> method. The list is available in the observer's callback function (as the first parameter in the callback).",
|
||
"parameters": {
|
||
"name": "A string representing the name of the entry to retrieve.",
|
||
"type": "A string representing the type of entry to retrieve such as <code>\"mark\"</code>. The valid entry types are listed in <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a>."
|
||
},
|
||
"returns": "A list of explicitly <em>observed</em> <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" title=\"performance entry\">performance entry</a> objects that have the specified <code>name</code> and <code>type</code>. If the <code>type</code> argument is not specified, only the <code>name</code> will be used to determine the entries to return. The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>. If no objects meet the specified criteria, an empty list is returned."
|
||
},
|
||
"performanceobserverentrylist.getentriesbytype": {
|
||
"url": "$MDN_URL$/web/api/performanceobserverentrylist/getentriesbytype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "52",
|
||
"ChromeAndroid": "52",
|
||
"Edge": "79",
|
||
"Firefox": "57",
|
||
"Opera": "39",
|
||
"Safari": "11",
|
||
"SafariIOS": "11",
|
||
"Nodejs": "8.5.0"
|
||
},
|
||
"doc": "The <strong><code>getEntriesByType()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceObserverEntryList\"><code>PerformanceObserverEntryList</code></a> returns a list of explicitly <em>observed</em> <a href=\"$MDN_URL$/Web/API/PerformanceEntry\" >performance entry</a> objects for a given <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" >performance entry type</a>. The list's members are determined by the set of <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\" >entry types</a> specified in the call to the <a href=\"$MDN_URL$/Web/API/PerformanceObserver/observe\" ><code>observe()</code></a> method. The list is available in the observer's callback function (as the first parameter in the callback).",
|
||
"parameters": {
|
||
"type": "The type of entry to retrieve such as <code>\"mark\"</code>. The valid entry types are listed in <a href=\"$MDN_URL$/Web/API/PerformanceEntry/entryType\"><code>PerformanceEntry.entryType</code></a>."
|
||
},
|
||
"returns": "A list of explicitly <em>observed</em> <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a> objects that have the specified <code>type</code>. The items will be in chronological order based on the entries' <a href=\"$MDN_URL$/Web/API/PerformanceEntry/startTime\" title=\"startTime\"><code>startTime</code></a>. If no objects have the specified <code>type</code>, or no argument is provided, an empty list is returned."
|
||
},
|
||
"performancepainttiming": {
|
||
"url": "$MDN_URL$/web/api/performancepainttiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "79",
|
||
"Firefox": "84",
|
||
"Opera": "47",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>PerformancePaintTiming</code></strong> interface provides timing information about \"paint\" (also called \"render\") operations during web page construction. \"Paint\" refers to conversion of the render tree to on-screen pixels.\n<p>There are two key paint moments this API provides:\n<ul>\n<li><a href=\"$MDN_URL$/Glossary/First_paint\">First paint</a> (FP): Time when anything is rendered. Note that the marking of the first paint is optional, not all user agents report it.</li>\n<li><a href=\"$MDN_URL$/Glossary/First_contentful_paint\">First contentful paint</a> (FCP): Time when the first bit of DOM text or image content is rendered.</li>\n</ul>\n<p>A third key paint moment is provided by the <a href=\"$MDN_URL$/Web/API/LargestContentfulPaint\"><code>LargestContentfulPaint</code></a> API:\n<ul>\n<li><a href=\"$MDN_URL$/Glossary/Largest_contentful_paint\">Largest contentful paint</a> (LCP): Render time of the largest image or text block visible within the viewport, recorded from when the page first begins to load.</li>\n</ul>\n<p>The data this API provides helps you minimize the time that users have to wait before they can see the site's content start to appear. Decreasing the time until these key paint moments make sites feel more responsive, performant, and engaging for your users.\n<p>Like other Performance APIs, this API extends <a href=\"$MDN_URL$/Web/API/PerformanceEntry\"><code>PerformanceEntry</code></a>."
|
||
},
|
||
"performanceresourcetiming": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "29",
|
||
"ChromeAndroid": "29",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "16",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>PerformanceResourceTiming</code></strong> interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an <a href=\"$MDN_URL$/Web/API/XMLHttpRequest\"><code>XMLHttpRequest</code></a>, <a href=\"$MDN_URL$/Web/SVG/Element/svg\"><code><SVG></code></a>, image, or script."
|
||
},
|
||
"performanceresourcetiming.connectend": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/connectend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "32",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>connectEnd</code></strong> read-only property returns the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and <a href=\"https://en.wikipedia.org/wiki/SOCKS\" class=\"external\" target=\"_blank\">SOCKS</a> authentication."
|
||
},
|
||
"performanceresourcetiming.connectstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/connectstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "32",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>connectStart</code></strong> read-only property returns the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately before the user agent starts establishing the connection to the server to retrieve the resource."
|
||
},
|
||
"performanceresourcetiming.decodedbodysize": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/decodedbodysize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "45",
|
||
"Opera": "41",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>decodedBodySize</code></strong> read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli). If the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content encoding."
|
||
},
|
||
"performanceresourcetiming.deliverytype": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/deliverytype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "117",
|
||
"ChromeAndroid": "117",
|
||
"Edge": "117",
|
||
"Opera": "103"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>deliveryType</code></strong> read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch."
|
||
},
|
||
"performanceresourcetiming.domainlookupend": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/domainlookupend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>domainLookupEnd</code></strong> read-only property returns the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after the browser finishes the domain-name lookup for the resource.\n<p>If the user agent has the domain information in cache, <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming/domainLookupStart\" ><code>domainLookupStart</code></a> and <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming/domainLookupEnd\" aria-current=\"page\"><code>domainLookupEnd</code></a> represent the times when the user agent starts and ends the domain data retrieval from the cache."
|
||
},
|
||
"performanceresourcetiming.domainlookupstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/domainlookupstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>domainLookupStart</code></strong> read-only property returns the <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately before the browser starts the domain name lookup for the resource."
|
||
},
|
||
"performanceresourcetiming.encodedbodysize": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/encodedbodysize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "45",
|
||
"Opera": "41",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>encodedBodySize</code></strong> read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli). If the resource is retrieved from an application cache or a local resource, it must\nreturn the size of the payload body before removing any applied content encoding."
|
||
},
|
||
"performanceresourcetiming.fetchstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/fetchstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>fetchStart</code></strong> read-only property represents a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately before the browser starts to fetch the resource.\n<p>If there are HTTP redirects, the property returns the time immediately before the user agent starts to fetch the final resource in the redirection.\n<p>Unlike many other <code>PerformanceResourceTiming</code> properties, the <code>fetchStart</code> property is available for cross-origin requests without the need of the <a href=\"$MDN_URL$/Web/HTTP/Headers/Timing-Allow-Origin\"><code>Timing-Allow-Origin</code></a> HTTP response header."
|
||
},
|
||
"performanceresourcetiming.firstinterimresponsestart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/firstinterimresponsestart",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "115",
|
||
"ChromeAndroid": "115",
|
||
"Edge": "115",
|
||
"Opera": "101"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>firstInterimResponseStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.\n<p>There is no <em>end</em> property for <code>firstInterimResponseStart</code>."
|
||
},
|
||
"performanceresourcetiming.initiatortype": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/initiatortype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>initiatorType</code></strong> read-only property is a string representing web platform feature that initiated the resource load.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This property does not represent the type of content fetched. A <code>.css</code> file can be fetched using a <a href=\"$MDN_URL$/Web/HTML/Element/link\"><code><link></code></a> element leading to an <code>initiatorType</code> of <code>link</code>. When loading images using <code>background: url()</code> in a CSS file, the <code>initiatorType</code> will be <code>css</code> and not <code>img</code>.\n</div>"
|
||
},
|
||
"performanceresourcetiming.nexthopprotocol": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/nexthopprotocol",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "61",
|
||
"ChromeAndroid": "61",
|
||
"Edge": "17",
|
||
"Firefox": "45",
|
||
"Opera": "48",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>nextHopProtocol</code></strong> read-only property is a string representing the network protocol used to fetch the resource, as identified by the <a href=\"https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids\" class=\"external\" target=\"_blank\">ALPN Protocol ID (RFC7301)</a>.\n<p>When a proxy is used, if a tunnel connection is established, this property returns the ALPN Protocol ID of the tunneled protocol. Otherwise, this property returns the ALPN Protocol ID of the first hop to the proxy."
|
||
},
|
||
"performanceresourcetiming.redirectend": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/redirectend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>redirectEnd</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after receiving the last byte of the response of the last redirect.\n<p>When fetching a resource, if there are multiple HTTP redirects, and any of the redirects have an origin that is different from the current document, and the timing allow check algorithm passes for each redirected resource, this property returns the time immediately after receiving the last byte of the response of the last redirect; otherwise, zero is returned.\n<p>To get the amount of redirects, see also <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/redirectCount\"><code>PerformanceNavigationTiming.redirectCount</code></a>."
|
||
},
|
||
"performanceresourcetiming.redirectstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/redirectstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>redirectStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> representing the start time of the fetch which that initiates the redirect.\n<p>If there are HTTP redirects when fetching the resource and if any of the redirects are not from the same origin as the current document, but the timing allow check algorithm passes for each redirected resource, this property returns the starting time of the fetch that initiates the redirect; otherwise, zero is returned.\n<p>To get the amount of redirects, see also <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/redirectCount\"><code>PerformanceNavigationTiming.redirectCount</code></a>."
|
||
},
|
||
"performanceresourcetiming.renderblockingstatus": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/renderblockingstatus",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "107",
|
||
"ChromeAndroid": "107",
|
||
"Edge": "107",
|
||
"Opera": "93"
|
||
},
|
||
"doc": "The <strong><code>renderBlockingStatus</code></strong> read-only property returns the render-blocking status of the resource.\n<p>It is useful to determine resources that:\n<ul>\n<li>weren't render-blocking and therefore could be delayed, or</li>\n<li>were render-blocking and therefore could be preloaded.</li>\n</ul>"
|
||
},
|
||
"performanceresourcetiming.requeststart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/requeststart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>requestStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> of the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.\n<p>There is no <em>end</em> property for <code>requestStart</code>. To measure the request time, calculate <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming/responseStart\" ><code>responseStart</code></a> - <code>requestStart</code> (see the example below)."
|
||
},
|
||
"performanceresourcetiming.responseend": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/responseend",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>responseEnd</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.\n<p>Unlike many other <code>PerformanceResourceTiming</code> properties, the <code>responseEnd</code> property is available for cross-origin requests without the need of the <a href=\"$MDN_URL$/Web/HTTP/Headers/Timing-Allow-Origin\"><code>Timing-Allow-Origin</code></a> HTTP response header."
|
||
},
|
||
"performanceresourcetiming.responsestart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/responsestart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>responseStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately after the browser receives the first byte of the response from the server, cache, or local resource."
|
||
},
|
||
"performanceresourcetiming.responsestatus": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/responsestatus",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "109",
|
||
"ChromeAndroid": "109",
|
||
"Edge": "109",
|
||
"Opera": "95"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>responseStatus</code></strong> read-only property represents the HTTP response status code returned when fetching the resource.\n<p>This property maps to <a href=\"$MDN_URL$/Web/API/Response/status\"><code>Response.status</code></a> from the <a href=\"$MDN_URL$/Web/API/Fetch_API\">Fetch API</a>."
|
||
},
|
||
"performanceresourcetiming.secureconnectionstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/secureconnectionstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "18",
|
||
"Firefox": "31",
|
||
"Opera": "30",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>secureConnectionStart</code></strong> read-only property returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\" ><code>timestamp</code></a> immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero."
|
||
},
|
||
"performanceresourcetiming.servertiming": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/servertiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>serverTiming</code></strong> read-only property returns an array of <a href=\"$MDN_URL$/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a> entries containing server timing metrics.\n<p>Server timing metrics require the server to send the <a href=\"$MDN_URL$/Web/HTTP/Headers/Server-Timing\"><code>Server-Timing</code></a> header. For example:\n<div class=\"code-example\"><div>\n```http\nServer-Timing: cache;desc=\"Cache Read\";dur=23.2\n```\n</div></div>\n<p>The <code>serverTiming</code> entries can live on <code>navigation</code> and <code>resource</code> entries."
|
||
},
|
||
"performanceresourcetiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "45",
|
||
"ChromeAndroid": "45",
|
||
"Edge": "16",
|
||
"Firefox": "34",
|
||
"Opera": "32",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a> object."
|
||
},
|
||
"performanceresourcetiming.transfersize": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/transfersize",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "45",
|
||
"Opera": "41",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>transferSize</code></strong> read-only property represents the size (in octets) of the fetched resource. The size includes the response header fields plus the response payload body (as defined by <a href=\"https://httpwg.org/specs/rfc7230.html#message.body\" class=\"external\" target=\"_blank\">RFC7230</a>).\n<p>If the resource is fetched from a local cache, or if it is a cross-origin resource, this property returns zero."
|
||
},
|
||
"performanceresourcetiming.workerstart": {
|
||
"url": "$MDN_URL$/web/api/performanceresourcetiming/workerstart",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "46",
|
||
"ChromeAndroid": "46",
|
||
"Edge": "16",
|
||
"Firefox": "58",
|
||
"Opera": "32",
|
||
"Safari": "11",
|
||
"SafariIOS": "11"
|
||
},
|
||
"doc": "The <strong><code>workerStart</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PerformanceResourceTiming\"><code>PerformanceResourceTiming</code></a> interface returns a\n<a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a> immediately before dispatching the <a href=\"$MDN_URL$/Web/API/FetchEvent\"><code>FetchEvent</code></a> if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0."
|
||
},
|
||
"performanceservertiming": {
|
||
"url": "$MDN_URL$/web/api/performanceservertiming",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div> <div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PerformanceServerTiming</code></strong> interface surfaces server metrics that are sent with the response in the <a href=\"$MDN_URL$/Web/HTTP/Headers/Server-Timing\"><code>Server-Timing</code></a> HTTP header.\n<p>This interface is restricted to the same origin, but you can use the <a href=\"$MDN_URL$/Web/HTTP/Headers/Timing-Allow-Origin\"><code>Timing-Allow-Origin</code></a> header to specify the domains that are allowed to access the server metrics. Note that this interface is only available in secure contexts (HTTPS) in some browsers."
|
||
},
|
||
"performanceservertiming.description": {
|
||
"url": "$MDN_URL$/web/api/performanceservertiming/description",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>description</code></strong> read-only property returns a\nstring value of the server-specified metric description, or an empty\nstring."
|
||
},
|
||
"performanceservertiming.duration": {
|
||
"url": "$MDN_URL$/web/api/performanceservertiming/duration",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>duration</code></strong> read-only property returns a double that contains the server-specified metric duration, or the value <code>0.0</code>."
|
||
},
|
||
"performanceservertiming.name": {
|
||
"url": "$MDN_URL$/web/api/performanceservertiming/name",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>name</code></strong> read-only property returns a\nstring value of the server-specified metric name."
|
||
},
|
||
"performanceservertiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performanceservertiming/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "65",
|
||
"ChromeAndroid": "65",
|
||
"Edge": "79",
|
||
"Firefox": "61",
|
||
"Opera": "52",
|
||
"Safari": "16.4",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceServerTiming\"><code>PerformanceServerTiming</code></a> object."
|
||
},
|
||
"performancetiming": {
|
||
"url": "$MDN_URL$/web/api/performancetiming",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>\n<p>The <strong><code>PerformanceTiming</code></strong> interface is a legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a <code>PerformanceTiming</code> object describing your page using the <a href=\"$MDN_URL$/Web/API/Performance/timing\" ><code>window.performance.timing</code></a> property."
|
||
},
|
||
"performancetiming.connectend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/connectend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.connectEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, where the connection is opened network. If the\ntransport layer reports an error and the connection establishment is started again, the\nlast connection establishment end time is given. If a persistent connection is used, the\nvalue will be the same as <a href=\"$MDN_URL$/Web/API/PerformanceTiming/fetchStart\"><code>PerformanceTiming.fetchStart</code></a>. A connection is\nconsidered as opened when all secure connection handshake, or SOCKS authentication, is\nterminated."
|
||
},
|
||
"performancetiming.connectstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/connectstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.connectStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, where the request to open a connection is sent to\nthe network. If the transport layer reports an error and the connection establishment is\nstarted again, the last connection establishment start time is given. If a persistent\nconnection is used, the value will be the same as\n<a href=\"$MDN_URL$/Web/API/PerformanceTiming/fetchStart\"><code>PerformanceTiming.fetchStart</code></a>."
|
||
},
|
||
"performancetiming.domainlookupend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domainlookupend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domainLookupEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, where the domain lookup is finished. If a\npersistent connection is used, or the information is stored in a cache or a local\nresource, the value will be the same as <a href=\"$MDN_URL$/Web/API/PerformanceTiming/fetchStart\"><code>PerformanceTiming.fetchStart</code></a>."
|
||
},
|
||
"performancetiming.domainlookupstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domainlookupstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domainLookupStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, where the domain lookup starts. If a persistent\nconnection is used, or the information is stored in a cache or a local resource, the\nvalue will be the same as <a href=\"$MDN_URL$/Web/API/PerformanceTiming/fetchStart\"><code>PerformanceTiming.fetchStart</code></a>."
|
||
},
|
||
"performancetiming.domcomplete": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domcomplete",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domComplete</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the parser finished its work on the main\ndocument, that is when its <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>Document.readyState</code></a> changes to\n<code>'complete'</code> and the corresponding <a href=\"$MDN_URL$/Web/API/Document/readystatechange_event\" ><code>readystatechange</code></a> event is\nthrown."
|
||
},
|
||
"performancetiming.domcontentloadedeventend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domcontentloadedeventend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domContentLoadedEventEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, right after all the scripts that need to be\nexecuted as soon as possible, in order or not, has been executed."
|
||
},
|
||
"performancetiming.domcontentloadedeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domcontentloadedeventstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domContentLoadedEventStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, right before the parser sent the\n<a href=\"$MDN_URL$/Web/API/Document/DOMContentLoaded_event\" ><code>DOMContentLoaded</code></a> event, that is right after all the scripts that need to be\nexecuted right after parsing has been executed."
|
||
},
|
||
"performancetiming.dominteractive": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/dominteractive",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domInteractive</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the parser finished its work on the main\ndocument, that is when its <a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>Document.readyState</code></a> changes to\n<code>'interactive'</code> and the corresponding <a href=\"$MDN_URL$/Web/API/Document/readystatechange_event\" ><code>readystatechange</code></a> event is\nthrown.\n<p>This property can be used to measure the speed of loading websites that users\n<em>feels</em>. Nevertheless there are a few caveats that happens if scripts are\nblocking rendering and not loaded asynchronously or with custom Web fonts. <a href=\"https://www.stevesouders.com/blog/2015/08/07/dominteractive-is-it-really/\" class=\"external\" target=\"_blank\">Check if you are in one of these cases</a> before using this property as a proxy for the\nuser experience of a website's speed of loading."
|
||
},
|
||
"performancetiming.domloading": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/domloading",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.domLoading</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the parser started its work, that is when its\n<a href=\"$MDN_URL$/Web/API/Document/readyState\"><code>Document.readyState</code></a> changes to <code>'loading'</code> and the\ncorresponding <a href=\"$MDN_URL$/Web/API/Document/readystatechange_event\" ><code>readystatechange</code></a> event is thrown."
|
||
},
|
||
"performancetiming.fetchstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/fetchstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.fetchStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, the browser is ready to fetch the document using\nan HTTP request. This moment is <em>before</em> the check to any application cache."
|
||
},
|
||
"performancetiming.loadeventend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/loadeventend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface's <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/loadEventEnd\"><code>PerformanceNavigationTiming.loadEventEnd</code></a> read-only property instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.loadEventEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the <a href=\"$MDN_URL$/Web/API/Window/load_event\" ><code>load</code></a> event handler\nterminated, that is when the load event is completed. If this event has not yet been\nsent, or is not yet completed, it returns <code>0.</code>"
|
||
},
|
||
"performancetiming.loadeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/loadeventstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface's <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming/loadEventStart\"><code>PerformanceNavigationTiming.loadEventStart</code></a> read-only property instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.loadEventStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the <a href=\"$MDN_URL$/Web/API/Window/load_event\" ><code>load</code></a> event was sent for the\ncurrent document. If this event has not yet been sent, it returns <code>0.</code>"
|
||
},
|
||
"performancetiming.msfirstpaint": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/msfirstpaint",
|
||
"doc": "<div class=\"notecard nonstandard\" id=\"sect1\"><p><strong>Non-standard:</strong> 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.</div>\n<p><strong><code>msFirstPaint</code></strong> is a read-only property which gets the time\nwhen the document loaded by the window object began to be displayed to the user.\n<p>Put another way, <code>msFirstPaint</code> utilizes the browser to measure when the\nfirst content completes being painted in the window. It is available from JavaScript and\ncan be reported from the field.\n<p>This proprietary property is specific to Internet Explorer and Microsoft Edge."
|
||
},
|
||
"performancetiming.navigationstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/navigationstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>.\nPlease use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.navigationStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, right after the prompt for unload terminates on\nthe previous document in the same browsing context. If there is no previous document,\nthis value will be the same as <a href=\"$MDN_URL$/Web/API/PerformanceTiming/fetchStart\"><code>PerformanceTiming.fetchStart</code></a>."
|
||
},
|
||
"performancetiming.redirectend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/redirectend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.redirectEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, the last HTTP redirect is completed, that is when\nthe last byte of the HTTP response has been received. If there is no redirect, or if one\nof the redirect is not of the same origin, the value returned is <code>0</code>."
|
||
},
|
||
"performancetiming.redirectstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/redirectstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.redirectStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, the first HTTP redirect starts. If there is no\nredirect, or if one of the redirect is not of the same origin, the value returned is\n<code>0</code>."
|
||
},
|
||
"performancetiming.requeststart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/requeststart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.requestStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the browser sent the request to obtain the\nactual document, from the server or from a cache. If the transport layer fails after the\nstart of the request and the connection is reopened, this property will be set to the\ntime corresponding to the new request."
|
||
},
|
||
"performancetiming.responseend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/responseend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.responseEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, when the browser received the last byte of the\nresponse, or when the connection is closed if this happened first, from the server from\na cache or from a local resource."
|
||
},
|
||
"performancetiming.responsestart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/responsestart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.responseStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment in\ntime (in milliseconds since the UNIX epoch) when the browser received the first byte of\nthe response from the server, cache, or local resource."
|
||
},
|
||
"performancetiming.secureconnectionstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/secureconnectionstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "18",
|
||
"Firefox": "56",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a> interface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.secureConnectionStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, where the secure connection handshake starts. If\nno such connection is requested, it returns <code>0</code>."
|
||
},
|
||
"performancetiming.tojson": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/tojson",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "44",
|
||
"ChromeAndroid": "44",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "32",
|
||
"Safari": "10.1",
|
||
"SafariIOS": "10.3"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> interface is a <a href=\"$MDN_URL$/Glossary/Serialization\">serializer</a>; it returns a JSON representation of the <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\"><code>JSON</code></a> object that is the serialization of the <a href=\"$MDN_URL$/Web/API/PerformanceTiming\"><code>PerformanceTiming</code></a> object."
|
||
},
|
||
"performancetiming.unloadeventend": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/unloadeventend",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.unloadEventEnd</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, the <a href=\"$MDN_URL$/Web/API/Window/unload_event\" ><code>unload</code></a> event handler finishes. If\nthere is no previous document, or if the previous document, or one of the needed\nredirects, is not of the same origin, the value returned is <code>0</code>."
|
||
},
|
||
"performancetiming.unloadeventstart": {
|
||
"url": "$MDN_URL$/web/api/performancetiming/unloadeventstart",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "6",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "7",
|
||
"Opera": "15",
|
||
"Safari": "8",
|
||
"SafariIOS": "9"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> This interface of this property is deprecated in the <a href=\"https://w3c.github.io/navigation-timing/#obsolete\" class=\"external\" target=\"_blank\">Navigation Timing Level 2 specification</a>. Please use the <a href=\"$MDN_URL$/Web/API/PerformanceNavigationTiming\"><code>PerformanceNavigationTiming</code></a>\ninterface instead.\n</div>\n<p>The legacy\n<strong><code>PerformanceTiming.unloadEventStart</code></strong>\nread-only property returns an <code>unsigned long long</code> representing the moment,\nin milliseconds since the UNIX epoch, the <a href=\"$MDN_URL$/Web/API/Window/unload_event\" ><code>unload</code></a> event has been thrown. If\nthere is no previous document, or if the previous document, or one of the needed\nredirects, is not of the same origin, the value returned is <code>0</code>."
|
||
},
|
||
"periodicsyncevent": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PeriodicSyncEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_Periodic_Background_Synchronization_API\">Web Periodic Background Synchronization API</a> provides a way to run tasks in the service worker with network connectivity.\n<p>An instance of this event is passed to the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope/periodicsync_event\" ><code>periodicsync</code></a> handler. This happens periodically, at an interval greater than or equal to that set in the <a href=\"$MDN_URL$/Web/API/PeriodicSyncManager/register\"><code>PeriodicSyncManager.register()</code></a> method. Other implementation-specific factors such as the user's engagement with the site decide the actual interval."
|
||
},
|
||
"periodicsyncevent.periodicsyncevent": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncevent/periodicsyncevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PeriodicSyncEvent()</code></strong> constructor\ncreates a new <a href=\"$MDN_URL$/Web/API/PeriodicSyncEvent\"><code>PeriodicSyncEvent</code></a> object. This constructor is not typically\nused. The browser creates these objects itself and provides them to\n<a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope/periodicsync_event\" ><code>onperiodicsync</code></a> callback.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>periodicsync</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"tag\"><a href=\"#tag\"><code>tag</code></a></dt> <dd> <p>The tag referencing the sync event. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PeriodicSyncEvent\"><code>PeriodicSyncEvent</code></a> object configured using the given inputs."
|
||
},
|
||
"periodicsyncevent.tag": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncevent/tag",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>tag</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncEvent\"><code>PeriodicSyncEvent</code></a> interface returns the developer-defined identifier for\nthe <a href=\"$MDN_URL$/Web/API/PeriodicSyncEvent\"><code>PeriodicSyncEvent</code></a>. This is specified when calling the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncManager/register\"><code>PeriodicSyncManager.register()</code></a> method of the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncManager\"><code>PeriodicSyncManager</code></a> interface. Multiple tags can be used by the web app\nto run different periodic tasks at different frequencies."
|
||
},
|
||
"periodicsyncmanager": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncmanager",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PeriodicSyncManager</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Web_Periodic_Background_Synchronization_API\">Web Periodic Background Synchronization API</a> provides a way to register tasks to be run in a service worker at periodic intervals with network connectivity. These tasks are referred to as periodic background sync requests. Access <code>PeriodicSyncManager</code> through the <a href=\"$MDN_URL$/Web/API/ServiceWorkerRegistration/periodicSync\"><code>ServiceWorkerRegistration.periodicSync</code></a>."
|
||
},
|
||
"periodicsyncmanager.gettags": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncmanager/gettags",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>getTags()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncManager\"><code>PeriodicSyncManager</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that\nresolves with a list of <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a> objects representing the tags that are\ncurrently registered for periodic syncing.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves with a list of <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a> objects\n representing tags that are currently registered for periodic syncing."
|
||
},
|
||
"periodicsyncmanager.register": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncmanager/register",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>register()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncManager\"><code>PeriodicSyncManager</code></a> interface registers a periodic sync request with the\nbrowser with the specified tag and options. It returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that\nresolves when the registration completes.",
|
||
"parameters": {
|
||
"tag": "A unique <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a> identifier.",
|
||
"options": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Object\"><code>Object</code></a> containing the following optional data: <dl> <dt id=\"mininterval\"><a href=\"#mininterval\"><code>minInterval</code></a></dt> <dd> <p>The minimum interval time, in milliseconds, at which the periodic sync should occur. </dd> </dl>"
|
||
},
|
||
"returns": "Returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Returned if there is no active <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a> present.",
|
||
"NotAllowedError DOMException": "Returned if permission for background periodic sync is not granted.",
|
||
"InvalidAccessError DOMException": "Returned if the active window is not the main window (not of <code>auxiliary</code> or <code>top-level</code> type)."
|
||
}
|
||
},
|
||
"periodicsyncmanager.unregister": {
|
||
"url": "$MDN_URL$/web/api/periodicsyncmanager/unregister",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "80",
|
||
"ChromeAndroid": "80",
|
||
"Edge": "80",
|
||
"Opera": "67"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>unregister()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PeriodicSyncManager\"><code>PeriodicSyncManager</code></a> interface unregisters the periodic sync request\ncorresponding to the specified tag and returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves\nwhen unregistration completes.",
|
||
"parameters": {
|
||
"tag": "The unique <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a> descriptor for the specific background sync."
|
||
},
|
||
"returns": "Returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>."
|
||
},
|
||
"periodicwave": {
|
||
"url": "$MDN_URL$/web/api/periodicwave",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "30",
|
||
"ChromeAndroid": "30",
|
||
"Edge": "",
|
||
"Firefox": "25",
|
||
"Opera": "17",
|
||
"Safari": "8",
|
||
"SafariIOS": "8"
|
||
},
|
||
"doc": "The <strong><code>PeriodicWave</code></strong> interface defines a periodic waveform that can be used to shape the output of an <a href=\"$MDN_URL$/Web/API/OscillatorNode\"><code>OscillatorNode</code></a>.\n<p><code>PeriodicWave</code> has no inputs or outputs; it is used to define custom oscillators when calling <a href=\"$MDN_URL$/Web/API/OscillatorNode/setPeriodicWave\"><code>OscillatorNode.setPeriodicWave()</code></a>. The <code>PeriodicWave</code> itself is created/returned by <a href=\"$MDN_URL$/Web/API/BaseAudioContext/createPeriodicWave\"><code>BaseAudioContext.createPeriodicWave</code></a>."
|
||
},
|
||
"periodicwave.periodicwave": {
|
||
"url": "$MDN_URL$/web/api/periodicwave/periodicwave",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "79",
|
||
"Firefox": "53",
|
||
"Opera": "42",
|
||
"Safari": "14.1",
|
||
"SafariIOS": "14.5"
|
||
},
|
||
"doc": "The <strong><code>PeriodicWave()</code></strong> constructor of the <a href=\"$MDN_URL$/Web/API/Web_Audio_API\">Web Audio API</a> creates a new\n<a href=\"$MDN_URL$/Web/API/PeriodicWave\"><code>PeriodicWave</code></a> object instance.",
|
||
"parameters": {
|
||
"context": "A <a href=\"$MDN_URL$/Web/API/BaseAudioContext\"><code>BaseAudioContext</code></a> representing the audio context you want the node to be associated with.",
|
||
"options": "A <a href=\"https://webaudio.github.io/web-audio-api/#idl-def-PeriodicWaveOptions\" class=\"external\" target=\"_blank\"><code>PeriodicWaveOptions</code></a> dictionary object defining the properties you want the <code>PeriodicWave</code> to have (It also inherits the options defined in the <a href=\"https://webaudio.github.io/web-audio-api/#idl-def-PeriodicWaveConstraints\" class=\"external\" target=\"_blank\">PeriodicWaveConstraints</a> dictionary.): <dl> <dt id=\"real\"><a href=\"#real\"><code>real</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Float32Array\"><code>Float32Array</code></a> containing the cosine terms that you want to use to form the wave (equivalent to the <code>real</code> parameter of <a href=\"$MDN_URL$/Web/API/BaseAudioContext/createPeriodicWave\"><code>BaseAudioContext.createPeriodicWave</code></a>). </dd> <dt id=\"imag\"><a href=\"#imag\"><code>imag</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Float32Array\"><code>Float32Array</code></a> containing the sine terms that you want to use to form the wave (equivalent to the <code>imag</code> parameter of <a href=\"$MDN_URL$/Web/API/BaseAudioContext/createPeriodicWave\"><code>BaseAudioContext.createPeriodicWave</code></a>). </dd> <dt id=\"channelcount\"><a href=\"#channelcount\"><code>channelCount</code></a></dt> <dd> <p>Represents an integer used to determine how many channels are used when <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> connections to any inputs to the node. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCount\"><code>AudioNode.channelCount</code></a> for more information.) Its usage and precise definition depend on the value of <code>channelCountMode</code>. </dd> <dt id=\"channelcountmode\"><a href=\"#channelcountmode\"><code>channelCountMode</code></a></dt> <dd> <p>Represents an enumerated value describing the way channels must be matched between the node's inputs and outputs. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> <dt id=\"channelinterpretation\"><a href=\"#channelinterpretation\"><code>channelInterpretation</code></a></dt> <dd> <p>Represents an enumerated value describing the meaning of the channels. This interpretation will define how audio <a href=\"$MDN_URL$/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#up-mixing_and_down-mixing\">up-mixing and down-mixing</a> will happen. The possible values are <code>\"speakers\"</code> or <code>\"discrete\"</code>. (See <a href=\"$MDN_URL$/Web/API/AudioNode/channelCountMode\"><code>AudioNode.channelCountMode</code></a> for more information including default values.) </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PeriodicWave\"><code>PeriodicWave</code></a> object instance."
|
||
},
|
||
"permissions": {
|
||
"url": "$MDN_URL$/web/api/permissions",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "30",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The Permissions interface of the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a> provides the core Permission API functionality, such as methods for querying and revoking permissions"
|
||
},
|
||
"permissions.query": {
|
||
"url": "$MDN_URL$/web/api/permissions/query",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "30",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>Permissions.query()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/Permissions\"><code>Permissions</code></a> interface returns the state of a user permission on the global scope.",
|
||
"parameters": {
|
||
"permissionDescriptor": "An object that sets options for the <code>query</code> operation consisting of a comma-separated list of name-value pairs. The available options are: <dl> <dt id=\"name\"><a href=\"#name\"><code>name</code></a></dt> <dd> <p>The name of the API whose permissions you want to query. Each browser supports a different set of values. You'll find Firefox values <a href=\"https://searchfox.org/mozilla-central/source/dom/webidl/Permissions.webidl#10\" class=\"external\" target=\"_blank\">there</a>, Chromium values <a href=\"https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/modules/permissions/permission_descriptor.idl\" class=\"external\" target=\"_blank\">there</a>, and WebKit values <a href=\"https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/permissions/PermissionName.idl\" class=\"external\" target=\"_blank\">there</a>. </dd> <dt id=\"uservisibleonly\"><a href=\"#uservisibleonly\"><code>userVisibleOnly</code></a></dt> <dd> <p>(Push only, not supported in Firefox — see the Browser Support section below) Indicates whether you want to show a notification for every message or be able to send silent push notifications. The default is <code>false</code>. </dd> <dt id=\"sysex\"><a href=\"#sysex\"><code>sysex</code></a> (Midi only)</dt> <dd> <p>Indicates whether you need and/or receive system exclusive messages. The default is <code>false</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/PermissionStatus\"><code>PermissionStatus</code></a> object.",
|
||
"throws": {
|
||
"InvalidStateError DOMException": "Thrown if <code>query()</code> method is invoked in the browsing context and its associated document is not fully active.",
|
||
"TypeError": "Thrown if retrieving the <code>PermissionDescriptor</code> information failed in some way, or the permission doesn't exist or is unsupported by the user agent."
|
||
}
|
||
},
|
||
"permissions.revoke": {
|
||
"url": "$MDN_URL$/web/api/permissions/revoke",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>Permissions.revoke()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/Permissions\"><code>Permissions</code></a> interface reverts a currently set permission back to its\ndefault state, which is usually <code>prompt</code>.\nThis method is called on the global <a href=\"$MDN_URL$/Web/API/Permissions\"><code>Permissions</code></a> object\n<a href=\"$MDN_URL$/Web/API/Navigator/permissions\"><code>navigator.permissions</code></a>.",
|
||
"parameters": {
|
||
"descriptor": "An object based on the <code>PermissionDescriptor</code> dictionary that sets options for the operation consisting of a comma-separated list of name-value pairs. The available options are: <dl> <dt id=\"name\"><a href=\"#name\"><code>name</code></a></dt> <dd> <p>The name of the API whose permissions you want to query. Valid values are <code>'geolocation'</code>, <code>'midi'</code>, <code>'notifications'</code>, and <code>'push'</code>. </dd> <dt id=\"uservisibleonly\"><a href=\"#uservisibleonly\"><code>userVisibleOnly</code></a></dt> <dd> <p>(Push only, not supported in Firefox — see the <a href=\"#browser_compatibility\">Browser compatibility</a> section below) Indicates whether you want to show a notification for every message or be able to send silent push notifications. The default is <code>false</code>. </dd> <dt id=\"sysex\"><a href=\"#sysex\"><code>sysex</code></a> (MIDI only)</dt> <dd> <p>Indicates whether you need and/or receive system exclusive messages. The default is <code>false</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that calls its fulfillment handler with a\n <a href=\"$MDN_URL$/Web/API/PermissionStatus\"><code>PermissionStatus</code></a> object indicating the result of the request.",
|
||
"throws": {
|
||
"TypeError": "Retrieving the <code>PermissionDescriptor</code> information failed in some way, or the permission doesn't exist or is currently unsupported (e.g. <code>midi</code>, or <code>push</code> with <code>userVisibleOnly</code>)."
|
||
}
|
||
},
|
||
"permissionstatus": {
|
||
"url": "$MDN_URL$/web/api/permissionstatus",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "43",
|
||
"ChromeAndroid": "43",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "30",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>PermissionStatus</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Permissions_API\">Permissions API</a> provides the state of an object and an event handler for monitoring changes to said state."
|
||
},
|
||
"permissionstatus.name": {
|
||
"url": "$MDN_URL$/web/api/permissionstatus/name",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "97",
|
||
"ChromeAndroid": "97",
|
||
"Edge": "97",
|
||
"Firefox": "93",
|
||
"Opera": "83",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>name</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PermissionStatus\"><code>PermissionStatus</code></a> interface returns the name of a requested permission."
|
||
},
|
||
"permissionstatus.state": {
|
||
"url": "$MDN_URL$/web/api/permissionstatus/state",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "44",
|
||
"ChromeAndroid": "44",
|
||
"Edge": "79",
|
||
"Firefox": "46",
|
||
"Opera": "31",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>state</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PermissionStatus\"><code>PermissionStatus</code></a> interface returns the state of a requested permission.\nThis property returns one of <code>'granted'</code>, <code>'denied'</code>, or\n<code>'prompt'</code>."
|
||
},
|
||
"pictureinpictureevent": {
|
||
"url": "$MDN_URL$/web/api/pictureinpictureevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "85",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "85",
|
||
"Opera": "71",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>PictureInPictureEvent</code></strong> interface represents picture-in-picture-related events, including <a href=\"$MDN_URL$/Web/API/HTMLVideoElement/enterpictureinpicture_event\" ><code>enterpictureinpicture</code></a>, <a href=\"$MDN_URL$/Web/API/HTMLVideoElement/leavepictureinpicture_event\" ><code>leavepictureinpicture</code></a> and <a href=\"$MDN_URL$/Web/API/PictureInPictureWindow/resize_event\" ><code>resize</code></a>"
|
||
},
|
||
"pictureinpictureevent.pictureinpictureevent": {
|
||
"url": "$MDN_URL$/web/api/pictureinpictureevent/pictureinpictureevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "85",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "85",
|
||
"Opera": "71",
|
||
"Safari": "16",
|
||
"SafariIOS": "16"
|
||
},
|
||
"doc": "The <strong><code>PictureInPictureEvent()</code></strong> constructor returns a new <a href=\"$MDN_URL$/Web/API/PictureInPictureEvent\"><code>PictureInPictureEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string representing the name of the event. It is case-sensitive and browsers set it to <code>enterpictureinpicture</code>, <code>leavepictureinpicture</code>, or <code>resize</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"pictureinpicturewindow\"><a href=\"#pictureinpicturewindow\"><code>pictureInPictureWindow</code></a></dt> <dd> <p>A <a href=\"$MDN_URL$/Web/API/PictureInPictureWindow\"><code>PictureInPictureWindow</code></a>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PictureInPictureEvent\"><code>PictureInPictureEvent</code></a> object."
|
||
},
|
||
"pictureinpictureevent.pictureinpicturewindow": {
|
||
"url": "$MDN_URL$/web/api/pictureinpictureevent/pictureinpicturewindow",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "79",
|
||
"Opera": "56",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The read-only <strong><code>pictureInPictureWindow</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PictureInPictureEvent\"><code>PictureInPictureEvent</code></a> interface returns the <a href=\"$MDN_URL$/Web/API/PictureInPictureWindow\"><code>PictureInPictureWindow</code></a> the event relates to."
|
||
},
|
||
"pictureinpicturewindow": {
|
||
"url": "$MDN_URL$/web/api/pictureinpicturewindow",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "79",
|
||
"Opera": "56",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The <strong><code>PictureInPictureWindow</code></strong> interface represents an object able to programmatically obtain the <strong><code>width</code></strong> and <strong><code>height</code></strong> and <strong><code>resize event</code></strong> of the floating video window.\n<p>An object with this interface is obtained using the <a href=\"$MDN_URL$/Web/API/HTMLVideoElement/requestPictureInPicture\"><code>HTMLVideoElement.requestPictureInPicture()</code></a> promise return value."
|
||
},
|
||
"pictureinpicturewindow.height": {
|
||
"url": "$MDN_URL$/web/api/pictureinpicturewindow/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "79",
|
||
"Opera": "56",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The read-only <strong><code>height</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PictureInPictureWindow\"><code>PictureInPictureWindow</code></a> interface returns the height of the floating video window in pixels."
|
||
},
|
||
"pictureinpicturewindow.width": {
|
||
"url": "$MDN_URL$/web/api/pictureinpicturewindow/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "69",
|
||
"ChromeAndroid": "105",
|
||
"Edge": "79",
|
||
"Opera": "56",
|
||
"Safari": "13.1",
|
||
"SafariIOS": "13.4"
|
||
},
|
||
"doc": "The read-only <strong><code>width</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PictureInPictureWindow\"><code>PictureInPictureWindow</code></a> inbterface returns the width of the floating video window in pixels."
|
||
},
|
||
"plugin": {
|
||
"url": "$MDN_URL$/web/api/plugin",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <code>Plugin</code> interface provides information about a browser plugin.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Own properties of <code>Plugin</code> objects are no longer enumerable in the latest browser versions.\n</div>"
|
||
},
|
||
"pluginarray": {
|
||
"url": "$MDN_URL$/web/api/pluginarray",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <code>PluginArray</code> interface is used to store a list of <a href=\"$MDN_URL$/Web/API/Plugin\"><code>Plugin</code></a> objects describing the available <a href=\"$MDN_URL$/Mozilla/Add-ons/Plugins\" class=\"page-not-created\" data-flaw=\"link1\">plugins</a>; it's returned by the <a href=\"$MDN_URL$/Web/API/Navigator/plugins\" ><code>navigator.plugins</code></a> property. The <code>PluginArray</code> is not a JavaScript array, but has the <code>length</code> property and supports accessing individual items using bracket notation (<code>plugins[2]</code>), as well as via <code>item(index)</code> and <code>namedItem(\"name\")</code> methods.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> Own properties of <code>PluginArray</code> objects are no longer enumerable in the latest browser versions.\n</div>"
|
||
},
|
||
"pointerevent": {
|
||
"url": "$MDN_URL$/web/api/pointerevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>PointerEvent</code></strong> interface represents the state of a DOM event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc.\n<p>A <em>pointer</em> is a hardware agnostic representation of input devices (such as a mouse, pen or contact point on a touch-enable surface). The pointer can target a specific coordinate (or set of coordinates) on the contact surface such as a screen.\n<p>A pointer's <em>hit test</em> is the process a browser uses to determine the target element for a pointer event. Typically, this is determined by considering the pointer's location and also the visual layout of elements in a document on screen media."
|
||
},
|
||
"pointerevent.altitudeangle": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/altitudeangle",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "86",
|
||
"ChromeAndroid": "86",
|
||
"Edge": "86",
|
||
"Opera": "72"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>altitudeAngle</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the angle between a transducer (a pointer or stylus) axis and the X-Y plane of a device screen.\nThe altitude angle describes whether the transducer is perpendicular to the screen, parallel, or at some angle in between.\n<p>Depending on the specific hardware and platform, user agents will likely only receive one set of values for the transducer orientation relative to the screen plane — either <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltX\" ><code>tiltX</code></a> and <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltY\" ><code>tiltY</code></a> or <code>altitudeAngle</code> and <a href=\"$MDN_URL$/Web/API/PointerEvent/azimuthAngle\" ><code>azimuthAngle</code></a>.\n<p>For an additional illustration of this property, see <a href=\"https://w3c.github.io/pointerevents/#figure_altitudeAngle\" class=\"external\" target=\"_blank\">Figure 4 in the specification</a>."
|
||
},
|
||
"pointerevent.azimuthangle": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/azimuthangle",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "86",
|
||
"ChromeAndroid": "86",
|
||
"Edge": "86",
|
||
"Opera": "72"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>azimuthAngle</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the angle between the Y-Z plane and the plane containing both the transducer (pointer or stylus) axis and the Y axis.\n<p>Depending on the specific hardware and platform, user agents will likely only receive one set of values for the transducer orientation relative to the screen plane — either <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltX\" ><code>tiltX</code></a> and <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltY\" ><code>tiltY</code></a> or <a href=\"$MDN_URL$/Web/API/PointerEvent/altitudeAngle\" ><code>altitudeAngle</code></a> and <code>azimuthAngle</code>.\n<p>For an additional illustration of this property, see <a href=\"https://w3c.github.io/pointerevents/#figure_azimuthAngle\" class=\"external\" target=\"_blank\">Figure 5 in the specification</a>."
|
||
},
|
||
"pointerevent.getcoalescedevents": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/getcoalescedevents",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "58",
|
||
"ChromeAndroid": "58",
|
||
"Edge": "79",
|
||
"Firefox": "59",
|
||
"Opera": "45"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>getCoalescedEvents()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface returns a sequence of <code>PointerEvent</code> instances that were coalesced (merged) into a single <a href=\"$MDN_URL$/Web/API/Element/pointermove_event\" ><code>pointermove</code></a> or <a href=\"$MDN_URL$/Web/API/Element/pointerrawupdate_event\" ><code>pointerrawupdate</code></a> event.\nInstead of a stream of many <a href=\"$MDN_URL$/Web/API/Element/pointermove_event\" ><code>pointermove</code></a> events, user agents coalesce multiple updates into a single event.\nThis helps with performance as the user agent has less event handling to perform, but there is a reduction in the granularity and accuracy when tracking, especially with fast and large movements.\n<p>The <strong><code>getCoalescedEvents()</code></strong> method lets applications access all un-coalesced position changes for precise handling of pointer movement data where necessary.\nUn-coalesced position changes are desirable in drawing applications, for instance, where having access to all events helps to build smoother curves that better match the movement of a pointer.\n<p>For an illustration of coalesced events, see <a href=\"https://w3c.github.io/pointerevents/#figure_coalesced\" class=\"external\" target=\"_blank\">Figure 7 in the specification</a>.",
|
||
"returns": "A sequence of <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> instances."
|
||
},
|
||
"pointerevent.getpredictedevents": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/getpredictedevents",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "77",
|
||
"ChromeAndroid": "77",
|
||
"Edge": "79",
|
||
"Firefox": "89",
|
||
"Opera": "64"
|
||
},
|
||
"doc": "The <strong><code>getPredictedEvents()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface returns a sequence of <code>PointerEvent</code> instances that are estimated future pointer positions.\nHow the predicted positions are calculated depends on the user agent, but they are based on past points, current velocity, and trajectory.\n<p>Applications can use the predicted events to \"draw ahead\" to a predicted position which may reduce perceived latency depending on the application's interpretation of the predicted events and the use case.\n<p>For an illustration of predicted events, see <a href=\"https://w3c.github.io/pointerevents/#figure_predicted\" class=\"external\" target=\"_blank\">Figure 8 in the specification</a>.",
|
||
"returns": "A sequence of <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> instances."
|
||
},
|
||
"pointerevent.height": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/height",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>height</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the height of the pointer's contact\ngeometry, along the y-axis (in CSS pixels). Depending on the source of the pointer\ndevice (for example a finger), for a given pointer, each event may produce a different\nvalue.\n<p>If the input hardware cannot report the contact geometry to the browser, the height\ndefaults to <code>1</code>."
|
||
},
|
||
"pointerevent.isprimary": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/isprimary",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>isPrimary</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface indicates whether or not the pointer device that\ncreated the event is the <em>primary</em> pointer. It returns <code>true</code> if the\npointer that caused the event to be fired is the primary one and returns\n<code>false</code> otherwise.\n<p>In a multi-pointer scenario (such as a touch screen that supports more than one touch\npoint), this property is used to identify a <em>master pointer</em> among the set of\nactive pointers for each pointer type. Only a primary pointer will produce\n<em>compatibility mouse events</em>. Authors who desire only single-pointer interaction\ncan achieve that by ignoring non-primary pointers.\n<p>A pointer is considered primary if the pointer represents a mouse device. A pointer\nrepresenting pen input is considered the primary pen input if its\n<a href=\"$MDN_URL$/Web/API/Element/pointerdown_event\" ><code>pointerdown</code></a> event was dispatched when no other active pointers representing\npen input existed. A pointer representing touch input is considered the primary touch\ninput if its <a href=\"$MDN_URL$/Web/API/Element/pointerdown_event\" ><code>pointerdown</code></a> event was dispatched when no other active pointers\nrepresenting touch input existed.\n<p>When two or more pointer device types are being used concurrently, multiple pointers\n(one for each <a href=\"$MDN_URL$/Web/API/PointerEvent/pointerType\" ><code>pointerType</code></a>) are considered\nprimary. For example, a touch contact and a mouse cursor moved simultaneously will\nproduce pointers that are both considered primary. If there are multiple primary\npointers, these pointers will all produce <em>compatibility mouse events</em> (see\n<a href=\"$MDN_URL$/Web/API/Pointer_events\"><code>Pointer_events</code></a> for more information about pointer, mouse and touch\ninteraction)."
|
||
},
|
||
"pointerevent.pointerevent": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/pointerevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>PointerEvent()</code></strong> constructor creates a new synthetic\nand untrusted <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> object instance.",
|
||
"parameters": {
|
||
"type": "A string representing the name of the event (see <a href=\"$MDN_URL$/Web/API/PointerEvent#pointer_event_types\">PointerEvent event types</a>).",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/MouseEvent/MouseEvent\" ><code>MouseEvent()</code></a></em>, can have the following properties: <dl> <dt id=\"pointerid\"><a href=\"#pointerid\"><code>pointerId</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/pointerId\"><code>PointerEvent.pointerId</code></a>. </dd> <dt id=\"width\"><a href=\"#width\"><code>width</code></a></dt> <dd> <p>A number,, defaulting to <code>1</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/width\"><code>PointerEvent.width</code></a>. </dd> <dt id=\"height\"><a href=\"#height\"><code>height</code></a></dt> <dd> <p>A number,, defaulting to <code>1</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/height\"><code>PointerEvent.height</code></a>. </dd> <dt id=\"pressure\"><a href=\"#pressure\"><code>pressure</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/pressure\"><code>PointerEvent.pressure</code></a>. </dd> <dt id=\"tangentialpressure\"><a href=\"#tangentialpressure\"><code>tangentialPressure</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/tangentialPressure\"><code>PointerEvent.tangentialPressure</code></a>. </dd> <dt id=\"tiltx\"><a href=\"#tiltx\"><code>tiltX</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltX\"><code>PointerEvent.tiltX</code></a>. </dd> <dt id=\"tilty\"><a href=\"#tilty\"><code>tiltY</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/tiltY\"><code>PointerEvent.tiltY</code></a>. </dd> <dt id=\"twist\"><a href=\"#twist\"><code>twist</code></a></dt> <dd> <p>A number, defaulting to <code>0</code>, that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/twist\"><code>PointerEvent.twist</code></a>. </dd> <dt id=\"pointertype\"><a href=\"#pointertype\"><code>pointerType</code></a></dt> <dd> <p>A string, defaulting to <code>\"\"</code> that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/pointerType\"><code>PointerEvent.pointerType</code></a>. </dd> <dt id=\"isprimary\"><a href=\"#isprimary\"><code>isPrimary</code></a></dt> <dd> <p>A boolean value, defaulting to <code>false</code> that sets the value of the instance's <a href=\"$MDN_URL$/Web/API/PointerEvent/isPrimary\"><code>PointerEvent.isPrimary</code></a>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> object."
|
||
},
|
||
"pointerevent.pointerid": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/pointerid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>pointerId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface is an identifier assigned to a given pointer\nevent. The identifier is unique, being different from the identifiers of all other\nactive pointer events. Since the value may be randomly generated, it is not guaranteed\nto convey any particular meaning."
|
||
},
|
||
"pointerevent.pointertype": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/pointertype",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>pointerType</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface indicates the device type (mouse, pen, or touch)\nthat caused a given pointer event."
|
||
},
|
||
"pointerevent.pressure": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/pressure",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>pressure</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface indicates the normalized pressure of the pointer\ninput."
|
||
},
|
||
"pointerevent.tangentialpressure": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/tangentialpressure",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Firefox": "59",
|
||
"Opera": "44",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>tangentialPressure</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the normalized tangential pressure of\nthe pointer input (also known as barrel pressure or <a href=\"https://en.wikipedia.org/wiki/Cylinder_stress\" class=\"external\" target=\"_blank\">cylinder stress</a>)."
|
||
},
|
||
"pointerevent.tiltx": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/tiltx",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>tiltX</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface is the angle (in degrees) between the <em>Y-Z\nplane</em> of the pointer and the screen. This property is typically only useful for a\npen/stylus pointer type.\n<p>For an illustration of this property see <a href=\"https://w3c.github.io/pointerevents/#dom-pointerevent-tiltx\" class=\"external\" target=\"_blank\">Figure 2 in the specification</a>."
|
||
},
|
||
"pointerevent.tilty": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/tilty",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>tiltY</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface is the angle (in degrees) between the <em>X-Z\nplane</em> of the pointer and the screen. This property is typically only useful for a\npen/stylus pointer type.\n<p>For an illustration of this property, see <a href=\"https://w3c.github.io/pointerevents/#dom-pointerevent-tilty\" class=\"external\" target=\"_blank\">Figure 3 in the specification</a>."
|
||
},
|
||
"pointerevent.twist": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/twist",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "18",
|
||
"Firefox": "59",
|
||
"Opera": "44",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>twist</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the clockwise rotation of the pointer\n(e.g., pen stylus) around its major axis, in degrees."
|
||
},
|
||
"pointerevent.width": {
|
||
"url": "$MDN_URL$/web/api/pointerevent/width",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "55",
|
||
"ChromeAndroid": "55",
|
||
"Edge": "",
|
||
"Firefox": "59",
|
||
"Opera": "42",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "The <strong><code>width</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PointerEvent\"><code>PointerEvent</code></a> interface represents the width of the pointer's contact\ngeometry along the x-axis, measured in CSS pixels. Depending on the source of the\npointer device (such as a finger), for a given pointer, each event may produce a\ndifferent value.\n<p>If the input hardware cannot report the contact geometry to the browser, the width\ndefaults to <code>1</code>."
|
||
},
|
||
"popstateevent": {
|
||
"url": "$MDN_URL$/web/api/popstateevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "4",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "4",
|
||
"Opera": "12.1",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "<strong><code>PopStateEvent</code></strong> is an interface for the <a href=\"$MDN_URL$/Web/API/Window/popstate_event\"><code>popstate</code></a> event.\n<p>A <code>popstate</code> event is dispatched to the window every time the active history\nentry changes between two history entries for the same document. If the history entry\nbeing activated was created by a call to <code>history.pushState()</code> or was\naffected by a call to <code>history.replaceState()</code>, the <code>popstate</code>\nevent's <code>state</code> property contains a copy of the history entry's state object."
|
||
},
|
||
"popstateevent.popstateevent": {
|
||
"url": "$MDN_URL$/web/api/popstateevent/popstateevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "14",
|
||
"Firefox": "11",
|
||
"Opera": "15",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>PopStateEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/PopStateEvent\"><code>PopStateEvent</code></a> object.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> A web developer doesn't typically need to call this constructor, as the browser creates these objects itself when firing <a href=\"$MDN_URL$/Web/API/Window/popstate_event\" ><code>popstate</code></a> events.\n</div>",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>popstate</code>.",
|
||
"options": "An object that, <em>in addition to the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, has the following property: <dl> <dt id=\"state\"><a href=\"#state\"><code>state</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>An object representing the state. Practically it is a value provided by the call to <a href=\"$MDN_URL$/Web/API/History/pushState\"><code>history.pushState()</code></a> or <a href=\"$MDN_URL$/Web/API/History/replaceState\"><code>history.replaceState()</code></a>. If not set, it defaults to <code>null</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PopStateEvent\"><code>PopStateEvent</code></a> object."
|
||
},
|
||
"popstateevent.state": {
|
||
"url": "$MDN_URL$/web/api/popstateevent/state",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "4",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "4",
|
||
"Opera": "12.1",
|
||
"Safari": "6",
|
||
"SafariIOS": "6"
|
||
},
|
||
"doc": "The <strong><code>state</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PopStateEvent\"><code>PopStateEvent</code></a> interface represents the state stored when the event was created.\n<p>Practically it is a value provided by the call to <a href=\"$MDN_URL$/Web/API/History/pushState\"><code>history.pushState()</code></a> or <a href=\"$MDN_URL$/Web/API/History/replaceState\"><code>history.replaceState()</code></a>"
|
||
},
|
||
"positionsensorvrdevice": {
|
||
"url": "$MDN_URL$/web/api/positionsensorvrdevice",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>PositionSensorVRDevice</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/WebVR_API\">WebVR API</a> represents VR hardware's position sensor. You can access information such as the current position and orientation of the sensor in relation to the head mounted display through the <a href=\"$MDN_URL$/Web/API/PositionSensorVRDevice/getState\"><code>PositionSensorVRDevice.getState()</code></a> method."
|
||
},
|
||
"positionsensorvrdevice.getimmediatestate": {
|
||
"url": "$MDN_URL$/web/api/positionsensorvrdevice/getimmediatestate",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>getImmediateState()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/VRDisplay\"><code>VRDisplay</code></a> interface returns the current instantaneous position sensor state. This is intended to only be used rarely, for certain special uses, for example sampling the immediate position of a hand orientation sensor — or at least it will be, in the future.\n<p>For most standard uses, you'll probably want to use <a href=\"$MDN_URL$/Web/API/PositionSensorVRDevice/getState\"><code>PositionSensorVRDevice.getState</code></a> instead.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/VRPose\"><code>VRPose</code></a> object."
|
||
},
|
||
"positionsensorvrdevice.getstate": {
|
||
"url": "$MDN_URL$/web/api/positionsensorvrdevice/getstate",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>getState()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PositionSensorVRDevice\"><code>PositionSensorVRDevice</code></a> interface returns the current state of the position sensor for the current frame (e.g. within the current <a href=\"$MDN_URL$/Web/API/window/requestAnimationFrame\"><code>window.requestAnimationFrame</code></a> callback) or for the previous frame, contained with a <a href=\"$MDN_URL$/Web/API/VRPose\"><code>VRPose</code></a> object. This is the method you'd normally want to use, vs. <a href=\"$MDN_URL$/Web/API/PositionSensorVRDevice/getImmediateState\"><code>PositionSensorVRDevice.getImmediateState</code></a>.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/VRPose\"><code>VRPose</code></a> object."
|
||
},
|
||
"positionsensorvrdevice.resetsensor": {
|
||
"url": "$MDN_URL$/web/api/positionsensorvrdevice/resetsensor",
|
||
"status": [
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div><div class=\"notecard nonstandard\" id=\"sect2\"><p><strong>Non-standard:</strong> 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.</div>\n<p>The <strong><code>resetSensor()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/VRDisplay\"><code>VRDisplay</code></a> interface <em>can be used to reset the sensor if desired, returning the</em> position and orientation values to zero.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"presentation": {
|
||
"url": "$MDN_URL$/web/api/presentation",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>Presentation</code></strong> can be defined as two possible user agents in the context: <em>Controlling user agent</em> and <em>Receiving user agent</em>.\n<p>In controlling browsing context, the <code>Presentation</code> interface provides a mechanism to override the browser default behavior of launching presentation to external screen. In receiving browsing context, <code>Presentation</code> interface provides the access to the available presentation connections."
|
||
},
|
||
"presentation.defaultrequest": {
|
||
"url": "$MDN_URL$/web/api/presentation/defaultrequest",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>In a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a>, the <strong><code>defaultRequest</code></strong> attribute <em>MUST</em> return the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-default-presentation-request\" class=\"external\" target=\"_blank\">default presentation request</a> if any, otherwise <code>null</code>. In a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-receiving-browsing-context\" class=\"external\" target=\"_blank\">receiving browsing context</a>, it <em>MUST</em> return <code>null</code>.\n<p>If set by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controller\" class=\"external\" target=\"_blank\">controller</a>, the value of the <code>defaultRequest</code> attribute <em>SHOULD</em> be used by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> as the <em>default presentation request</em> for that <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-browsing-context\" class=\"external\" target=\"_blank\">controlling browsing context</a>. If the document object's <a href=\"https://www.w3.org/TR/presentation-api/#dfn-active-sandboxing-flag-set\" class=\"external\" target=\"_blank\">active sandboxing flag set</a> has the <a href=\"https://www.w3.org/TR/presentation-api/#sandboxed-presentation-browsing-context-flag\" class=\"external\" target=\"_blank\">sandboxed presentation browsing context flag</a> set, the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> <em>SHOULD</em> act as if the default request is not set for that browsing context. When the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> wishes to initiate a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> on the behalf of that browsing context, it <em>MUST</em> <a href=\"https://www.w3.org/TR/presentation-api/#dfn-start-a-presentation\" class=\"external\" target=\"_blank\">start a presentation</a> using the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-default-presentation-request\" class=\"external\" target=\"_blank\">default presentation request</a> for the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controller\" class=\"external\" target=\"_blank\">controller</a> (as if the controller had called <a href=\"$MDN_URL$/Web/API/PresentationRequest/start\" ><code>defaultRequest.start()</code></a>).\n<p>The <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> <em>SHOULD</em> initiate presentation using the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-default-presentation-request\" class=\"external\" target=\"_blank\">default presentation request</a>, only when the user has expressed an intention to do so via a user gesture. For example, by clicking a button in the browser.\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> Some <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agents</a> may allow the user to initiate a default <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> and select a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-display\" class=\"external\" target=\"_blank\">presentation display</a> with the same user gesture. For example, the browser chrome could allow the user to pick a display from a menu, or allow the user to tap on an <a href=\"https://nfc-forum.org/\" class=\"external\" target=\"_blank\">Near Field Communications (NFC)</a> enabled display. In this case, when the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> asks for permission while <a href=\"https://www.w3.org/TR/presentation-api/#dfn-start-a-presentation\" class=\"external\" target=\"_blank\">starting a presentation</a>, the browser could offer that display as the default choice, or consider the gesture as granting permission for the display and bypass display selection entirely.\n</div>\n<div class=\"notecard note\" id=\"sect4\">\n<p><strong>Note:</strong> If a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> does not support initiation of a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> from the browser chrome, setting <code>defaultRequest</code> will have no effect.\n</div>"
|
||
},
|
||
"presentation.receiver": {
|
||
"url": "$MDN_URL$/web/api/presentation/receiver",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong>read-only</strong> <a href=\"$MDN_URL$/Web/API/Presentation\"><code>Presentation</code></a> attribute\n<code>receiver</code>, which is only available in browser contexts which are\n<strong>receiving</strong> a presentation, returns the\n<a href=\"$MDN_URL$/Web/API/PresentationReceiver\"><code>PresentationReceiver</code></a> object which can be used to access and communicate\nwith the browser context which controls the presentation. This property is always\n<code>null</code> when accessed from outside a browser context which is receiving a\npresentation."
|
||
},
|
||
"presentationavailability": {
|
||
"url": "$MDN_URL$/web/api/presentationavailability",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>A <strong><code>PresentationAvailability</code></strong> object is associated with available <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-display\" class=\"external\" target=\"_blank\">presentation displays</a> and represents the <em>presentation display availability</em> for a presentation request. If the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> can <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a> in the background (without a pending request to <code>start()</code>), the <code>PresentationAvailability</code> object <em>MUST</em> be implemented in a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-browsing-context\" class=\"external\" target=\"_blank\">controlling browsing context</a>.\n<p>The <code>value</code> attribute <em>MUST</em> return the last value it was set to. The value is updated by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a> algorithm.\n<p>The <code>onchange</code> attribute is an <a href=\"https://www.w3.org/TR/presentation-api/#dfn-event-handler\" class=\"external\" target=\"_blank\">event handler</a> whose corresponding <a href=\"https://www.w3.org/TR/presentation-api/#dfn-event-handler-event-type\" class=\"external\" target=\"_blank\">event handler event type</a> is <code>change</code>."
|
||
},
|
||
"presentationavailability.value": {
|
||
"url": "$MDN_URL$/web/api/presentationavailability/value",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>value</code></strong> attribute <em>MUST</em> return the last value from which it was set. The value is updated by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a> algorithm.\n<p>The <code>onchange</code> attribute is an <a href=\"https://www.w3.org/TR/presentation-api/#dfn-event-handler\" class=\"external\" target=\"_blank\">event handler</a> whose corresponding <a href=\"https://www.w3.org/TR/presentation-api/#dfn-event-handler-event-type\" class=\"external\" target=\"_blank\">event handler event type</a> is <code>change</code>."
|
||
},
|
||
"presentationconnection": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PresentationConnection</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Presentation_API\">Presentation API</a> provides methods and properties for managing a single presentation. Each <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> is represented by a <code>PresentationConnection</code> object. Both the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> and <a href=\"https://www.w3.org/TR/presentation-api/#dfn-receiving-user-agent\" class=\"external\" target=\"_blank\">receiving user agent</a> <em>MUST</em> implement <code>PresentationConnection</code>."
|
||
},
|
||
"presentationconnection.binarytype": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/binarytype",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> object is created, its <code>binaryType</code> IDL attribute <em>MUST</em> be set to the string <code>\"arraybuffer\"</code>. Upon getting, the attribute <em>MUST</em> return its most recent value (the value it was last set as). Upon setting, the user agent <em>MUST</em> set the IDL attribute to the new value.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> The <code>binaryType</code> attribute allows authors to control how binary data is exposed to scripts. By setting the attribute to <code>\"blob\"</code>, binary data is returned in <code>Blob</code> form; by setting it to <code>\"arraybuffer\"</code>, it is returned in <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> form. The attribute defaults to <code>\"arraybuffer\"</code>. This attribute has no effect on data sent in a string form.\n</div>"
|
||
},
|
||
"presentationconnection.close": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/close",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Opera": "36"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When the <code>close()</code> method is called on a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a>, the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> begins the process of closing the connection by sending an empty <code>closeMessage</code> with the <code>closeReason</code> set to <code>closed</code>.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"presentationconnection.id": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/id",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>id</code></strong> attribute specifies the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-identifier\" class=\"external\" target=\"_blank\">presentation identifier</a> of a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a>."
|
||
},
|
||
"presentationconnection.send": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/send",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>send()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> interface tells a controlling browsing context to\nsend binary or text data to a presenting browsing context.",
|
||
"parameters": {
|
||
"data": "The data to send to the presentation context. It will be one of the following: <ul> <li><a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/String\"><code>String</code></a></li> <li><a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a></li> <li><a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Array\"><code>Array</code></a></li> </ul>"
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"presentationconnection.state": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/state",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>state</code></strong> attribute reflects the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a>'s current state. Depending on the current <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnectionstate\" class=\"external\" target=\"_blank\"><code>PresentationConnectionState</code></a>, the <code>state</code> attribute can hold one of the following values.\n<ul>\n<li><strong><code>connecting</code></strong>: The user agent is attempting to <a href=\"https://www.w3.org/TR/presentation-api/#dfn-establish-a-presentation-connection\" class=\"external\" target=\"_blank\">establish a presentation connection</a> with the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-destination-browsing-context\" class=\"external\" target=\"_blank\">destination browsing context</a>. This is the initial state when a <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnection\" class=\"external\" target=\"_blank\"><code>PresentationConnection</code></a> object is created.</li>\n<li><strong><code>connected</code></strong>: The <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> is established and communication is possible.</li>\n<li><strong><code>closed</code></strong>: The <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> has been closed or could not be opened. The connection may be reopened by calling <a href=\"https://www.w3.org/TR/presentation-api/#dom-presentationrequest-reconnect\" class=\"external\" target=\"_blank\"><code>reconnect()</code></a>. No communication is possible in this state.</li>\n<li><strong><code>terminated</code></strong>: The <a href=\"https://www.w3.org/TR/presentation-api/#dfn-receiving-browsing-context\" class=\"external\" target=\"_blank\">receiving browsing context</a> has terminated. Any <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-connection\" class=\"external\" target=\"_blank\">presentation connection</a> to that <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation\" class=\"external\" target=\"_blank\">presentation</a> has also terminated and cannot be reopened. No communication is possible.</li>\n</ul>"
|
||
},
|
||
"presentationconnection.terminate": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/terminate",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "48",
|
||
"ChromeAndroid": "48",
|
||
"Edge": "79",
|
||
"Opera": "35"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When the <code>terminate()</code> method is called on a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a>, the <a href=\"$MDN_URL$/Glossary/User_agent\">user agent</a> begins the process of terminating the presentation. The exact process differs depending on whether <code>terminate()</code> is called in the controlling or the presenting context.",
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
},
|
||
"presentationconnection.url": {
|
||
"url": "$MDN_URL$/web/api/presentationconnection/url",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "57",
|
||
"ChromeAndroid": "57",
|
||
"Edge": "79",
|
||
"Opera": "44"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>url</code></strong> readonly property of the\n<a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> interface returns the URL used to create or\nreconnect to the presentation."
|
||
},
|
||
"presentationconnectionavailableevent": {
|
||
"url": "$MDN_URL$/web/api/presentationconnectionavailableevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PresentationConnectionAvailableEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Presentation_API\">Presentation API</a> is fired on a <a href=\"$MDN_URL$/Web/API/PresentationRequest\"><code>PresentationRequest</code></a> when a connection associated with the object is created.\n<p>A <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> <a href=\"https://www.w3.org/TR/presentation-api/#dfn-firing-an-event\" class=\"external\" target=\"_blank\">fires</a> a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-trusted-event\" class=\"external\" target=\"_blank\">trusted event</a> named <a href=\"https://www.w3.org/TR/presentation-api/#dfn-connectionavailable\" class=\"external\" target=\"_blank\"><code>connectionavailable</code></a> on a <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationrequest\" class=\"external\" target=\"_blank\"><code>PresentationRequest</code></a> when a connection associated with the object is created. It is fired at the <code>PresentationRequest</code> instance, using the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnectionavailableevent\" class=\"external\" target=\"_blank\"><code>PresentationConnectionAvailableEvent</code></a> interface, with the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnectionavailableevent-connection\" class=\"external\" target=\"_blank\"><code>connection</code></a> attribute set to the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnection\" class=\"external\" target=\"_blank\"><code>PresentationConnection</code></a> object that was created. The event is fired for each connection that is created for the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controller\" class=\"external\" target=\"_blank\">controller</a>, either by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controller\" class=\"external\" target=\"_blank\">controller</a> calling <code>start()</code> or <code>reconnect()</code>, or by the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a> creating a connection on the controller's behalf via <a href=\"https://www.w3.org/TR/presentation-api/#dom-presentation-defaultrequest\" class=\"external\" target=\"_blank\"><code>defaultRequest</code></a>."
|
||
},
|
||
"presentationconnectionavailableevent.connection": {
|
||
"url": "$MDN_URL$/web/api/presentationconnectionavailableevent/connection",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When an incoming connection is created, a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-receiving-user-agent\" class=\"external\" target=\"_blank\">receiving user agent</a> <a href=\"https://www.w3.org/TR/presentation-api/#dfn-firing-an-event\" class=\"external\" target=\"_blank\">fires</a> a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-trusted-event\" class=\"external\" target=\"_blank\">trusted event</a>, named <a href=\"https://www.w3.org/TR/presentation-api/#dfn-connectionavailable\" class=\"external\" target=\"_blank\"><code>connectionavailable</code></a>, on a <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationreceiver\" class=\"external\" target=\"_blank\"><code>PresentationReceiver</code></a>. The <a href=\"https://www.w3.org/TR/presentation-api/#dfn-trusted-event\" class=\"external\" target=\"_blank\">trusted event</a> is fired at the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-controllers-monitor\" class=\"external\" target=\"_blank\">presentation controller's monitor</a>, using the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnectionavailableevent\" class=\"external\" target=\"_blank\"><code>PresentationConnectionAvailableEvent</code></a> interface, with the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnectionavailableevent-connection\" class=\"external\" target=\"_blank\"><code>connection</code></a> attribute set to the <a href=\"https://www.w3.org/TR/presentation-api/#idl-def-presentationconnection\" class=\"external\" target=\"_blank\"><code>PresentationConnection</code></a> object that was created.\n<p>The event is fired for all connections that are created when <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitoring-incoming-presentation-connections\" class=\"external\" target=\"_blank\">monitoring incoming presentation connections</a>."
|
||
},
|
||
"presentationconnectionavailableevent.presentationconnectionavailableevent": {
|
||
"url": "$MDN_URL$/web/api/presentationconnectionavailableevent/presentationconnectionavailableevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PresentationConnectionAvailableEvent()</code></strong> constructor creates a new <a href=\"$MDN_URL$/Web/API/PresentationConnectionAvailableEvent\"><code>PresentationConnectionAvailableEvent</code></a> object.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>connectionavailable</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"connection\"><a href=\"#connection\"><code>connection</code></a></dt> <dd> <p>The association <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> object. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PresentationConnectionAvailableEvent\"><code>PresentationConnectionAvailableEvent</code></a> object."
|
||
},
|
||
"presentationconnectioncloseevent": {
|
||
"url": "$MDN_URL$/web/api/presentationconnectioncloseevent",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "79",
|
||
"Opera": "37"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PresentationConnectionCloseEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Presentation_API\">Presentation API</a> is fired on a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> when it is closed."
|
||
},
|
||
"presentationconnectionlist": {
|
||
"url": "$MDN_URL$/web/api/presentationconnectionlist",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p><code>PresentationConnectionList</code> is the collection of incoming presentation connections."
|
||
},
|
||
"presentationreceiver": {
|
||
"url": "$MDN_URL$/web/api/presentationreceiver",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "59",
|
||
"ChromeAndroid": "59",
|
||
"Edge": "79",
|
||
"Opera": "46"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div><div class=\"notecard experimental\" id=\"sect2\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PresentationReceiver</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Presentation_API\">Presentation API</a> provides a means for a receiving browsing context to access controlling browsing contexts and communicate with them."
|
||
},
|
||
"presentationrequest": {
|
||
"url": "$MDN_URL$/web/api/presentationrequest",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>A <code>PresentationRequest</code> object is used to initiate or reconnect to a presentation made by a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-browsing-context\" class=\"external\" target=\"_blank\">controlling browsing context</a>. The <code>PresentationRequest</code> object <em>MUST</em> be implemented in a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-browsing-context\" class=\"external\" target=\"_blank\">controlling browsing context</a> provided by a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-user-agent\" class=\"external\" target=\"_blank\">controlling user agent</a>.\n<p>When a <code>PresentationRequest</code> is constructed, the given <code>urls</code> <em>MUST</em> be used as the list of <em>presentation request URLs</em> which are each a possible <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-url\" class=\"external\" target=\"_blank\">presentation URL</a> for the <code>PresentationRequest</code> instance."
|
||
},
|
||
"presentationrequest.getavailability": {
|
||
"url": "$MDN_URL$/web/api/presentationrequest/getavailability",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When the <code>getAvailability()</code> method is called, the user agent <em>MUST</em> run the following steps:\n<dl>\n<dt id=\"input\"><a href=\"#input\">Input</a></dt>\n<dd>\n<p><em>presentationUrls</em>, a list of <a href=\"https://www.w3.org/TR/presentation-api/#dfn-presentation-request-urls\" class=\"external\" target=\"_blank\">presentation request URLs</a>\n</dd>\n<dt id=\"output\"><a href=\"#output\">Output</a></dt>\n<dd>\n<p><em>P</em>, a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-promise\" class=\"external\" target=\"_blank\">Promise</a>\n</dd>\n</dl>\n<ol>\n<li>If one of the following conditions is true:\n<ul>\n<li>The result of running the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-prohibits-mixed-security-contexts-algorithm\" class=\"external\" target=\"_blank\">prohibits mixed security contexts algorithm</a> on the document's <a href=\"https://www.w3.org/TR/presentation-api/#dfn-settings-object\" class=\"external\" target=\"_blank\">settings object</a> is <code>\"Prohibits Mixed Security Contexts\"</code> and <em>presentationUrl</em> is an <a href=\"https://www.w3.org/TR/presentation-api/#dfn-a-priori-unauthenticated-url\" class=\"external\" target=\"_blank\">a priori unauthenticated URL</a>.</li>\n<li>The document object's <a href=\"https://www.w3.org/TR/presentation-api/#dfn-active-sandboxing-flag-set\" class=\"external\" target=\"_blank\">active sandboxing flag set</a> has the <a href=\"https://www.w3.org/TR/presentation-api/#sandboxed-presentation-browsing-context-flag\" class=\"external\" target=\"_blank\">sandboxed presentation browsing context flag</a> set.</li>\n</ul>Run the following substeps:\n<ol>\n<li>Return a <a href=\"https://www.w3.org/TR/presentation-api/#dfn-promise\" class=\"external\" target=\"_blank\">Promise</a> rejected with a <code>SecurityError</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a>.</li>\n<li>Abort these steps.</li>\n</ol>\n</li>\n<li>Let <em>P</em> be a new <a href=\"https://www.w3.org/TR/presentation-api/#dfn-promise\" class=\"external\" target=\"_blank\">Promise</a>.</li>\n<li>Return <em>P</em>, but continue running these steps <a href=\"https://www.w3.org/TR/presentation-api/#dfn-in-parallel\" class=\"external\" target=\"_blank\">in parallel</a>.</li>\n<li>If the user agent is unable to <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a> for the entire duration of the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-controlling-browsing-context\" class=\"external\" target=\"_blank\">controlling browsing context</a> (e.g., because the user has disabled this feature), then:\n<ol>\n<li><a href=\"https://www.w3.org/TR/presentation-api/#dfn-resolving-a-promise\" class=\"external\" target=\"_blank\">Resolve</a> <em>P</em> with a new <code>PresentationAvailability</code> object with its <code>value</code> property set to <code>false</code>.</li>\n<li>Abort all the remaining steps.</li>\n</ol>\n</li>\n<li>If the user agent is unable to continuously <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a> but can find presentation displays in order to start a connection, then:\n<ol>\n<li><a href=\"https://www.w3.org/TR/presentation-api/#dfn-rejecting-a-promise\" class=\"external\" target=\"_blank\">Reject</a> <em>P</em> with a <code>NotSupportedError</code> <a href=\"$MDN_URL$/Web/API/DOMException\"><code>DOMException</code></a>.</li>\n<li>Abort all the remaining steps.</li>\n</ol>\n</li>\n<li>If there exists a tuple (<em>A</em>, <em>presentationUrls</em>) in the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-set-of-availability-objects\" class=\"external\" target=\"_blank\">set of availability objects</a>, then:\n<ol>\n<li><a href=\"https://www.w3.org/TR/presentation-api/#dfn-resolving-a-promise\" class=\"external\" target=\"_blank\">Resolve</a> <em>P</em> with <em>A</em>.</li>\n<li>Abort all the remaining steps.</li>\n</ol>\n</li>\n<li>Let <em>A</em> be a new <code>PresentationAvailability</code> object with its <code>value</code> property set as follows:\n<ol>\n<li><code>false</code> if the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">list of available presentation displays</a> is empty.</li>\n<li><code>true</code> if there is at least one <a href=\"https://www.w3.org/TR/presentation-api/#dfn-compatible-presentation-display\" class=\"external\" target=\"_blank\">compatible presentation display</a> for some member of <em>presentationUrls</em>. Meaning there is an entry <em>(presentationUrl, display)</em> in the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">list of available presentation displays</a> for some <em>presentationUrl</em> in <em>presentationUrls</em>.</li>\n<li><code>false</code> otherwise.</li>\n</ol>\n</li>\n<li>Create a tuple (<em>A</em>, <em>presentationUrls</em>) and add it to the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-set-of-availability-objects\" class=\"external\" target=\"_blank\">set of availability objects</a>.</li>\n<li>Run the algorithm to <a href=\"https://www.w3.org/TR/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays\" class=\"external\" target=\"_blank\">monitor the list of available presentation displays</a>.</li>\n<li><a href=\"https://www.w3.org/TR/presentation-api/#dfn-resolving-a-promise\" class=\"external\" target=\"_blank\">Resolve</a> <em>P</em> with <em>A</em>.</li>\n</ol>"
|
||
},
|
||
"presentationrequest.presentationrequest": {
|
||
"url": "$MDN_URL$/web/api/presentationrequest/presentationrequest",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>PresentationRequest()</code></strong>\nconstructor creates a new <a href=\"$MDN_URL$/Web/API/PresentationRequest\"><code>PresentationRequest</code></a> object which creates a\nnew PresentationRequest.",
|
||
"parameters": {
|
||
"url or urls\\[]": "A URL or array of URLs that are possible URLs used to create, or reconnect, a presentation for the PresentationRequest instance."
|
||
}
|
||
},
|
||
"presentationrequest.reconnect": {
|
||
"url": "$MDN_URL$/web/api/presentationrequest/reconnect",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>When the <code>reconnect(presentationId)</code> method is called on a <code>PresentationRequest</code> <em>presentationRequest</em>, the <a href=\"https://www.w3.org/TR/presentation-api/#dfn-user-agents\" class=\"external\" target=\"_blank\">user agent</a> <em>MUST</em> run the following steps to <em>reconnect to a presentation</em>:"
|
||
},
|
||
"presentationrequest.start": {
|
||
"url": "$MDN_URL$/web/api/presentationrequest/start",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "47",
|
||
"ChromeAndroid": "47",
|
||
"Edge": "79",
|
||
"Opera": "34"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div>\n<p>The <strong><code>start()</code></strong> property of the <a href=\"$MDN_URL$/Web/API/PresentationRequest\"><code>PresentationRequest</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a> after the user agent prompts the user to select a display and grant permission to use that display.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves with a <a href=\"$MDN_URL$/Web/API/PresentationConnection\"><code>PresentationConnection</code></a>."
|
||
},
|
||
"processinginstruction": {
|
||
"url": "$MDN_URL$/web/api/processinginstruction",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The <strong><code>ProcessingInstruction</code></strong> interface represents a <a href=\"https://www.w3.org/TR/xml/#sec-pi\" class=\"external\" target=\"_blank\">processing instruction</a>; that is, a <a href=\"$MDN_URL$/Web/API/Node\"><code>Node</code></a> which embeds an instruction targeting a specific application but that can be ignored by any other applications which don't recognize the instruction.\n<div class=\"notecard warning\" id=\"sect1\">\n<p><strong>Warning:</strong> <code>ProcessingInstruction</code> nodes are only supported in XML documents, not in HTML documents. In these, a process instruction will be considered as a comment and be represented as a <a href=\"$MDN_URL$/Web/API/Comment\"><code>Comment</code></a> object in the tree.\n</div>\n<p>A processing instruction may be different than the <a href=\"$MDN_URL$/Web/XML/XML_introduction#xml_declaration\">XML declaration</a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> User-defined processing instructions cannot begin with \"<code>xml</code>\", as <code>xml</code>-prefixed processing-instruction target names are reserved by the XML specification for particular, standard uses (see, for example, <code><?xml-stylesheet ?></code>.\n</div>\n<p>For example:\n<div class=\"code-example\"><div>\n```html\n<?xml version=\"1.0\"?>\n```\n</div></div>\n<p>is a processing instruction whose <code>target</code> is <code>xml</code>."
|
||
},
|
||
"processinginstruction.sheet": {
|
||
"url": "$MDN_URL$/web/api/processinginstruction/sheet",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "79",
|
||
"Firefox": "",
|
||
"Opera": "15",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>sheet</code></strong> property of the <a href=\"$MDN_URL$/Web/API/ProcessingInstruction\"><code>ProcessingInstruction</code></a> interface\ncontains the stylesheet associated to the <code>ProcessingInstruction</code>.\n<p>The <code>xml-stylesheet</code> processing instruction is used to associate a stylesheet in an XML file."
|
||
},
|
||
"processinginstruction.target": {
|
||
"url": "$MDN_URL$/web/api/processinginstruction/target",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "",
|
||
"Opera": "12.1",
|
||
"Safari": "",
|
||
"SafariIOS": ""
|
||
},
|
||
"doc": "The read-only <strong><code>target</code></strong> property of the <a href=\"$MDN_URL$/Web/API/ProcessingInstruction\"><code>ProcessingInstruction</code></a> interface\nrepresent the application to which the <code>ProcessingInstruction</code> is targeted.\n<p>For example:\n<div class=\"code-example\"><div>\n```html\n<?xml version=\"1.0\"?>\n```\n</div></div>\n<p>is a processing instruction whose <code>target</code> is <code>xml</code>."
|
||
},
|
||
"progressevent": {
|
||
"url": "$MDN_URL$/web/api/progressevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2",
|
||
"Deno": "1.3"
|
||
},
|
||
"doc": "The <strong><code>ProgressEvent</code></strong> interface represents events measuring progress of an underlying process, like an HTTP request (for an <code>XMLHttpRequest</code>, or the loading of the underlying resource of an <a href=\"$MDN_URL$/Web/HTML/Element/img\"><code><img></code></a>, <a href=\"$MDN_URL$/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"$MDN_URL$/Web/HTML/Element/video\"><code><video></code></a>, <a href=\"$MDN_URL$/Web/HTML/Element/style\"><code><style></code></a> or <a href=\"$MDN_URL$/Web/HTML/Element/link\"><code><link></code></a>)."
|
||
},
|
||
"progressevent.lengthcomputable": {
|
||
"url": "$MDN_URL$/web/api/progressevent/lengthcomputable",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2",
|
||
"Deno": "1.3"
|
||
},
|
||
"doc": "The\n<strong><code>ProgressEvent.lengthComputable</code></strong> read-only property is a\nboolean flag indicating if the resource concerned by the\n<a href=\"$MDN_URL$/Web/API/ProgressEvent\"><code>ProgressEvent</code></a> has a length that can be calculated. If not, the\n<a href=\"$MDN_URL$/Web/API/ProgressEvent/total\"><code>ProgressEvent.total</code></a> property has no significant value."
|
||
},
|
||
"progressevent.loaded": {
|
||
"url": "$MDN_URL$/web/api/progressevent/loaded",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2",
|
||
"Deno": "1.3"
|
||
},
|
||
"doc": "The <strong><code>ProgressEvent.loaded</code></strong> read-only property is an integer\nrepresenting the amount of work already performed by the underlying process. The ratio\nof work done can be calculated with the property and <code>ProgressEvent.total</code>.\nWhen downloading a resource using HTTP, this value is specified in bytes (not bits), and only represents the part of the content\nitself, not headers and other overhead."
|
||
},
|
||
"progressevent.progressevent": {
|
||
"url": "$MDN_URL$/web/api/progressevent/progressevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "16",
|
||
"ChromeAndroid": "",
|
||
"Edge": "14",
|
||
"Firefox": "18",
|
||
"Opera": "12.1",
|
||
"Safari": "6",
|
||
"SafariIOS": "6",
|
||
"Deno": "1.3"
|
||
},
|
||
"doc": "The <strong><code>ProgressEvent()</code></strong> constructor returns a new <a href=\"$MDN_URL$/Web/API/ProgressEvent\"><code>ProgressEvent</code></a> object, representing the current completion of a long process.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>loadstart</code>, <code>progress</code>, <code>abort</code>, <code>error</code>, <code>load</code>, <code>timeout</code>, or <code>loadend</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"lengthcomputable\"><a href=\"#lengthcomputable\"><code>lengthComputable</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A boolean value indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not. It defaults to <code>false</code>. </dd> <dt id=\"loaded\"><a href=\"#loaded\"><code>loaded</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number representing the amount of work already performed by the underlying process. The ratio of work done can be calculated with the property and <code>ProgressEvent.total</code>. When downloading a resource using HTTP, this only represent the part of the content itself, not headers and other overhead. It defaults to <code>0</code>. </dd> <dt id=\"total\"><a href=\"#total\"><code>total</code></a> <span class=\"badge inline optional\">Optional</span></dt> <dd> <p>A number 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 <code>0</code>. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/ProgressEvent\"><code>ProgressEvent</code></a> object."
|
||
},
|
||
"progressevent.total": {
|
||
"url": "$MDN_URL$/web/api/progressevent/total",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "",
|
||
"ChromeAndroid": "",
|
||
"Edge": "",
|
||
"Firefox": "3.5",
|
||
"Opera": "12.1",
|
||
"Safari": "3.1",
|
||
"SafariIOS": "2",
|
||
"Deno": "1.3"
|
||
},
|
||
"doc": "The <strong><code>ProgressEvent.total</code></strong> read-only property is an unsigned\n64-bit integer value indicating the total size of the data being processed or\ntransmitted. In the case of an HTTP transmission, this is the size of the body of the\nmessage (the <code>Content-Length</code>), and does not include headers and other\noverhead.\n<p>If the event's <a href=\"$MDN_URL$/Web/API/ProgressEvent/lengthComputable\" ><code>lengthComputable</code></a>\nproperty is <code>false</code>, this value is meaningless and should be ignored."
|
||
},
|
||
"promiserejectionevent": {
|
||
"url": "$MDN_URL$/web/api/promiserejectionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "36",
|
||
"Safari": "11",
|
||
"SafariIOS": "11.3",
|
||
"Deno": "1.24"
|
||
},
|
||
"doc": "The <strong><code>PromiseRejectionEvent</code></strong> interface represents events which are sent to the global script context when JavaScript <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a>s are rejected. These events are particularly useful for telemetry and debugging purposes.\n<p>For details, see <a href=\"$MDN_URL$/Web/JavaScript/Guide/Using_promises#promise_rejection_events\">Promise rejection events</a>."
|
||
},
|
||
"promiserejectionevent.promise": {
|
||
"url": "$MDN_URL$/web/api/promiserejectionevent/promise",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "36",
|
||
"Safari": "11",
|
||
"SafariIOS": "11.3",
|
||
"Deno": "1.24"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/PromiseRejectionEvent\"><code>PromiseRejectionEvent</code></a> interface's\n<strong><code>promise</code></strong> read-only property indicates the JavaScript\n<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which was rejected. You can examine the event's\n<a href=\"$MDN_URL$/Web/API/PromiseRejectionEvent/reason\"><code>PromiseRejectionEvent.reason</code></a> property to learn why the promise was\nrejected."
|
||
},
|
||
"promiserejectionevent.promiserejectionevent": {
|
||
"url": "$MDN_URL$/web/api/promiserejectionevent/promiserejectionevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "36",
|
||
"Safari": "11",
|
||
"SafariIOS": "11.3",
|
||
"Deno": "1.24"
|
||
},
|
||
"doc": "The <strong><code>PromiseRejectionEvent()</code></strong>\nconstructor returns a new <a href=\"$MDN_URL$/Web/API/PromiseRejectionEvent\"><code>PromiseRejectionEvent</code></a> object, which\nrepresents events fired when a JavaScript <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> is rejected.\n<p>With promise rejection events, it becomes possible to detect and report promises which\nfail and whose failures go unnoticed. It also becomes easier to write a global handler\nfor errors.\n<p>There are two types of <code>PromiseRejectionEvent</code>:\n<a href=\"$MDN_URL$/Web/API/Window/unhandledrejection_event\" ><code>unhandledrejection</code></a> is sent by the JavaScript runtime when a promise is\nrejected but the rejection goes unhandled. A <a href=\"$MDN_URL$/Web/API/Window/rejectionhandled_event\" ><code>rejectionhandled</code></a>event is\nemitted if a promise is rejected but the rejection is caught by a rejection handler.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>rejectionhandled</code> or <code>unhandledrejection</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/Event/Event\" ><code>Event()</code></a></em>, can have the following properties: <dl> <dt id=\"promise\"><a href=\"#promise\"><code>promise</code></a></dt> <dd> <p>The <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that was rejected. </dd> <dt id=\"reason\"><a href=\"#reason\"><code>reason</code></a></dt> <dd> <p>Any value or <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Object\"><code>Object</code></a> which represents the reason the promise was rejected. This can be anything from a numeric error code to an error string to an object which contains detailed information describing the situation resulting in the promise being rejected. </dd> </dl>"
|
||
},
|
||
"returns": "A new <code>PromiseRejectionEvent</code> object configured as specified by the parameters."
|
||
},
|
||
"promiserejectionevent.reason": {
|
||
"url": "$MDN_URL$/web/api/promiserejectionevent/reason",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "49",
|
||
"ChromeAndroid": "49",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "36",
|
||
"Safari": "11",
|
||
"SafariIOS": "11.3",
|
||
"Deno": "1.24"
|
||
},
|
||
"doc": "The <a href=\"$MDN_URL$/Web/API/PromiseRejectionEvent\"><code>PromiseRejectionEvent</code></a> <strong><code>reason</code></strong> read-only\nproperty is any JavaScript value or <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Object\"><code>Object</code></a> which provides the reason\npassed into <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise/reject\"><code>Promise.reject()</code></a>. This in theory provides information about\nwhy the promise was rejected."
|
||
},
|
||
"publickeycredential": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "54",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>PublicKeyCredential</code></strong> interface provides information about a public key / private key pair, which is a credential for logging in to a service using an un-phishable and data-breach resistant asymmetric key pair instead of a password. It inherits from <a href=\"$MDN_URL$/Web/API/Credential\"><code>Credential</code></a>, and is part of the <a href=\"$MDN_URL$/Web/API/Web_Authentication_API\">Web Authentication API</a> extension to the <a href=\"$MDN_URL$/Web/API/Credential_Management_API\">Credential Management API</a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This API is restricted to top-level contexts. Use from within an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a> element will not have any effect.\n</div>"
|
||
},
|
||
"publickeycredential.authenticatorattachment": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/authenticatorAttachment",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "98",
|
||
"ChromeAndroid": "98",
|
||
"Edge": "98",
|
||
"Firefox": "120",
|
||
"Opera": "84",
|
||
"Safari": "15.5",
|
||
"SafariIOS": "15.5"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>authenticatorAttachment</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface is a string that indicates the general category of authenticator used during the associated <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create\" ><code>navigator.credentials.create()</code></a> or <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\" ><code>navigator.credentials.get()</code></a> call."
|
||
},
|
||
"publickeycredential.getclientextensionresults": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/getclientextensionresults",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "54",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>getClientExtensionResults()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface returns a map between the identifiers of extensions requested during credential creation or authentication, and their results after processing by the user agent.\n<p>During the creation or fetching of a <code>PublicKeyCredential</code> (via\n<a href=\"$MDN_URL$/Web/API/CredentialsContainer/create\" ><code>navigator.credentials.create()</code></a> and\n<a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\" ><code>navigator.credentials.get()</code></a> respectively), it is possible\nto request \"custom\" processing by the client for different extensions, specified in the <code>publicKey</code> option's <code>extensions</code> property. You can find more information about requesting the different extensions in <a href=\"$MDN_URL$/Web/API/Web_Authentication_API/WebAuthn_extensions\">Web Authentication extensions</a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> <code>getClientExtensionResults()</code> only returns the results from extensions processed by the user agent (client). The results from extensions processed by the authenticator can be found in the <a href=\"$MDN_URL$/Web/API/Web_Authentication_API/Authenticator_data\">authenticator data</a> available in <a href=\"$MDN_URL$/Web/API/AuthenticatorAssertionResponse/authenticatorData\"><code>AuthenticatorAssertionResponse.authenticatorData</code></a>.\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Map\"><code>map</code></a>, with each entry being an extensions' identifier string as the key, and the output from the processing of the extension by the client as the value."
|
||
},
|
||
"publickeycredential.id": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/id",
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>id</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface is a string, inherited\nfrom <a href=\"$MDN_URL$/Web/API/Credential\"><code>Credential</code></a>, which represents the identifier of the current\n<code>PublicKeyCredential</code> instance.\n<p>This property is a <a href=\"$MDN_URL$/Glossary/Base64\">base64url encoded</a> version of <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/rawId\"><code>PublicKeyCredential.rawId</code></a>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This property may only be used in top-level contexts and will\nnot be available in an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a> for example.\n</div>"
|
||
},
|
||
"publickeycredential.isconditionalmediationavailable": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/isconditionalmediationavailable",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "108",
|
||
"ChromeAndroid": "108",
|
||
"Edge": "108",
|
||
"Firefox": "119",
|
||
"Opera": "94",
|
||
"Safari": "16"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>isConditionalMediationAvailable()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves to <code>true</code> if conditional mediation is available.\n<p>Conditional mediation, if available, results in any discovered credentials being presented to the user in a non-modal dialog box along with an indication of the origin requesting credentials. This is requested by including <code>mediation: 'conditional'</code> in your <code>get()</code> call. In practice, this means autofilling available credentials; you need to include <code>autocomplete=\"webauthn\"</code> on your form fields so that they will show the WebAuthn sign-in options.\n<p>A conditional <code>get()</code> call does not show the browser UI and remains pending until the user picks an account to sign-in with from available autofill suggestions:\n<ul>\n<li>If the user makes a gesture outside of the dialog, it closes without resolving or rejecting the Promise and without causing a user-visible error condition.</li>\n<li>If the user selects a credential, that credential is returned to the caller.</li>\n</ul>\n<p>The prevent silent access flag (see <a href=\"$MDN_URL$/Web/API/CredentialsContainer/preventSilentAccess\"><code>CredentialsContainer.preventSilentAccess()</code></a>) is treated as being <code>true</code> regardless of its actual value: the conditional behavior always involves user mediation of some sort if applicable credentials are discovered.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> If no credentials are discovered, the non-modal dialog will not be visible, and the user agent can prompt the user to take action in a way that depends on the type of credential (for example, to insert a device containing credentials).\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves to a boolean value indicating whether or not conditional mediation is available."
|
||
},
|
||
"publickeycredential.isuserverifyingplatformauthenticatoravailable": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/isuserverifyingplatformauthenticatoravailable_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "54",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>isUserVerifyingPlatformAuthenticatorAvailable()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves to <code>true</code> if a user-verifying platform authenticator is present.\n<p>A user-verifying platform authenticator is a kind of multi-factor authenticator that is part of the client device (it is generally not removable) and that involves an action from the user in order to identify them. Common user-verifying platform authenticators include:\n<ul>\n<li>Touch ID or Face ID (macOS and iOS)</li>\n<li>Windows Hello (Windows)</li>\n<li>Device unlock (fingerprint, face, PIN, etc.) on Android</li>\n</ul>\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This method may only be used in top-level contexts and will not be available in an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a> for example.\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> which resolves to a boolean value indicating whether or\n a not a user-verifying platform authenticator is available.\n<div class=\"notecard note\" id=\"sect3\">\n <p><strong>Note:</strong> In earlier versions of the specification, the boolean also\n conveyed the consent of the user to disclose such an authenticator existed.\n</div>"
|
||
},
|
||
"publickeycredential.parsecreationoptionsfromjson": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/parsecreationoptionsfromjson_static",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "119"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>parseCreationOptionsFromJSON()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface converts a <a href=\"$MDN_URL$/Glossary/JSON_type_representation\">JSON type representation</a> into its corresponding <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create#publickey_object_structure\"><code>publicKey</code> create credentials options object structure</a>.\n<p>The method is a convenience function for converting credential options information provided by a relying party server to the form that a web app can use to <a href=\"$MDN_URL$/Web/API/Web_Authentication_API#creating_a_key_pair_and_registering_a_user\">create a credential</a>.",
|
||
"parameters": {
|
||
"options": "An object with the same structure as the Web Authentication API <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create#publickey_object_structure\"><code>publicKey</code> create credentials options object</a>, but with <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a>-encoded strings used in place of buffer properties."
|
||
},
|
||
"returns": "An object with the Web Authentication API <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create#publickey_object_structure\"><code>publicKey</code> create credentials options object structure</a>.",
|
||
"throws": {
|
||
"EncodingError DOMException": "Thrown if any part of the <code>options</code> object cannot be converted into the <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create#publickey_object_structure\"><code>publicKey</code> create credentials options object structure</a>."
|
||
}
|
||
},
|
||
"publickeycredential.parserequestoptionsfromjson": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/parserequestoptionsfromjson_static",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "119"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>parseRequestOptionsFromJSON()</code></strong> static method of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface converts a <a href=\"$MDN_URL$/Glossary/JSON_type_representation\">JSON type representation</a> into its corresponding <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get#publickey_object_structure\"><code>publicKey</code> request credentials options object structure</a>.\n<p>The method is a convenience function for converting information provided by a relying server to a web app in order to request an existing credential.",
|
||
"parameters": {
|
||
"options": "An object with the same structure as the Web Authentication API <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get#publickey_object_structure\"><code>publicKey</code> request credentials options object</a>, but with <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a>-encoded strings used in place of buffer properties."
|
||
},
|
||
"returns": "An object with the Web Authentication API <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get#publickey_object_structure\"><code>publicKey</code> request credentials options object structure</a>.",
|
||
"throws": {
|
||
"EncodingError DOMException": "Thrown if any part of the <code>options</code> object cannot be converted into the <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get#publickey_object_structure\"><code>publicKey</code> request credentials options object structure</a>."
|
||
}
|
||
},
|
||
"publickeycredential.rawid": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/rawid",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "54",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>rawId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface is an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> object\ncontaining the identifier of the credentials.\n<p>The <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/id\"><code>PublicKeyCredential.id</code></a> property is a <a href=\"$MDN_URL$/Glossary/Base64\">base64url encoded</a> version of this identifier.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This property may only be used in top-level contexts and will\nnot be available in an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a> for example.\n</div>"
|
||
},
|
||
"publickeycredential.response": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/response",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "67",
|
||
"ChromeAndroid": "70",
|
||
"Edge": "18",
|
||
"Firefox": "60",
|
||
"Opera": "54",
|
||
"Safari": "13",
|
||
"SafariIOS": "13"
|
||
},
|
||
"doc": "<div class=\"notecard secure\" id=\"sect1\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>response</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface is an <a href=\"$MDN_URL$/Web/API/AuthenticatorResponse\"><code>AuthenticatorResponse</code></a>\nobject which is sent from the authenticator to the user agent for the creation/fetching\nof credentials. The information contained in this response will be used by the relying\nparty's server to verify the demand is legitimate.\n<p>An <code>AuthenticatorResponse</code> is either:\n<ul>\n<li>\nan <a href=\"$MDN_URL$/Web/API/AuthenticatorAttestationResponse\"><code>AuthenticatorAttestationResponse</code></a> (when the\n<code>PublicKeyCredential</code> is created via\n<a href=\"$MDN_URL$/Web/API/CredentialsContainer/create\"><code>CredentialsContainer.create()</code></a>)\n</li>\n<li>\nan <a href=\"$MDN_URL$/Web/API/AuthenticatorAssertionResponse\"><code>AuthenticatorAssertionResponse</code></a> (when the\n<code>PublicKeyCredential</code> is obtained via\n<a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\"><code>CredentialsContainer.get()</code></a>).\n</li>\n</ul>\n<p>In order to validate the <em>creation</em> of credentials, a relying party's server\nneeds both:\n<ul>\n<li>this response</li>\n<li>\nthe extensions of the client (given by\n<a href=\"$MDN_URL$/Web/API/PublicKeyCredential/getClientExtensionResults\"><code>PublicKeyCredential.getClientExtensionResults()</code></a>) to validate the\ndemand.\n</li>\n</ul>\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> When validating the fetching of existing credentials, the\nwhole <code>PublicKeyCredential</code> object and the client extensions are necessary\nfor the relying party's server.\n</div>\n<div class=\"notecard note\" id=\"sect3\">\n<p><strong>Note:</strong> This property may only be used in top-level contexts and will\nnot be available in an <a href=\"$MDN_URL$/Web/HTML/Element/iframe\"><code><iframe></code></a> for example.\n</div>"
|
||
},
|
||
"publickeycredential.tojson": {
|
||
"url": "$MDN_URL$/web/api/publickeycredential/tojson",
|
||
"status": [
|
||
"Experimental",
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Firefox": "119"
|
||
},
|
||
"doc": "<div class=\"notecard experimental\" id=\"sect1\"><p><strong>Experimental:</strong> <strong>This is an <a href=\"$MDN_URL$/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental\">experimental technology</a></strong><br>Check the <a href=\"#browser_compatibility\">Browser compatibility table</a> carefully before using this in production.</div><div class=\"notecard secure\" id=\"sect2\"><p><strong>Secure context:</strong> This feature is available only in <a href=\"$MDN_URL$/Web/Security/Secure_Contexts\">secure contexts</a> (HTTPS), in some or all <a href=\"#browser_compatibility\">supporting browsers</a>.</div>\n<p>The <strong><code>toJSON()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> interface returns a <a href=\"$MDN_URL$/Glossary/JSON_type_representation\">JSON type representation</a> of a <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a>.\n<p>The properties of the returned object depend on whether the credential is returned by <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create\"><code>navigator.credentials.create()</code></a> when <a href=\"$MDN_URL$/Web/API/Web_Authentication_API#creating_a_key_pair_and_registering_a_user\">creating a key pair and registering a user</a>, or <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\"><code>navigator.credentials.get()</code></a> when <a href=\"$MDN_URL$/Web/API/Web_Authentication_API#authenticating_a_user\">authenticating a user</a>.\n<p>This method is automatically invoked when web app code calls <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON/stringify\"><code>JSON.stringify()</code></a> to serialize a <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> so that it can be sent to relying party server when registering or authenticating a user.\nIt not intended to be called directly in web app code.",
|
||
"returns": "A <a href=\"$MDN_URL$/Glossary/JSON_type_representation\">JSON type representation</a> of a <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a> object.\n<p>The included properties depend on whether the credential was returned by <a href=\"$MDN_URL$/Web/API/CredentialsContainer/create\"><code>navigator.credentials.create()</code></a> on registration, or <a href=\"$MDN_URL$/Web/API/CredentialsContainer/get\"><code>navigator.credentials.get()</code></a> when authenticating a user.\n The values and types of included properties are the same as for <a href=\"$MDN_URL$/Web/API/PublicKeyCredential\"><code>PublicKeyCredential</code></a>, with the exception that <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a>-encoded strings are used in place of buffer properties.\n<p>The object properties are:\n<dl>\n <dt id=\"id\"><a href=\"#id\"><code>id</code></a></dt>\n <dd>\n <p>The value returned by <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/id\"><code>PublicKeyCredential.id</code></a>.\n </dd>\n <dt id=\"rawid\"><a href=\"#rawid\"><code>rawId</code></a></dt>\n <dd>\n <p>A <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a>-encoded version of <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/rawId\"><code>PublicKeyCredential.rawId</code></a>.\n </dd>\n <dt id=\"authenticatorattachment\"><a href=\"#authenticatorattachment\"><code>authenticatorAttachment</code></a> <span class=\"badge inline optional\">Optional</span></dt>\n <dd>\n <p>The value returned by <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/authenticatorAttachment\"><code>PublicKeyCredential.authenticatorAttachment</code></a>.\n </dd>\n <dt id=\"type\"><a href=\"#type\"><code>type</code></a></dt>\n <dd>\n <p>The string <code>\"public-key\"</code>.\n </dd>\n <dt id=\"clientextensionresults\"><a href=\"#clientextensionresults\"><code>clientExtensionResults</code></a></dt>\n <dd>\n <p>An array contaning <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a>-encoded versions of the values returned by <a href=\"$MDN_URL$/Web/API/PublicKeyCredential/getClientExtensionResults\"><code>PublicKeyCredential.getClientExtensionResults()</code></a>.\n </dd>\n <dt id=\"response\"><a href=\"#response\"><code>response</code></a></dt>\n <dd>\n <p>The response property object depends on whether the credentials are returned following a registration or authentication operation.\n <ul>\n <li>When registering a new user <code>response</code> will be a JSON-type representation of <a href=\"$MDN_URL$/Web/API/AuthenticatorAttestationResponse\"><code>AuthenticatorAttestationResponse</code></a> where buffer values have been <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a> encoded.</li>\n <li>When authenticating a user the returned value will be a JSON-type representation version of <a href=\"$MDN_URL$/Web/API/AuthenticatorAssertionResponse\"><code>AuthenticatorAssertionResponse</code></a> where buffer values have been <a href=\"$MDN_URL$/Glossary/Base64\">base64url</a> encoded.</li>\n </ul>\n </dd>\n</dl>"
|
||
},
|
||
"pushevent": {
|
||
"url": "$MDN_URL$/web/api/pushevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushEvent</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Push_API\">Push API</a> represents a push message that has been received. This event is sent to the <a href=\"$MDN_URL$/Web/API/ServiceWorkerGlobalScope\">global scope</a> of a <a href=\"$MDN_URL$/Web/API/ServiceWorker\"><code>ServiceWorker</code></a>. It contains the information sent from an application server to a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a>."
|
||
},
|
||
"pushevent.data": {
|
||
"url": "$MDN_URL$/web/api/pushevent/data",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <code>data</code> read-only property of the <strong><code>PushEvent</code></strong> interface returns a reference to a <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> object containing data sent to the <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a>."
|
||
},
|
||
"pushevent.pushevent": {
|
||
"url": "$MDN_URL$/web/api/pushevent/pushevent",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushEvent()</code></strong> constructor creates a new\n<a href=\"$MDN_URL$/Web/API/PushEvent\"><code>PushEvent</code></a> object. Note that this constructor is exposed only to a\nservice worker context.",
|
||
"parameters": {
|
||
"type": "A string with the name of the event. It is case-sensitive and browsers set it to <code>push</code> or <code>pushsubscriptionchange</code>.",
|
||
"options": "An object that, <em>in addition of the properties defined in <a href=\"$MDN_URL$/Web/API/ExtendableEvent/ExtendableEvent\" ><code>ExtendableEvent()</code></a></em>, can have the following properties: <dl> <dt id=\"data\"><a href=\"#data\"><code>data</code></a></dt> <dd> <p>The data you want the <code>PushEvent</code> to contain, if any. When the constructor is invoked, the <a href=\"$MDN_URL$/Web/API/PushEvent/data\"><code>PushEvent.data</code></a> property of the resulting object will be set to a new <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> object containing these bytes. </dd> </dl>"
|
||
},
|
||
"returns": "A new <a href=\"$MDN_URL$/Web/API/PushEvent\"><code>PushEvent</code></a> object."
|
||
},
|
||
"pushmanager": {
|
||
"url": "$MDN_URL$/web/api/pushmanager",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushManager</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Push_API\">Push API</a> provides a way to receive notifications from third-party servers as well as request URLs for push notifications.\n<p>This interface is accessed via the <a href=\"$MDN_URL$/Web/API/ServiceWorkerRegistration/pushManager\"><code>ServiceWorkerRegistration.pushManager</code></a> property."
|
||
},
|
||
"pushmanager.getsubscription": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/getsubscription",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushManager.getSubscription()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushManager\"><code>PushManager</code></a> interface retrieves an existing push subscription.\n<p>It returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> object containing details of an existing subscription. If no existing subscription exists, this resolves to a <code>null</code> value.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> object or <code>null</code>."
|
||
},
|
||
"pushmanager.haspermission": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/haspermission",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>PushManager.hasPermission()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushManager\"><code>PushManager</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to the <code>PushPermissionStatus</code> of the requesting webapp, which will be one of <code>granted</code>, <code>denied</code>, or <code>default</code>.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This feature has been superseded by the <a href=\"$MDN_URL$/Web/API/PushManager/permissionState\"><code>PushManager.permissionState()</code></a> method.\n</div>",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to the <code>PushPermissionStatus</code>."
|
||
},
|
||
"pushmanager.permissionstate": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/permissionstate",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "44",
|
||
"ChromeAndroid": "44",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "31",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>permissionState()</code></strong> method of the\n<a href=\"$MDN_URL$/Web/API/PushManager\"><code>PushManager</code></a> interface returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a\nstring indicating the permission state of the push manager. Possible\nvalues are <code>'prompt'</code>, <code>'denied'</code>, or <code>'granted'</code>.\n<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> As of Firefox 44, the permissions for <a href=\"$MDN_URL$/Web/API/Notifications_API\">Notifications</a> and <a href=\"$MDN_URL$/Web/API/Push_API\">Push</a> have been merged. If permission is\ngranted for notifications, push will also be enabled.\n</div>",
|
||
"parameters": {
|
||
"options": "An object containing optional configuration parameters. It can have the following properties: <dl> <dt id=\"uservisibleonly\"><a href=\"#uservisibleonly\"><code>userVisibleOnly</code></a></dt> <dd> <p>A boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user. </dd> <dt id=\"applicationserverkey\"><a href=\"#applicationserverkey\"><code>applicationServerKey</code></a></dt> <dd> <p>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. </dd> </dl>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a string with a value of\n <code>'prompt'</code>, <code>'denied'</code>, or <code>'granted'</code>."
|
||
},
|
||
"pushmanager.register": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/register",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>register</code></strong> method is used to ask the system to request\na new endpoint for notifications.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This method has been superseded by <a href=\"$MDN_URL$/Web/API/PushManager/subscribe\"><code>PushManager.subscribe()</code></a>.\n</div>",
|
||
"returns": "A <code>DOMRequest</code> object to handle the success or failure of the method call.\n<p>If the method call is successful, the request's <code>result</code> will be a string,\n which is the endpoint URL.\n<div class=\"notecard note\" id=\"sect3\">\n <p><strong>Note:</strong> if you do not need the URL any more, please use\n <a href=\"$MDN_URL$/Web/API/PushManager/unregister\"><code>PushManager.unregister()</code></a> to clean up after yourself.\n</div>"
|
||
},
|
||
"pushmanager.registrations": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/registrations",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>registrations</code></strong> method is used to ask the system about\nexisting push endpoint registrations.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> This method has been superseded by the <a href=\"$MDN_URL$/Web/API/PushManager/getSubscription\"><code>PushManager.getSubscription()</code></a> method.\n</div>",
|
||
"returns": "A <code>DOMRequest</code> object to handle the success or failure of the method call.\n<p>If the method call is successful, the request's <code>result</code> will be an array of\n <a href=\"#pushregistration\">PushRegistration</a> objects."
|
||
},
|
||
"pushmanager.subscribe": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/subscribe",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>subscribe()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushManager\"><code>PushManager</code></a>\ninterface subscribes to a push service.\n<p>It returns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a>\nobject containing details of a push subscription. A new push subscription is created if\nthe current service worker does not have an existing subscription.",
|
||
"parameters": {
|
||
"options": "An object containing optional configuration parameters. It can have the following properties: <dl> <dt id=\"uservisibleonly\"><a href=\"#uservisibleonly\"><code>userVisibleOnly</code></a></dt> <dd> <p>A boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user. </dd> <dt id=\"applicationserverkey\"><a href=\"#applicationserverkey\"><code>applicationServerKey</code></a></dt> <dd> <p>A Base64-encoded string or <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> containing an <a href=\"https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm\" class=\"external\" target=\"_blank\">ECDSA</a> P-256 public key that the push server will use to authenticate your application server. If specified, all messages from your application server must use the <a href=\"https://datatracker.ietf.org/doc/html/rfc8292\" class=\"external\" target=\"_blank\">VAPID</a> authentication scheme, and include a JWT signed with the corresponding private key. This key <strong><em>IS NOT</em></strong> the same ECDH key that you use to encrypt the data. For more information, see \"<a href=\"https://blog.mozilla.org/services/2016/04/04/using-vapid-with-webpush/\" class=\"external\" target=\"_blank\">Using VAPID with WebPush</a>\". </dd> </dl> <div class=\"notecard note\" id=\"sect1\"> <p><strong>Note:</strong> This parameter is required in some browsers like Chrome and Edge. They will reject the Promise if <code>userVisibleOnly</code> is not set to <code>true</code>. </div>"
|
||
},
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> object."
|
||
},
|
||
"pushmanager.supportedcontentencodings": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/supportedcontentencodings_static",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "17",
|
||
"Opera": "47",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>supportedContentEncodings</code></strong> read-only static property of the\n<a href=\"$MDN_URL$/Web/API/PushManager\"><code>PushManager</code></a> interface returns an array of supported content codings that\ncan be used to encrypt the payload of a push message."
|
||
},
|
||
"pushmanager.unregister": {
|
||
"url": "$MDN_URL$/web/api/pushmanager/unregister",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>unregister()</code></strong> method was used to ask the system to\nunregister and delete the specified endpoint.\n<div class=\"notecard note\" id=\"sect2\">\n<p><strong>Note:</strong> In the updated API, a subscription can be unregistered via the <a href=\"$MDN_URL$/Web/API/PushSubscription/unsubscribe\"><code>PushSubscription.unsubscribe()</code></a> method.\n</div>",
|
||
"parameters": {
|
||
"pushEndpoint": "A pushEndpoint to be unregistered."
|
||
},
|
||
"returns": "A <code>DOMRequest</code> object to handle the success or failure of the method call.\n<p>If the method call is successful, the request's <code>result</code> will be a\n <a href=\"#pushregistration\">PushRegistration</a> object representing the endpoint that has been\n unregistered."
|
||
},
|
||
"pushmessagedata": {
|
||
"url": "$MDN_URL$/web/api/pushmessagedata",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushMessageData</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Push_API\">Push API</a> provides methods which let you retrieve the push data sent by a server in various formats.\n<p>Unlike the similar methods in the <a href=\"$MDN_URL$/Web/API/Fetch_API\">Fetch API</a>, which only allow the method to be invoked once, these methods can be called multiple times.\n<p>Messages received through the Push API are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the methods of the <code>PushMessageData</code> interface."
|
||
},
|
||
"pushmessagedata.arraybuffer": {
|
||
"url": "$MDN_URL$/web/api/pushmessagedata/arraybuffer",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>arrayBuffer()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> interface extracts push message data as an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> object.",
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a>."
|
||
},
|
||
"pushmessagedata.blob": {
|
||
"url": "$MDN_URL$/web/api/pushmessagedata/blob",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>blob()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> interface extracts push message data as a <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a> object.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/API/Blob\"><code>Blob</code></a>."
|
||
},
|
||
"pushmessagedata.json": {
|
||
"url": "$MDN_URL$/web/api/pushmessagedata/json",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>json()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> interface extracts push message data by parsing it as a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/JSON\">JSON</a> string and returning the result.",
|
||
"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…"
|
||
},
|
||
"pushmessagedata.text": {
|
||
"url": "$MDN_URL$/web/api/pushmessagedata/text",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "50",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "37",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>text()</code></strong> method of the <a href=\"$MDN_URL$/Web/API/PushMessageData\"><code>PushMessageData</code></a> interface extracts push message data as a plain text string.",
|
||
"returns": "A string."
|
||
},
|
||
"pushsubscription": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <code>PushSubscription</code> interface of the <a href=\"$MDN_URL$/Web/API/Push_API\">Push API</a> provides a subscription's URL endpoint and allows unsubscribing from a push service.\n<p>An instance of this interface can be serialized."
|
||
},
|
||
"pushsubscription.endpoint": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/endpoint",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>endpoint</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface returns a string containing\nthe endpoint associated with the push subscription.\n<p>The endpoint takes the form of a custom URL pointing to a push server, which can be\nused to send a push message to the particular service worker instance that subscribed to\nthe push service. For this reason, it is a good idea to keep your endpoint a secret, so\nothers do not hijack it and abuse the push functionality."
|
||
},
|
||
"pushsubscription.expirationtime": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/expirationtime",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "60",
|
||
"ChromeAndroid": "60",
|
||
"Edge": "17",
|
||
"Firefox": "96",
|
||
"Opera": "47",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>expirationTime</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface returns a <a href=\"$MDN_URL$/Web/API/DOMHighResTimeStamp\"><code>DOMHighResTimeStamp</code></a>\nof the subscription expiration time associated with the push subscription, if there is\none, or <code>null</code> otherwise."
|
||
},
|
||
"pushsubscription.getkey": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/getkey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <code>getKey()</code> method of the <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface\nreturns an <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> representing a client public key, which can then\nbe sent to a server and used in encrypting push message data.",
|
||
"parameters": {
|
||
"name": "A string representing the encryption method used to generate a client key. The value can be: <dl> <dt id=\"p256dh\"><a href=\"#p256dh\"><code>p256dh</code></a></dt> <dd> <p>An <a href=\"https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman\" class=\"external\" target=\"_blank\">Elliptic curve Diffie–Hellman</a> public key on the P-256 curve (that is, the NIST secp256r1 elliptic curve). The resulting key is an uncompressed point in ANSI X9.62 format. </dd> <dt id=\"auth\"><a href=\"#auth\"><code>auth</code></a></dt> <dd> <p>An authentication secret, as described in <a href=\"https://datatracker.ietf.org/doc/html/draft-ietf-webpush-encryption-08\" class=\"external\" target=\"_blank\">Message Encryption for Web Push</a>. </dd> </dl>"
|
||
},
|
||
"returns": "An <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\"><code>ArrayBuffer</code></a> or <code>null</code> if no public key can be found."
|
||
},
|
||
"pushsubscription.options": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/options",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "41",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>options</code></strong> read-only property\nof the <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface is an object containing the options\nused to create the subscription."
|
||
},
|
||
"pushsubscription.subscriptionid": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/subscriptionid",
|
||
"status": [
|
||
"StandardTrack",
|
||
"Deprecated"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "42",
|
||
"Edge": "17",
|
||
"Opera": "29"
|
||
},
|
||
"doc": "<div class=\"notecard deprecated\" id=\"sect1\"><p><strong>Deprecated:</strong> This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the <a href=\"#browser_compatibility\">compatibility table</a> at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.</div>\n<p>The <strong><code>subscriptionId</code></strong> read-only property of the\n<a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface returns a string containing\nthe subscription ID associated with the push subscription.\n<div class=\"notecard warning\" id=\"sect2\">\n<p><strong>Warning:</strong> Instead of this feature, use the <a href=\"$MDN_URL$/Web/API/PushSubscription/endpoint\"><code>PushSubscription.endpoint</code></a> property on the same interface.\n</div>"
|
||
},
|
||
"pushsubscription.tojson": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/tojson",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <code>toJSON()</code> method of the <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface is a\nstandard serializer: it returns a JSON representation of the subscription properties,\nproviding a useful shortcut.",
|
||
"returns": "A JSON object. It contains the subscription endpoint, <code>expirationTime</code> and public keys, as an\n <code>endpoint</code> member, an <code>expirationTime</code> member and a <code>keys</code> member."
|
||
},
|
||
"pushsubscription.unsubscribe": {
|
||
"url": "$MDN_URL$/web/api/pushsubscription/unsubscribe",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "42",
|
||
"ChromeAndroid": "50",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "29",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <code>unsubscribe()</code> method of the <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a> interface\nreturns a <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a boolean value when the\ncurrent subscription is successfully unsubscribed.",
|
||
"returns": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Promise\"><code>Promise</code></a> that resolves to a boolean value when the current\n subscription is successfully unsubscribed."
|
||
},
|
||
"pushsubscriptionoptions": {
|
||
"url": "$MDN_URL$/web/api/pushsubscriptionoptions",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "41",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>PushSubscriptionOptions</code></strong> interface of the <a href=\"$MDN_URL$/Web/API/Push_API\">Push API</a> represents the options associated with a push subscription.\n<p>The read-only <code>PushSubscriptionOptions</code> object is returned by calling <a href=\"$MDN_URL$/Web/API/PushSubscription/options\"><code>PushSubscription.options</code></a> on a <a href=\"$MDN_URL$/Web/API/PushSubscription\"><code>PushSubscription</code></a>. This interface has no constructor of its own."
|
||
},
|
||
"pushsubscriptionoptions.applicationserverkey": {
|
||
"url": "$MDN_URL$/web/api/pushsubscriptionoptions/applicationserverkey",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Firefox": "44",
|
||
"Opera": "41",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>applicationServerKey</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PushSubscriptionOptions\"><code>PushSubscriptionOptions</code></a> interface contains the public key used by the push server."
|
||
},
|
||
"pushsubscriptionoptions.uservisibleonly": {
|
||
"url": "$MDN_URL$/web/api/pushsubscriptionoptions/uservisibleonly",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "54",
|
||
"ChromeAndroid": "54",
|
||
"Edge": "17",
|
||
"Opera": "41",
|
||
"Safari": "16",
|
||
"SafariIOS": "16.4"
|
||
},
|
||
"doc": "The <strong><code>userVisibleOnly</code></strong> read-only property of the <a href=\"$MDN_URL$/Web/API/PushSubscriptionOptions\"><code>PushSubscriptionOptions</code></a> interface indicates if the returned push subscription will only be used for messages whose effect is made visible to the user."
|
||
},
|
||
"queuemicrotask": {
|
||
"url": "$MDN_URL$/web/api/queuemicrotask",
|
||
"status": [
|
||
"StandardTrack"
|
||
],
|
||
"compatibility": {
|
||
"Chrome": "71",
|
||
"ChromeAndroid": "71",
|
||
"Edge": "79",
|
||
"Firefox": "69",
|
||
"Opera": "58",
|
||
"Safari": "12.1",
|
||
"SafariIOS": "12.2",
|
||
"Nodejs": "11.0.0",
|
||
"Deno": ""
|
||
},
|
||
"doc": "<div class=\"notecard note\" id=\"sect1\">\n<p><strong>Note:</strong> This feature is available in <a href=\"$MDN_URL$/Web/API/Web_Workers_API\">Web Workers</a>\n</div>\n<p>The <strong><code>queueMicrotask()</code></strong> method,\nwhich is exposed on the <a href=\"$MDN_URL$/Web/API/Window\"><code>Window</code></a> or <a href=\"$MDN_URL$/Web/API/Worker\"><code>Worker</code></a> interface,\nqueues a microtask to be executed at a safe time prior to control returning to the\nbrowser's event loop.\n<p>The microtask is a short function which will run after\nthe current task has completed its work and when there is no other code waiting to be\nrun before control of the execution context is returned to the browser's event loop.\n<p>This lets your code run without interfering with any other, potentially higher\npriority, code that is pending, but before the browser regains control over the\nexecution context, potentially depending on work you need to complete. You can learn\nmore about how to use microtasks and why you might choose to do so in our <a href=\"$MDN_URL$/Web/API/HTML_DOM_API/Microtask_guide\">microtask guide</a>.\n<p>The importance of microtasks comes in its ability to perform tasks asynchronously but\nin a specific order. See <a href=\"$MDN_URL$/Web/API/HTML_DOM_API/Microtask_guide\">Using microtasks in JavaScript with queueMicrotask()</a> for more details.\n<p>Microtasks are especially useful for libraries and frameworks that need to perform\nfinal cleanup or other just-before-rendering tasks.",
|
||
"parameters": {
|
||
"function": "A <a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/Function\"><code>function</code></a> to be executed when the browser engine determines it is safe to call your code. Enqueued microtasks are executed after all pending tasks have completed but before yielding control to the browser's event loop."
|
||
},
|
||
"returns": "None (<a href=\"$MDN_URL$/Web/JavaScript/Reference/Global_Objects/undefined\"><code>undefined</code></a>)."
|
||
}
|
||
}
|
||
} |