Intent to Deprecate and Remove: document.origin

조회수 148회
읽지 않은 첫 메시지로 건너뛰기

Philip Jägenstedt

읽지 않음,
2018. 4. 16. 오전 9:05:5618. 4. 16.
받는사람 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

읽지 않음,
2018. 4. 16. 오전 9:12:5618. 4. 16.
받는사람 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

읽지 않음,
2018. 4. 17. 오전 3:06:1718. 4. 17.
받는사람 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

읽지 않음,
2018. 4. 24. 오전 11:47:0218. 4. 24.
받는사람 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

읽지 않음,
2018. 9. 17. 오전 4:43:2418. 9. 17.
받는사람 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개