enableCustomEvents() {
        if (!isVisibilityChangeObserved) {
            isVisibilityChangeObserved = true;
            document.addEventListener('visibilitychange', handleCustomVisibilityChange);
            return true;
        }

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

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