diff --git a/lib/src/dom/cssom.dart b/lib/src/dom/cssom.dart index 00be0949..d4c3f111 100644 --- a/lib/src/dom/cssom.dart +++ b/lib/src/dom/cssom.dart @@ -264,13 +264,12 @@ extension type CSSStyleSheetInit._(JSObject _) implements JSObject { /// However it can be iterated over in a standard `for` loop over its indices, /// or converted to an `Array`. /// -/// > **Note:** This interface was an -/// > [attempt to create an unmodifiable list](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156) -/// > 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). +/// > **Note:** Typically list interfaces like `StyleSheetList` wrap around +/// > `Array` types, so you can use `Array` methods on them. +/// > This is not the case here for +/// > [historical reasons](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156). +/// > However, you can convert `StyleSheetList` to an `Array` in order to use +/// > those methods (see the example below). /// /// --- /// diff --git a/lib/src/dom/html.dart b/lib/src/dom/html.dart index 358cc43e..0f14b87c 100644 --- a/lib/src/dom/html.dart +++ b/lib/src/dom/html.dart @@ -3050,7 +3050,7 @@ extension type HTMLVideoElement._(JSObject _) external VideoPlaybackQuality getVideoPlaybackQuality(); /// The **`width`** property of the [HTMLVideoElement] interface returns an - /// integer that that reflects the `width` attribute of the `video` element, + /// integer that reflects the `width` attribute of the `video` element, /// specifying the displayed width of the resource in CSS pixels. external int get width; external set width(int value); @@ -9113,27 +9113,25 @@ extension type Window._(JSObject _) implements EventTarget, JSObject { /// This method will block while the print dialog is open. external void print(); - /// The **`window.postMessage()`** method safely enables - /// cross-origin communication between [Window] objects; _e.g.,_ between - /// a page and a pop-up that it spawned, or between a page and an iframe - /// embedded within it. + /// The **`window.postMessage()`** method safely enables cross-origin + /// communication between [Window] objects; _e.g.,_ between a page and a + /// pop-up that it spawned, or between a page and an iframe embedded within + /// it. /// /// Normally, scripts on different pages are allowed to access each other if - /// and only if - /// the pages they originate from share the same protocol, port number, and - /// host (also known - /// as the + /// and only if the pages they originate from share the same protocol, port + /// number, and host (also known as the /// "[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)"). /// `window.postMessage()` provides a controlled mechanism to securely /// circumvent this restriction (if used properly). /// /// Broadly, one window may obtain a reference to another (_e.g.,_ via - /// `targetWindow = window.opener`), and then dispatch a - /// [MessageEvent] on it with `targetWindow.postMessage()`. The - /// receiving window is then free to + /// `targetWindow = window.opener`), and then dispatch a [MessageEvent] on it + /// with `targetWindow.postMessage()`. + /// The receiving window is then free to /// [handle this event](https://developer.mozilla.org/en-US/docs/Web/Events/Event_handlers) - /// as needed. The arguments passed to `window.postMessage()` - /// (_i.e.,_ the "message") are + /// as needed. + /// The arguments passed to `window.postMessage()` (_i.e.,_ the "message") are /// [exposed to the receiving window through the event object](#the_dispatched_event). external void postMessage( JSAny? message, [ diff --git a/lib/src/dom/navigation_timing.dart b/lib/src/dom/navigation_timing.dart index 61b97f02..67ded5e0 100644 --- a/lib/src/dom/navigation_timing.dart +++ b/lib/src/dom/navigation_timing.dart @@ -161,6 +161,19 @@ extension type PerformanceNavigationTiming._(JSObject _) /// Note that client side redirects, such as `` are not considered here. external int get redirectCount; + + /// A website can indicate that a particular + /// [Client Hint](https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints) + /// is critical to the page by including it in a HTTP response header (as + /// well as the HTTP request header which is needed for all client hints + /// whether critical or not). Doing so will trigger a connection restart if + /// the hint listed in the `Critical-CH` HTTP response header could have been, + /// but wasn't, included in the HTTP request initially sent. If the browser + /// does not support that client hint, it is ignored and no connection restart + /// occurs. + /// + /// The **`criticalCHRestart`** read-only property represents the time at + /// which the connection restart occurred. external DOMHighResTimeStamp get criticalCHRestart; } diff --git a/lib/src/dom/webgl2.dart b/lib/src/dom/webgl2.dart index c4b0bef7..fb0965f1 100644 --- a/lib/src/dom/webgl2.dart +++ b/lib/src/dom/webgl2.dart @@ -1946,6 +1946,10 @@ extension type WebGL2RenderingContext._(JSObject _) implements JSObject { /// binds a /// passed [WebGLVertexArrayObject] object to the buffer. external void bindVertexArray(WebGLVertexArrayObject? array); + + /// The **`WebGL2RenderingContext.bufferData()`** method of the + /// [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) + /// creates and initializes the buffer object's data store. external void bufferData( GLenum target, JSAny sizeOrSrcData, @@ -1953,6 +1957,11 @@ extension type WebGL2RenderingContext._(JSObject _) implements JSObject { int srcOffset, GLuint length, ]); + + /// The **`WebGL2RenderingContext.bufferSubData()`** method of the + /// [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) + /// updates a subset of a buffer + /// object's data store. external void bufferSubData( GLenum target, GLintptr dstByteOffset, diff --git a/lib/src/dom/webrtc_stats.dart b/lib/src/dom/webrtc_stats.dart index 6631f0f4..93fe68bc 100644 --- a/lib/src/dom/webrtc_stats.dart +++ b/lib/src/dom/webrtc_stats.dart @@ -91,6 +91,40 @@ extension type RTCRtpStreamStats._(JSObject _) implements RTCStats, JSObject { external String get codecId; external set codecId(String value); } + +/// The **`RTCCodecStats`** dictionary of the +/// [WebRTC API](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API) +/// provides statistics about a codec used by streams that are being sent or +/// received by the associated [RTCPeerConnection] object. +/// +/// These statistics can be obtained by iterating the [RTCStatsReport] object +/// returned by [RTCPeerConnection.getStats] until you find an entry with the +/// [`type`](#type) of `codec`. +/// +/// The codec statistics can be correlated with the inbound or outbound stream +/// statistics (both local and remote) by matching their `codecId` property to +/// the codec's `id`. +/// For example, if +/// [`RTCInboundRtpStreamStats.codecId`](/en-US/docs/Web/API/RTCInboundRtpStreamStats#codecid) +/// matches an [`RTCCodecStats.id`](#id) in the same report, then we know that +/// the codec is being used on this peer connection's inbound stream. +/// If no stream `codecId` references a codec statistic, then that codec +/// statistic object is deleted — if the codec is used again, the statistics +/// object will be recreated with the same `id`. +/// +/// Codec objects may be referenced by multiple RTP streams in media sections +/// using the same transport. +/// In fact, user agents are expected to consolidate information into a single +/// "codec" entry per payload type per transport (unless +/// [sdpFmtpLine](#sdpfmtpline) is different when sending or receiving, in which +/// case, different codecs will be needed for encoding and decoding). +/// Note that other transports will use their own distinct `RTCCodecStats` +/// objects. +/// +/// --- +/// +/// API documentation sourced from +/// [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats). extension type RTCCodecStats._(JSObject _) implements RTCStats, JSObject { external factory RTCCodecStats({ required DOMHighResTimeStamp timestamp, @@ -104,16 +138,51 @@ extension type RTCCodecStats._(JSObject _) implements RTCStats, JSObject { String sdpFmtpLine, }); + /// The **`payloadType`** property of the [RTCCodecStats] dictionary is a + /// positive integer in the range from 0 to 127 that describes the format of + /// the payload used in RTP encoding or decoding. external int get payloadType; external set payloadType(int value); + + /// The **`transportId`** property of the [RTCCodecStats] dictionary is a + /// string that contains the unique identifier of the corresponding transport + /// on which this codec is being used. + /// + /// You can correlate the codec and associated transport statistics by + /// matching the `RTCCodecStats.transportId` with an [RTCTransportStats.id] + /// value. external String get transportId; external set transportId(String value); + + /// The **`mimeType`** property of the [RTCCodecStats] dictionary is a string + /// containing the codec's and subtype. + /// + /// This is of the form `"type/subtype"`, such as "video/VP8" or "audio/opus", + /// as defined in the + /// [IANA registry of valid MIME types](https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2). external String get mimeType; external set mimeType(String value); + + /// The **`clockRate`** property of the [RTCCodecStats] dictionary is a + /// positive number containing the media sampling rate in hertz (Hz). external int get clockRate; external set clockRate(int value); + + /// The **`channels`** property of the [RTCCodecStats] dictionary is a + /// positive number containing the number of channels supported by the codec. + /// + /// For audio codecs, a value of 1 specifies monaural sound while 2 indicates + /// stereo. external int get channels; external set channels(int value); + + /// The **`sdpFmtpLine`** property of the [RTCCodecStats] dictionary is a + /// string containing the format-specific parameters of the codec. + /// + /// These are the values in the `"a=fmtp"` line in the codec's (if present) + /// after the payload type number (see [section 5.8 of the IETF specification + /// for + /// JSEP](https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-jsep-24#section-5.8)). external String get sdpFmtpLine; external set sdpFmtpLine(String value); } diff --git a/third_party/mdn/mdn.json b/third_party/mdn/mdn.json index 9f65c9ef..8c3e2c15 100644 --- a/third_party/mdn/mdn.json +++ b/third_party/mdn/mdn.json @@ -3878,7 +3878,7 @@ "requestvideoframecallback": "The **`requestVideoFrameCallback()`** method of the [HTMLVideoElement] interface registers a callback function that runs when a new video frame is sent to the compositor. This enables developers to perform efficient operations on each video frame.", "videoheight": "The [HTMLVideoElement] interface's read-only **`videoHeight`** property indicates the [intrinsic height](#about_intrinsic_width_and_height) of the video, expressed in CSS pixels.\nIn simple terms, this is the height of the media in its natural size.", "videowidth": "The [HTMLVideoElement] interface's read-only **`videoWidth`** property indicates the [intrinsic width](/en-US/docs/Web/API/HTMLVideoElement/videoHeight#about_intrinsic_width_and_height) of the video, expressed in CSS pixels.\nIn simple terms, this is the width of the media in its natural size.\n\nSee [`HTMLVideoElement.videoHeight` > About intrinsic width and height](/en-US/docs/Web/API/HTMLVideoElement/videoHeight#about_intrinsic_width_and_height) for more details.", - "width": "The **`width`** property of the [HTMLVideoElement] interface returns an integer that that reflects the `width` attribute of the `video` element, specifying the displayed width of the resource in CSS pixels." + "width": "The **`width`** property of the [HTMLVideoElement] interface returns an integer that reflects the `width` attribute of the `video` element, specifying the displayed width of the resource in CSS pixels." } }, "HashChangeEvent": { @@ -5625,6 +5625,7 @@ "docs": "The **`PerformanceNavigationTiming`** 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\nOnly the current document is included in the performance timeline, so there is only one `PerformanceNavigationTiming` object in the performance timeline. It inherits all of the properties and methods of [PerformanceResourceTiming] and [PerformanceEntry].\n\nThe following diagram shows all of the timestamp properties defined in `PerformanceNavigationTiming`.\n\n![Timestamp diagram listing timestamps in the order in which they are recorded for the fetching of a document](timestamp-diagram.svg)", "properties": { "activationstart": "The **`activationStart`** read-only property represents the time between when a document starts prerendering and when it is activated.", + "criticalchrestart": "A website can indicate that a particular [Client Hint](https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints) is critical to the page by including it in a HTTP response header (as well as the HTTP request header which is needed for all client hints whether critical or not). Doing so will trigger a connection restart if the hint listed in the `Critical-CH` HTTP response header could have been, but wasn't, included in the HTTP request initially sent. If the browser does not support that client hint, it is ignored and no connection restart occurs.\n\nThe **`criticalCHRestart`** read-only property represents the time at which the connection restart occurred.", "domcomplete": "The **`domComplete`** read-only property returns a [DOMHighResTimeStamp] representing the time immediately before the user agent sets the document's [`readyState`](https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState) to `\"complete\"`.\n\nSee also the `complete` state of [Document.readyState] 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 [Window.load_event] event is about to fire.", "domcontentloadedeventend": "The **`domContentLoadedEventEnd`** read-only property returns a [DOMHighResTimeStamp] representing the time immediately after the current document's [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event) event handler completes.\n\nTypically frameworks and libraries wait for the `DOMContentLoaded` event before starting to run their code. We can use the `domContentLoadedEventEnd` and the [`domContentLoadedEventStart`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming/domContentLoadedEventStart) properties to calculate how long this takes to run.", "domcontentloadedeventstart": "The **`domContentLoadedEventStart`** read-only property returns a [DOMHighResTimeStamp] representing the time immediately before the current document's [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event) event handler starts.\n\nTypically frameworks and libraries wait for the `DOMContentLoaded` event before starting to run their code. We can use the `domContentLoadedEventStart` and the [`domContentLoadedEventEnd`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming/domContentLoadedEventEnd) properties to calculate how long this takes to run.", @@ -5987,6 +5988,20 @@ "type": "The **`type`** property of the [RTCCertificateStats] dictionary is a string with the value `\"certificate\"`.\n\nDifferent statistics are obtained by iterating the [RTCStatsReport] object returned by a call to [RTCPeerConnection.getStats].\nThe type indicates the set of statistics available through the object in a particular iteration step.\nA value of `\"certificate\"` indicates that the statistics available in the current step are those defined in [RTCCertificateStats]." } }, + "RTCCodecStats": { + "docs": "The **`RTCCodecStats`** dictionary of the [WebRTC API](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API) provides statistics about a codec used by streams that are being sent or received by the associated [RTCPeerConnection] object.\n\nThese statistics can be obtained by iterating the [RTCStatsReport] object returned by [RTCPeerConnection.getStats] until you find an entry with the [`type`](#type) of `codec`.\n\nThe codec statistics can be correlated with the inbound or outbound stream statistics (both local and remote) by matching their `codecId` property to the codec's `id`.\nFor example, if [`RTCInboundRtpStreamStats.codecId`](/en-US/docs/Web/API/RTCInboundRtpStreamStats#codecid) matches an [`RTCCodecStats.id`](#id) in the same report, then we know that the codec is being used on this peer connection's inbound stream.\nIf no stream `codecId` references a codec statistic, then that codec statistic object is deleted — if the codec is used again, the statistics object will be recreated with the same `id`.\n\nCodec objects may be referenced by multiple RTP streams in media sections using the same transport.\nIn fact, user agents are expected to consolidate information into a single \"codec\" entry per payload type per transport (unless [sdpFmtpLine](#sdpfmtpline) is different when sending or receiving, in which case, different codecs will be needed for encoding and decoding).\nNote that other transports will use their own distinct `RTCCodecStats` objects.", + "properties": { + "channels": "The **`channels`** property of the [RTCCodecStats] dictionary is a positive number containing the number of channels supported by the codec.\n\nFor audio codecs, a value of 1 specifies monaural sound while 2 indicates stereo.", + "clockrate": "The **`clockRate`** property of the [RTCCodecStats] dictionary is a positive number containing the media sampling rate in hertz (Hz).", + "id": "The **`id`** property of the [RTCCodecStats] dictionary is a string that uniquely identifies the object for which this object provides statistics.\n\nUsing the `id`, you can correlate this statistics object with others, in order to monitor statistics over time for a given WebRTC object, such as an [RTCPeerConnection], or an [RTCDataChannel].", + "mimetype": "The **`mimeType`** property of the [RTCCodecStats] dictionary is a string containing the codec's and subtype.\n\nThis is of the form `\"type/subtype\"`, such as \"video/VP8\" or \"audio/opus\", as defined in the [IANA registry of valid MIME types](https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2).", + "payloadtype": "The **`payloadType`** property of the [RTCCodecStats] dictionary is a positive integer in the range from 0 to 127 that describes the format of the payload used in RTP encoding or decoding.", + "sdpfmtpline": "The **`sdpFmtpLine`** property of the [RTCCodecStats] dictionary is a string containing the format-specific parameters of the codec.\n\nThese are the values in the `\"a=fmtp\"` line in the codec's (if present) after the payload type number (see [section 5.8 of the IETF specification for JSEP](https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-jsep-24#section-5.8)).", + "timestamp": "The **`timestamp`** property of the [RTCCodecStats] dictionary is a [DOMHighResTimeStamp] object specifying the time at which the data in the object was sampled.", + "transportid": "The **`transportId`** property of the [RTCCodecStats] dictionary is a string that contains the unique identifier of the corresponding transport on which this codec is being used.\n\nYou can correlate the codec and associated transport statistics by matching the `RTCCodecStats.transportId` with an [RTCTransportStats.id] value.", + "type": "The **`type`** property of the [RTCCodecStats] dictionary is a string with the value `\"codec\"`.\n\nDifferent statistics are obtained by iterating the [RTCStatsReport] object returned by a call to [RTCPeerConnection.getStats].\nThe type indicates the set of statistics available through the object in a particular iteration step.\nA value of `\"codec\"` indicates that the statistics available in the current step are those defined in [RTCCodecStats]." + } + }, "RTCDTMFSender": { "docs": "The **`RTCDTMFSender`** interface provides a mechanism for transmitting codes on a [WebRTC](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API) [RTCPeerConnection]. You gain access to the connection's `RTCDTMFSender` through the [RTCRtpSender.dtmf] property on the audio track you wish to send DTMF with.\n\nThe primary purpose for WebRTC's DTMF support is to allow WebRTC-based communication clients to be connected to a [public-switched telephone network (PSTN)](https://en.wikipedia.org/wiki/Public_switched_telephone_network) or other legacy telephone service, including extant voice over IP (VoIP) services. For that reason, DTMF can't be used between two WebRTC-based devices, because there is no mechanism provided by WebRTC for receiving DTMF codes.", "properties": { @@ -7680,7 +7695,7 @@ } }, "StyleSheetList": { - "docs": "The `StyleSheetList` interface represents a list of [CSSStyleSheet] objects. An instance of this object can be returned by [Document.styleSheets].\n\nIt is an array-like object but can't be iterated over using `Array` methods. However it can be iterated over in a standard `for` loop over its indices, or converted to an `Array`.\n\n> **Note:** This interface was an [attempt to create an unmodifiable list](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156) 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).", + "docs": "The `StyleSheetList` interface represents a list of [CSSStyleSheet] objects. An instance of this object can be returned by [Document.styleSheets].\n\nIt is an array-like object but can't be iterated over using `Array` methods. However it can be iterated over in a standard `for` loop over its indices, or converted to an `Array`.\n\n> **Note:** Typically list interfaces like `StyleSheetList` wrap around `Array` types, so you can use `Array` methods on them.\n> This is not the case here for [historical reasons](https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array/74641156#74641156).\n> However, you can convert `StyleSheetList` to an `Array` in order to use those methods (see the example below).", "properties": { "item": "The **`item()`** method of the [StyleSheetList] interface returns a single [CSSStyleSheet] object.", "length": "The **`length`** read-only property of the [StyleSheetList] interface returns the number of [CSSStyleSheet] objects in the collection." @@ -8520,6 +8535,8 @@ "bindtransformfeedback": "The **`WebGL2RenderingContext.bindTransformFeedback()`** method\nof the [WebGL 2 API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) binds a\npassed [WebGLTransformFeedback] object to the current GL state.", "bindvertexarray": "The **`WebGL2RenderingContext.bindVertexArray()`** method of\nthe [WebGL 2 API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) binds a\npassed [WebGLVertexArrayObject] object to the buffer.", "blitframebuffer": "The **`WebGL2RenderingContext.blitFramebuffer()`** method of\nthe [WebGL 2 API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) transfers a block of pixels\nfrom the read framebuffer to the draw framebuffer. Read and draw framebuffers are bound\nusing [WebGLRenderingContext.bindFramebuffer].", + "bufferdata": "The **`WebGL2RenderingContext.bufferData()`** method of the [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) creates and initializes the buffer object's data store.", + "buffersubdata": "The **`WebGL2RenderingContext.bufferSubData()`** method of the\n[WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) updates a subset of a buffer\nobject's data store.", "clearbuffer": "The **`WebGL2RenderingContext.clearBuffer[fiuv]()`** methods of\nthe [WebGL 2 API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) clear buffers from the\ncurrently bound framebuffer.", "clientwaitsync": "The **`WebGL2RenderingContext.clientWaitSync()`** method of the\n[WebGL 2 API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) blocks and waits for a\n[WebGLSync] object to become signaled or a given timeout to be passed.", "compressedtexsubimage3d": "The **`WebGL2RenderingContext.compressedTexSubImage3D()`**\nmethod of the [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) specifies a\nthree-dimensional sub-rectangle for a texture image in a compressed format.", @@ -8937,7 +8954,7 @@ "paste_event": "The **`paste`** event is fired when the user has initiated a \"paste\" action through the browser's user interface.\n\nThe original target for this event is the [Element] that was the intended target of the paste action. You can listen for this event on the [Window] interface to handle it in the capture or bubbling phases. For full details on this event please see the page on the [Element: paste event](https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event).", "personalbar": "Returns the `personalbar` object.\n\nThis is one of a group of `Window` properties that contain a boolean `visible` property, that used to represent whether or not a particular part of a web browser's user interface was visible.\n\nFor privacy and interoperability reasons, the value of the `visible` property is now `false` if this `Window` is a popup, and `true` otherwise.", "popstate_event": "The **`popstate`** event of the [Window] interface is fired when the active history entry changes while the user navigates the session history. It changes the current history entry to that of the last page the user visited or, if [history.pushState] has been used to add a history entry to the history stack, that history entry is used instead.", - "postmessage": "The **`window.postMessage()`** method safely enables\ncross-origin communication between [Window] objects; _e.g.,_ between\na page and a pop-up that it spawned, or between a page and an iframe embedded within it.\n\nNormally, scripts on different pages are allowed to access each other if and only if\nthe pages they originate from share the same protocol, port number, and host (also known\nas the \"[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)\").\n`window.postMessage()` provides a controlled mechanism to securely circumvent this restriction (if used properly).\n\nBroadly, one window may obtain a reference to another (_e.g.,_ via\n`targetWindow = window.opener`), and then dispatch a\n[MessageEvent] on it with `targetWindow.postMessage()`. The\nreceiving window is then free to [handle this event](https://developer.mozilla.org/en-US/docs/Web/Events/Event_handlers) as needed. The arguments passed to `window.postMessage()`\n(_i.e.,_ the \"message\") are [exposed to the receiving window through the event object](#the_dispatched_event).", + "postmessage": "The **`window.postMessage()`** method safely enables cross-origin communication between [Window] objects; _e.g.,_ between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.\n\nNormally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host (also known as the \"[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)\").\n`window.postMessage()` provides a controlled mechanism to securely circumvent this restriction (if used properly).\n\nBroadly, one window may obtain a reference to another (_e.g.,_ via `targetWindow = window.opener`), and then dispatch a [MessageEvent] on it with `targetWindow.postMessage()`.\nThe receiving window is then free to [handle this event](https://developer.mozilla.org/en-US/docs/Web/Events/Event_handlers) as needed.\nThe arguments passed to `window.postMessage()` (_i.e.,_ the \"message\") are [exposed to the receiving window through the event object](#the_dispatched_event).", "print": "Opens the print dialog to print the current document.\n\nIf the document is still loading when this function is called, then the document will finish loading before opening the print dialog.\n\nThis method will block while the print dialog is open.", "prompt": "`window.prompt()` instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.\n\nUnder some conditions — for example, when the user switches tabs — the browser may not actually display a dialog, or may not wait for the user to submit text or to cancel the dialog.", "querylocalfonts": "The **`window.queryLocalFonts()`** method returns a `Promise` that fulfills with an array of [FontData] objects representing the font faces available locally.\n\nTo use this method, the user must grant permission to access `local-fonts` (permission status can be queried via the [Permissions API]). In addition, this feature may be blocked by a [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) set on your server.", @@ -8979,7 +8996,7 @@ "status": "The **`status`** property of the\n[Window] interface was originally intended to set the text in the status\nbar at the bottom of the browser window. However, the HTML standard now requires\nsetting `window.status` to have no effect on the text displayed in the\nstatus bar.", "statusbar": "Returns the `statusbar` object.\n\nThis is one of a group of `Window` properties that contain a boolean `visible` property, that used to represent whether or not a particular part of a web browser's user interface was visible.\n\nFor privacy and interoperability reasons, the value of the `visible` property is now `false` if this `Window` is a popup, and `true` otherwise.", "stop": "The **`window.stop()`** stops further resource loading in the current\nbrowsing context, equivalent to the stop button in the browser.\n\nBecause of how scripts are executed, this method cannot interrupt its parent\ndocument's loading, but it will stop its images, new windows, and other still-loading\nobjects.", - "storage_event": "The **`storage`** event of the [Window] interface fires when a storage area (`localStorage` or `sessionStorage`) has been modified in the context of another document.\n\nThis event is not cancelable and does not bubble.\n\n> **Note:** This won't work on the same page that is making the changes — it is really a way for other pages on the domain using the storage to sync any changes that are made. Pages on other domains can't access the same storage objects.", + "storage_event": "The **`storage`** event of the [Window] interface fires when a storage area (`localStorage` or `sessionStorage`) has been modified in the context of another document.\n\nThis event is not cancelable and does not bubble.\n\n> **Note:** This won't work on the same that is making the changes — it is really a way for other browsing contexts on the domain using the storage to sync any changes that are made. Browsing contexts on other domains can't access the same storage objects.", "toolbar": "Returns the `toolbar` object.\n\nThis is one of a group of `Window` properties that contain a boolean `visible` property, that used to represent whether or not a particular part of a web browser's user interface was visible.\n\nFor privacy and interoperability reasons, the value of the `visible` property is now `false` if this `Window` is a popup, and `true` otherwise.", "top": "Returns a reference to the topmost window in the window hierarchy.", "unhandledrejection_event": "The **`unhandledrejection`** event is sent to the global scope of a script when a JavaScript `Promise` that has no rejection handler is rejected; typically, this is the [window], but may also be a [Worker].\n\nThis is useful for debugging and for providing fallback error handling for unexpected situations.", @@ -9130,7 +9147,7 @@ "close": "The **`close()`** method of the [WritableStream] interface closes the associated stream. All chunks written before this method is called are sent before the returned promise is fulfilled.\n\nThis is equivalent to getting a [WritableStreamDefaultWriter] with [WritableStream.getWriter], calling [WritableStreamDefaultWriter.close] on it.", "getwriter": "The **`getWriter()`** method of the [WritableStream] interface returns a new instance of [WritableStreamDefaultWriter] and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.", "locked": "The **`locked`** read-only property of the [WritableStream] interface returns a boolean indicating whether the `WritableStream` is locked to a writer.", - "writablestream": "The **`WritableStream()`** constructor creates\na new [WritableStream] object instance." + "writablestream": "The **`WritableStream()`** constructor creates a new [WritableStream] object instance." } }, "WritableStreamDefaultController": {