-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<title>This page is just used to grab an EventSource constructor</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>EventSource: message event Realm</title> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/comms.html#dispatchMessage"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<iframe src="eventsource-onmessage-realm-support.htm"></iframe> | ||
|
||
<script> | ||
"use strict"; | ||
|
||
async_test(t => { | ||
window.onload = t.step_func(() => { | ||
const source = new frames[0].EventSource("resources/message.py"); | ||
|
||
source.onmessage = t.step_func_done(e => { | ||
assert_equals(e.constructor, frames[0].MessageEvent); | ||
source.close(); | ||
}); | ||
}); | ||
}, "the MessageEvent must be created in the Realm of the EventSource"); | ||
</script> |