EventSource
インターフェースのonerror
プロパティは、エラーが発生し、EventSource
オブジェクトに対して error
が送出されたときに呼び出される EventHandler
です。
構文
eventSource.onerror = function
例
evtSource.onerror = function() {
console.log("EventSource failed.");
};
メモ: 完全な例を GitHub から見つけることができます — PHP を用いた簡単な SSE のデモ を参照。
仕様
仕様 | ステータス | コメント |
---|---|---|
HTML Living Standard onerror の定義 |
現行の標準 | 初期定義 |
ブラウザ互換性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.