Add polyfill to global snippet JS to support new custom event API.

NEW
Unassigned

Status

Snippets
General
5 years ago
5 years ago

People

(Reporter: mkelly, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The global snippet JS currently uses document.createEvent to create a custom event, but that method is deprecated in favor of CustomEvent instead (see https://developer.mozilla.org/en-US/docs/Web/API/document.createEvent and https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).

Since the global JS is intended to support Firefox 4 and up, we should add a polyfill to support both, as CustomEvent was introduced in Firefox 6.
You need to log in before you can comment on or make changes to this bug.