Intent to Deprecate and Remove: document.origin

ยอดดู 173 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Philip Jägenstedt

ยังไม่อ่าน,
16 เม.ย. 2561 09:05:5616/4/61
ถึง blink-dev, mk...@chromium.org

Summary

Deprecate document.origin for 2 release cycles and then remove it. self.origin is the replacement, supported in Chrome, Firefox and Safari already.


See previous Intent to Deprecate: document.origin also, where +Mike West did compat analysis.

Motivation

It's a Blink/WebKit-only API which now has a replacement (self.origin) with wider support, and there's evidence to suggest that web developers have been bitten by this interop problem, see below.


Interoperability and Compatibility Risk

Edge: Not supported, and suggested deprecation/removal

Firefox: Not supported

Safari: Supported, but they also support self.origin.


In the previous intent there was an analysis done, which found 45 potentially legit uses of the attribute. Since then usage has gone up so I did another round on GitHub:

https://github.com/whatwg/dom/issues/410#issuecomment-381586352


Conclusion is that the "uncategorized" bucket is now ~80, and I've tested a few of them without finding breakage. No doubt something will break, but the httparchive dataset queried had ~460k pages, so 80 is ~0.017% of that.


If there is a problem, I'd anticipate it's because of a large web property using document.origin, in which case we can revert and retry after a while.


Evidence of web developer being bitten: on http://www.ing.com.au/ there's a comment saying "document.origin is not by ie" before some code that does "location.protocol + '//' + location.host".

Alternative implementation suggestion for web developers

Use self.origin (window.origin) it returns the same value.


Usage information from UseCounter

https://www.chromestatus.com/metrics/feature/timeline/popularity/1828


1.5% is a big number, but this counter will be hit by mere access, possibly inflated by mere enumeration of attributes on document, and definitely inflated by usage that won't break at all. See above.


Entry on the feature dashboard

https://www.chromestatus.com/feature/5701042356355072


Requesting approval to remove too?

Yes

Jochen Eisinger

ยังไม่อ่าน,
16 เม.ย. 2561 09:12:5616/4/61
ถึง Philip Jägenstedt, blink-dev, mk...@chromium.org
lgtm1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYdykXt8vaLkDfxm2Xd94A_5f7WNRXm3R3%2Bc6eRdnb5Q0g%40mail.gmail.com.

Mike West

ยังไม่อ่าน,
17 เม.ย. 2561 03:06:1717/4/61
ถึง Jochen Eisinger, Philip Jägenstedt, blink-dev
LGTM2, thanks for following up on the earlier intent. Sorry for letting that fall through the cracks...
-mike

Daniel Bratell

ยังไม่อ่าน,
24 เม.ย. 2561 11:47:0224/4/61
ถึง Jochen Eisinger, Mike West, Philip Jägenstedt, blink-dev
LGTM3

(with the usual caveat that the deprecation period is both a chance for web developers to adapt, and for us to change our minds if the usage is higher than we suspect from probing github)

/Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3DfbTq1hfmsH%3DDc93NT89zaWLBR8CWSZFUQBA__uj5WcAQ%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CEST (UTC+2) */

Philip Jägenstedt

ยังไม่อ่าน,
17 ก.ย. 2561 04:43:2417/9/61
ถึง Daniel Bratell, Jochen Eisinger, Mike West, blink-dev
Update: the removal has landed now and will be in M71 instead of M70 as planned and claimed by the deprecation message. I've updated https://www.chromestatus.com/feature/5701042356355072 but have not merged a change to the deprecation message to M70. (I'm not sure how to do that, unless the deprecation message is changed first in a separate commit, which I didn't do.)
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ