Skip to content

Commit 6da2eed

Browse files
authored
Merge 23172b8 into e84ca6a
2 parents e84ca6a + 23172b8 commit 6da2eed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

eventsource/eventsource-cross-origin.htm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
<body>
1111
<div id="log"></div>
1212
<script>
13-
var crossdomain = location.href
14-
.replace('://', '://www2.')
15-
.replace(/\/[^\/]*$/, '/')
13+
const crossdomain = location.href.replace('://', '://élève.').replace(/\/[^\/]*$/, '/'),
14+
origin = location.origin.replace('://', '://xn--lve-6lad.');
15+
1616

1717
function doCORS(url, title) {
1818
async_test(document.title + " " + title).step(function() {
1919
var source = new EventSource(url, { withCredentials: true })
20-
source.onmessage = this.step_func(function(e) {
21-
assert_equals(e.data, "data")
22-
source.close()
23-
this.done()
20+
source.onmessage = this.step_func_done(e => {
21+
assert_equals(e.data, "data");
22+
assert_equals(e.origin, origin);
23+
source.close();
2424
})
2525
})
2626
}

0 commit comments

Comments
 (0)