Skip to content

Commit

Permalink
Merge pull request #2703 from cloudflare/jsnell/make-eventsource-exte…
Browse files Browse the repository at this point in the history
…nd-eventtarget
  • Loading branch information
jasnell authored Sep 12, 2024
2 parents 71ed2a6 + 8492c5a commit bd2c90e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/workerd/api/eventsource.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class EventSource: public EventTarget {
}

JSG_RESOURCE_TYPE(EventSource) {
JSG_INHERIT(EventTarget);
JSG_METHOD(close);
JSG_READONLY_PROTOTYPE_PROPERTY(url, getUrl);
JSG_READONLY_PROTOTYPE_PROPERTY(withCredentials, getWithCredentials);
Expand Down
1 change: 1 addition & 0 deletions src/workerd/api/tests/eventsource-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const acceptEventStreamTest = {
'http://example.org/accept-event-stream',
{ fetcher: env.subrequest }
);
ok(eventsource instanceof EventTarget);
strictEqual(eventsource.readyState, EventSource.CONNECTING);
const { promise, resolve } = Promise.withResolvers();
let opened = false;
Expand Down

0 comments on commit bd2c90e

Please sign in to comment.