Skip to content

Commit 710c43c

Browse files
Ahmad-S792Ahmad Saleem
authored andcommitted
Remove deprecated uppercase URL attribute alias from EventSource interface
Remove deprecated uppercase URL attribute alias from EventSource interface https://bugs.webkit.org/show_bug.cgi?id=248787 Reviewed by Ryosuke Niwa. This is to align Webkit with Blink / Chromium, Gecko / Firefox and Web-Specifications: https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface Partial Merge - https://chromium.googlesource.com/chromium/blink/+/f0e6045bfaa96d3a3211e8074feb83d37913f9d3 The upper case "URL" attribute was only in draft specifications from 2009 but later dropped in 2011 specs, which were implemented by non-Webkit browsers. It was later dropped by Blink in 2015 as well. * Source/WebCore/page/EventSource.idl: Remove 'URL' attribute and also add link to web-spec * LayoutTests/http/tests/eventsource/eventsource-url-attribute.html: Rebaselined * LayoutTests/http/tests/eventsource/eventsource-url-attribute-expected.txt: Rebaselined Canonical link: https://commits.webkit.org/257553@main
1 parent a5482e6 commit 710c43c

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

LayoutTests/http/tests/eventsource/eventsource-url-attribute-expected.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
Both .URL and .url should work (for compatibility reasons).
1+
Only .url should work, previously supported .URL should not.
22

33
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
44

55

6-
PASS source.URL is "http://127.0.0.1:8000/eventsource/resources/event-stream.py"
76
PASS source.url is "http://127.0.0.1:8000/eventsource/resources/event-stream.py"
8-
PASS source.URL === source.url is true
7+
PASS source.URL is undefined.
98
PASS successfullyParsed is true
109

1110
TEST COMPLETE

LayoutTests/http/tests/eventsource/eventsource-url-attribute.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
<body>
88
<script>
99

10-
description("Both .URL and .url should work (for compatibility reasons).");
10+
description("Only .url should work, previously supported .URL should not.");
1111

1212
var url = "http://127.0.0.1:8000/eventsource/resources/event-stream.py";
1313
var source = new EventSource(url);
1414

15-
shouldBeEqualToString("source.URL", url);
1615
shouldBeEqualToString("source.url", url);
17-
shouldBeTrue("source.URL === source.url");
16+
shouldBeUndefined("source.URL");
1817

1918
</script>
2019
<script src="../../js-test-resources/js-test-post.js"></script>

Source/WebCore/page/EventSource.idl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (C) 2009 Ericsson AB. All rights reserved.
3-
* Copyright (C) 2010, 2011 Apple Inc. All Rights Reserved.
3+
* Copyright (C) 2010-2022 Apple Inc. All Rights Reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions
@@ -29,13 +29,14 @@
2929
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131

32+
// https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface
33+
3234
[
3335
Exposed=(Window,Worker),
3436
ActiveDOMObject,
3537
] interface EventSource : EventTarget {
3638
[CallWith=CurrentScriptExecutionContext] constructor(USVString url, optional EventSourceInit eventSourceInitDict);
3739

38-
readonly attribute USVString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
3940
readonly attribute USVString url;
4041
readonly attribute boolean withCredentials;
4142

0 commit comments

Comments
 (0)