disableCustomEvents() {
        if (isVisibilityChangeObserved) {
            isVisibilityChangeObserved = false;
            document.removeEventListener('visibilitychange', handleCustomVisibilityChange);
            return true;
        }

        return false;
    }
Removes the "visibilitychange" event listener.

@return {boolean} Returns `false` if the event listener was already unregistered,
    otherwise returns `true`.