Intent to Remove: XMLHttpRequestProgressEvent (position and totalSize)

97 views
Skip to first unread message

Philip Jägenstedt

unread,
Dec 9, 2015, 4:35:57 PM12/9/15
to blink-dev

Primary eng (and PM) emails

phi...@opera.com

Deprecated by sigb...@opera.com


Link to “Intent to Deprecate” thread

https://groups.google.com/a/chromium.org/d/msg/blink-dev/nsLnqT__I78/zXQtEX-vUK0J


That was an intent to remove, but it was deprecated first out of caution. It has been deprecated since M39, which was released in November 2014.

Summary

Remove the position and totalSize attributes and merge the (then empty) XMLHttpRequestProgressEvent interface into ProgressEvent.


Motivation

Neither Firefox nor Edge have the totalSize or position attribute, and it is not in the spec:

https://xhr.spec.whatwg.org/#interface-progressevent


A similar interface with the same attributes was once in Gecko, but was removed:

Compatibility Risk

The compat risk is due to the removal of position and totalSize, not the interface itself.


The string "position" and "totalSize" are too common to search for in httparchive, but a GitHub search for "xmlhttprequest totalsize" finds at least something of interest. In the first fewpages I see nothing problematic, but two cases of this:
var done = e.position || e.loaded, total = e.totalSize || e.total;


In other words, code with a fallback. It's likely that things like this account for the majority of the use counter hits. Some code without a fallback must exist out there, but I don't think we can find the cases that matter without attempting removal.

Usage information from UseCounter

position ~0.006%

totalSize ~0.004%


OWP launch tracking bug

https://crbug.com/357112


Entry on the feature dashboard

https://www.chromestatus.com/features/5044837464145920


(Created assuming that removal will happen in M49, will update if not.)

Rick Byers

unread,
Dec 9, 2015, 5:04:05 PM12/9/15
to Philip Jägenstedt, blink-dev
LGTM to remove, thanks!

As with all removals with non-zero usage, we should keep an eye out for issues and be prepared to revert.  But there's enough evidence here to suggest a removal may be safe.

Rick

Chris Harrelson

unread,
Dec 10, 2015, 11:35:24 PM12/10/15
to Rick Byers, Philip Jägenstedt, blink-dev
LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Dec 14, 2015, 8:58:46 AM12/14/15
to Chris Harrelson, Rick Byers, blink-dev
I'd like to revise the plan to first update the deprecation messages to include "will be removed in M50, around April 2016" in M49, and then actually remove in M50. I will update the chromestatus.com entry to reflect that if this if I get an LGTM3.

Rick Byers

unread,
Dec 14, 2015, 11:45:07 AM12/14/15
to Philip Jägenstedt, Chris Harrelson, blink-dev
Thanks Philip, I think that's a smart strategy in general.

Rick

Jochen Eisinger

unread,
Dec 15, 2015, 5:33:30 AM12/15/15
to blink-dev
lgtm3

Takeshi Yoshino

unread,
Dec 16, 2015, 6:56:32 AM12/16/15
to Jochen Eisinger, blink-dev
LGTM (non API owner).

I'd like to revise the plan to first update the deprecation messages to include "will be removed in M50, around April 2016" in M49, and then actually remove in M50. I will update thechromestatus.com entry to reflect that if this if I get an LGTM3.

Sounds good.

I see a strange spike around Aug/24 on the usage counters. Do you know why?
 

Philip Jägenstedt

unread,
Dec 16, 2015, 8:38:18 AM12/16/15
to Takeshi Yoshino, Jochen Eisinger, blink-dev
 I don't know why that is, no. Since it's just these two use counters, my best guess is that usage really did increase for a few days. It could have been a somewhat big site that began to hit the use counters, but quickly fixed it when they saw the deprecation messages.

I've updated the chromestatus.com entry to reflect M50 removal now.

Philip
Reply all
Reply to author
Forward
0 new messages