mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Replace deprecated initEvent()
Replaced deprecated initEvent() with recommended event constructor, Event(), as per MDN web docs specification. https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent#browser_compatibility
This commit is contained in:
parent
c03ffb12c2
commit
a24b840153
6 changed files with 6 additions and 13 deletions
|
@ -17,9 +17,7 @@
|
|||
const KeyboardEvent = function (eventName, options) {
|
||||
options = options || {};
|
||||
|
||||
const event = document.createEvent('Event');
|
||||
|
||||
event.initEvent(eventName, !!options.bubbles, !!options.cancelable);
|
||||
const event = new Event(eventName, { bubbles: !!options.bubbles, cancelable: !!options.cancelable });
|
||||
|
||||
event.view = options.view || document.defaultView;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue