← Back to release summary

Deprecate and remove: non-allowlisted Event interfaces from document.createEvent()

Category
DOM
Type
Feature removal
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Remove support for creating non-allowlisted event interfaces from document.createEvent(). After this change, these will throw NOT_SUPPORTED_ERR as required by the specification. (However, events with usage above 0.01% or those deemed difficult to remove immediately will either be deprecated only)

Motivation

The DOM spec (https://dom.spec.whatwg.org/#dom-document-createevent) defines as standard the event interfaces supported by the createEvent() method. Events not included in this list are non-standard and must throw NOT_SUPPORTED_ERR. However, in Chromium, there are currently some non-standard interfaces for which createEvent() can still be used. The plan to deprecate and remove these interfaces is outlined in the sheet below. https://docs.google.com/spreadsheets/d/1z3UP34xP0BDSOr5kINyMfBnPC1IdqrquJMtt806wuRM/edit?usp=sharing To summarize the sheet: - Events with 0 usage will be removed. PopStateEvent and WheelEvent have non-zero usage, but it's still incredibly low, so they will also be removed. - TransitionEvent has high usage, so we need to be careful. It will be deprecated for 3 milestones before removal in M151. - KeyboardEvent has low usage, but it appears to be used in legacy code, so it will also be deprecated for 3 milestones before removal in M151. In addition, this change will be landed with a runtime flag to ensure that it is not removed before sufficient testing has been completed. After removal, createEvent() should be replaced with the corresponding constructor (e.g., new AnimationEvent()).

Standards & signals

View on chromestatus.com