fix fullscreen polyfill util

This commit is contained in:
Baltazar Gomez 2019-10-13 18:04:58 -06:00 committed by Sean Yesmunt
parent a2b48ccc34
commit b985651e33

View file

@ -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);
};