1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #992 from dmitrylyzo/fix_dom_listener

Fix dom addEventListener/removeEventListener
This commit is contained in:
dkanada 2020-03-28 02:12:19 +09:00 committed by GitHub
commit 3e47f38aa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,17 +74,17 @@ define([], function () {
}
function addEventListenerWithOptions(target, type, handler, options) {
var optionsOrCapture = options;
var optionsOrCapture = options || {};
if (!supportsCaptureOption) {
optionsOrCapture = options.capture;
optionsOrCapture = optionsOrCapture.capture;
}
target.addEventListener(type, handler, optionsOrCapture);
}
function removeEventListenerWithOptions(target, type, handler, options) {
var optionsOrCapture = options;
var optionsOrCapture = options || {};
if (!supportsCaptureOption) {
optionsOrCapture = options.capture;
optionsOrCapture = optionsOrCapture.capture;
}
target.removeEventListener(type, handler, optionsOrCapture);
}