Primary eng (and PM) emails
Link to “Intent to Deprecate” thread
None. I think sudden removal is ok in this case.
Summary
document.createEvent() supports only limited set of events.[1]
However, we support non-standard document.createEvent('WebKitTransitionEvent'). We'd like to remove it, and createEvent('WebKitTransitoinEvent') will throw.
Motivation
Remove non-standard feature.
Interoperability and Compatibility Risk
Low. No other browsers ship this feature now.
Edge: Not supported.
Firefox: Not supported.
Safari: Not supported.
Alternative implementation suggestion for web developers
Unprefixed document.createEvent('TransitionEvent') works. However, creating such event doesn't make sense in general.
Usage information from UseCounter
0.013 - 0.017%.
This is not so low. So I investigated 100 sites using createEvent('WebKitTransitionEvent') with HTTP archive. My conclusion is the removal is safe, and we should not have a deprecation period.
99 sites used Tipped [2] or LightView [3] JavaScript libraries. They were written by the same author, and use createEvent('WebKitTransitionEvent') to detect CSS animation feature like:
cssTransitions: function() {
var b=!1;
return a.each(["WebKitTransitionEvent","TransitionEvent","OTransitionEvent"],function(a,c){
try{
document.createEvent(c),b=!0
} catch(d){}
}),b
}
So throwing for WebKitTransitionEvent is safe, and createEvent('TransitionEvent') sets true to |b|.
Because of this code, showing a deprecation message for createEvent('WebKitTransitionEvent') is harmful. Web authors don't need to do anything for the deprecation.
The remaining 1 site uses neither Tipped nor LightView, but it had very similar usage pattern, and throwing for createEvent('WebKitTransitionEvent') is safe.
OWP launch tracking bug
Entry on the feature dashboard
--
TAMURA Kent
Software Engineer, Google