Intent to Deprecate and Remove: Non-standard DeviceOrientation Event initialization functions

瀏覽次數:109 次
跳到第一則未讀訊息

Reilly Grant

未讀,
2017年3月1日 下午4:32:492017/3/1
收件者:blink-dev

Primary eng (and PM) emails

rei...@chromium.org


Summary

Remove the DeviceOrientationEvent.initDeviceOrientationEvent and DeviceMotionEvent.initDeviceMotionEvent functions.


Motivation

These methods are not defined in the DeviceOrientation Event specification. Measurements indicate that they have no usage and they can be entirely replaced by the DeviceOrientationEvent and DeviceMotionEvent constructors that are being shipped in parallel to this intent.


Compatibility And Interoperability Risk

Chrome has supported Device Orientation since M-7. These unspecified functions were shipped on all WebKit platforms at the time (Chrome and Mobile Safari). UseCounters indicate that these functions have zero usage.


Edge: Deprecated ("As of Microsoft Edge, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated.")

Firefox: Shipped

Safari: Shipped

Web developers: No signals


Alternative implementation suggestion for web developers

Sites which wish to generate synthetic DeviceOrientationEvents and DeviceMotionEvents may use the constructors which are shipping in parallel to this removal.


Usage information from UseCounter

No usage. DeviceOrientationEvent.initDeviceOrientationEvent metrics. DeviceMotionEvent.initDeviceMotionEvent metrics.


OWP launch tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=697598


Entry on the feature dashboard

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

Philip Jägenstedt

未讀,
2017年3月3日 上午11:23:362017/3/3
收件者:Reilly Grant、blink-dev
This is a tricky one.

Usage is also incredibly low, and init*Event() methods are strange things. Also, these init*Event() methods stand in the way of removing support for document.createEvent("DeviceOrientationEvent") and document.createEvent("DeviceMotionEvent"), which I'd quite like to do in general.

But, these are implemented in all engines, and we do not want to remove these only to learn that some other engine isn't at all interesting in taking such risks. To mitigate that, could you start a discussion in the relevant place and loop in the relevant people from each engine? If they all say "we'll remove this if you succeed" then that would be enough I think.

Also, I think this should block on shipping the constructors, and the deprecation messages we use here should recommend their usage.

Reilly Grant

未讀,
2017年3月6日 下午6:02:362017/3/6
收件者:Philip Jägenstedt、blink-dev
I've filed an issue on the DeviceOrientation spec to try to document the consensus on this. Both MDN and MSDN list the init*Event() pattern as deprecated. Only MSDN actually documents the initDevice(Motion|Orientation)Event() methods.

I updated the OWP launch tracking bug to indicate it is blocked on shipping the constructors, which will happen in M-59 as I already have LGTMs on that Intent to Ship.

If you would like we can downgrade this to an "Intent to Deprecate" and I can add deprecation warnings for M-59 and remove in M-60.

Philip Jägenstedt

未讀,
2017年3月8日 清晨6:34:462017/3/8
收件者:Reilly Grant、blink-dev
Thanks for filing that issue, Reilly! You may eventually have do some poking to get a satisfactory answer from all engines.

Until we have a better sense of where that's going, I think we shouldn't bother web developers with deprecation messages. Especially if the message said that removal is planned for M60, that'd put is in an odd situation if some engine is very strongly opposed to attempting removal and we backpedal.

(Deprecation is probably used in the original sense on MDN/MSDN, to recommend against the feature without implying a coming removal.)

Reilly Grant

未讀,
2017年3月8日 上午11:26:382017/3/8
收件者:Philip Jägenstedt、blink-dev
Given the extremely low usage of these functions I disagree. Very few web developers will see these messages and they could act as a deterrent to that number increasing.

Reilly Grant

未讀,
2017年3月14日 晚上9:31:462017/3/14
收件者:Philip Jägenstedt、blink-dev
Based on discussion on the W3C Device Orientation spec GitHub Issue Tracker I have updated the feature dashboard with the support and skepticism from other vendors:

Edge: Public support
Firefox: Public support
Safari: Public skepticism

Chris Harrelson

未讀,
2017年3月16日 下午1:35:372017/3/16
收件者:Reilly Grant、Philip Jägenstedt、blink-dev
LGTM1

On Tue, Mar 14, 2017 at 6:31 PM, Reilly Grant <rei...@chromium.org> wrote:
Based on discussion on the W3C Device Orientation spec GitHub Issue Tracker I have updated the feature dashboard with the support and skepticism from other vendors:

Edge: Public support
Firefox: Public support

I hope this means they will remove the feature also soon?
 
Safari: Public skepticism
--
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+unsubscribe@chromium.org.

Jochen Eisinger

未讀,
2017年3月16日 下午1:37:002017/3/16
收件者:Chris Harrelson、Reilly Grant、Philip Jägenstedt、blink-dev
lgtm2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Dimitri Glazkov

未讀,
2017年3月17日 上午10:32:372017/3/17
收件者:Jochen Eisinger、Chris Harrelson、Reilly Grant、Philip Jägenstedt、blink-dev
LGTM3

Philip Jägenstedt

未讀,
2017年3月21日 凌晨4:51:262017/3/21
收件者:Dimitri Glazkov、Jochen Eisinger、Chris Harrelson、Reilly Grant、blink-dev
Looping back on this way after it's too late, what ended up happening is direct removal in https://codereview.chromium.org/2728963004 which avoided speculative deprecation messages, so LGTM4 to that.
回覆所有人
回覆作者
轉寄
0 則新訊息