A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/WebTransport/close below:

WebTransport: close() method - Web APIs

WebTransport: close() method

Limited availability

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

The close() method of the WebTransport interface closes an ongoing WebTransport session.

Syntax Parameters
info Optional

An object containing the following properties:

closeCode

A number representing the error code for the error.

reason

A string representing the reason for closing the WebTransport.

Return value

undefined.

Exceptions
WebTransportError

Thrown if close() is invoked while the WebTransport is in the process of connecting.

Examples
const url = "https://example.com:4999/wt";
// Initialize transport connection
const transport = new WebTransport(url);

// …

transport.close({
  closeCode: 17,
  reason: "CloseButtonPressed",
});
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4