EventSource.url - Web API | MDN

Baseline Widely available

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

urlEventSource インターフェイスの読み取り専用プロパティで、ソースの URL を表す文字列を返します。

ソースの URL を表す文字列です。

js

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

仕様書

Specification
HTML
# dom-eventsource-url-dev

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.