Intent to Deprecate and Remove: window.postMessage(message, transferables, targetOrigin) legacy overload

已查看 175 次
跳至第一个未读帖子

Sigbjorn Finne

未读,
2016年4月21日 05:48:002016/4/21
收件人 blink-dev

Primary eng (and PM) emails
sigb...@opera.com

Summary
Deprecate and retire window.postMessage(message, transferables,
targetOrigin) legacy overload.

Motivation
A legacy overload of window.postMessage() that's nearly unused & it
would be preferable to finally phase out.

Compatibility Risk
Any change to core functionality like window.postMessage() requires
extreme care, but the observed use of this overload is so low that the
risk of deprecating and actual removal seems acceptable. After
retirement, Safari will be the only browser supporting it.

Alternative implementation suggestion for web developers
Use window.postMessage(message, targetOrigin[, transferables])

Usage information from UseCounter
https://www.chromestatus.com/metrics/feature/timeline/popularity/575 ( <
~0.0025%)

OWP launch tracking bug
https://crbug.com/425896

Entry on the feature dashboard
https://www.chromestatus.com/feature/5719033043222528

Requesting approval to remove too?
Yes, M54 is the suggested milestone.

Philip Jägenstedt

未读,
2016年4月21日 06:03:432016/4/21
收件人 Sigbjorn Finne、blink-dev
LGTM1



--
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.


Chris Harrelson

未读,
2016年4月21日 11:07:402016/4/21
收件人 Philip Jägenstedt、Sigbjorn Finne、blink-dev
LGTM2

Rick Byers

未读,
2016年4月21日 11:11:162016/4/21
收件人 Chris Harrelson、Philip Jägenstedt、Sigbjorn Finne、blink-dev
0.002% is still a non-trivial amount of usage so I think it's worth a little additional care here.  

This is a non-standard WebKit-specific overload, right?  I assume Safari still supports it, but what about Edge?  If Edge hasn't added it that's another strong indication that removal should be very safe.

I checked the internal metrics and it seems all the usage is from desktop (so this isn't the typical example of mobile sites assuming WebKit).  In particular, most of the usage is from Mac (a little higher in absolute terms than Windows, despite Windows having much greater Chrome usage overall).

I've kicked off a cluster run on the top 10k sites to see if I can find any example of a website using this (during load), so that we can reach out to popular sites / libraries if it makes sense.

I think planning for removal in M54 (with a deprecation warning now) probably is the right thing to do so LGTM3.  But let's just try a little harder to evaluate the impact (now that we can do cluster runs).  Eg. if we can find one popular site that's hitting this but will still work alright with the change then that would remove most of my lingering concern.  

Sigbjorn Finne

未读,
2016年4月21日 14:10:302016/4/21
收件人 Rick Byers、Chris Harrelson、Philip Jägenstedt、blink-dev
Thanks rbyers@ for jumping right in and helping out, appreciate it. Edge
does not support this, throwing.

As you can see from the deprecation CL (
https://codereview.chromium.org/1903873004/ ), wrong argument ordering
usage can slip in and get stuck.

--sigbjorn

Rick Byers

未读,
2016年4月27日 11:11:192016/4/27
收件人 Sigbjorn Finne、Chris Harrelson、Philip Jägenstedt、blink-dev
Sorry for the delay.  I got data back from the cluster run, but unfortunately it came up empty - meaning that none of the Alexa top 10k sites hit this use counter during page load.  We're working to make it more practical to search all top 1M sites, but that's not currently easy.

Anyway if Edge already throws in this case then that's strong evidence that the compat risk is indeed low.  LGTM3 to remove but please keep an eye out for reports of regressions and ping this thread if it looks like there's any substantial real-world impact of the removal.

Shruthi Sreekanta

未读,
2016年8月26日 16:50:242016/8/26
收件人 blink-dev、sigb...@opera.com、chri...@chromium.org、phi...@opera.com、domi...@chromium.org
Are we still planning on removing this in M54?

Philip Jägenstedt

未读,
2016年8月31日 08:04:592016/8/31
收件人 Shruthi Sreekanta、blink-dev、sigb...@opera.com、chri...@chromium.org、phi...@opera.com、domi...@chromium.org
I'm taking care of this in https://codereview.chromium.org/2295863002/ and will request backport to M54.
回复全部
回复作者
转发
0 个新帖子