A RetroSearch Logo

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

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/EventSource/url below:

EventSource: url property - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. EventSource
  4. url

Filter sidebar

In this article
  1. Server-sent events
  2. EventSource
  3. Constructor
    1. EventSource()
  4. Instance properties
    1. readyState
    2. url
    3. withCredentials
  5. Instance methods
    1. close()
  6. Events
    1. error
    2. message
    3. open
  7. Inheritance
    1. EventTarget
  8. Guides
    1. Using server-sent events
In this article EventSource: url property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Note: This feature is available in Web Workers.

The url read-only property of the EventSource interface returns a string representing the URL of the source.

Value

A string representing the URL of the source.

Examples

js

const evtSource = new EventSource("sse.php");
console.log(evtSource.url);

Note: You can find a full example on GitHub — see Simple SSE demo using PHP.

Specifications Specification HTML
# dom-eventsource-url-dev
Browser compatibility See also Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Oct 8, 2024 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

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