diff --git a/src/ui/util/full-screen.js b/src/ui/util/full-screen.js index 91d3af3dd..6a3b95750 100644 --- a/src/ui/util/full-screen.js +++ b/src/ui/util/full-screen.js @@ -42,8 +42,8 @@ export const exitFullscreen = () => { document[prefix] && document[prefix](); }; -export const onFullscreenChange = (event, callback) => { +export const onFullscreenChange = (target, action, callback) => { const index = getPrefix(); const prefix = prefixes.fullscreenChange[index]; - document[`${event}EventListener`](prefix, callback, false); + target[`${action}EventListener`](prefix, callback, false); };