Go back to top

vivaldi.autoUpdate Modders API Reference

Use the vivaldi.autoupdate API to interact with (Win)Sparkle.

Types

#UpdateOperationStatusEnum

ENUM

⚠ NO DESCRIPTION PROVIDED

  • noUpdate
  • didAbortWithError
  • didFindValidUpdate
  • willDownloadUpdate
  • didDownloadUpdate
  • willInstallUpdateOnQuit
  • updaterDidRelaunchApplication
  • #UpdateOperationStatus

    A structure describing the status of an update operation if any.

    Properties:

    status
    UpdateOperationStatusEnum

    ⚠ NO DESCRIPTION PROVIDED

    version
    string

    ⚠ NO DESCRIPTION PROVIDED

    releaseNotesUrl
    string

    ⚠ NO DESCRIPTION PROVIDED

    Listeners

    How to use listeners

    Each listener type has the same functions, used for each listener API in the same way:

    .addListener(function callback)

    Adds a function to a listener for an event

    .removeListener(function callback)

    Removes a function to a listener for an event

    .hasListener(function callback)

    Returns a boolean if a function is attached to a listener for an event

    .hasListeners()

    Returns a boolean if a listener has any attached functions

    .dispatch()

    Returns array of promises dispatched to the listener

    #onDidFindValidUpdate

    Fired when a valid update is found.

    Parameters:

    releaseNotesUrl
    string

    URL of the release notes of the update.

    version
    string

    The version of the update or an empty string if not known

    #onUpdaterDidNotFindUpdate

    Fired if checkForUpdates did not find an update.

    #onWillDownloadUpdate

    Fired when an update will be downloaded.

    Parameters:

    version
    string

    The version of the update or an empty string if not known

    #onDidDownloadUpdate

    Fired when an update has been downloaded.

    Parameters:

    version
    string

    The version of the update or an empty string if not known

    #onWillInstallUpdateOnQuit

    Fired when an update will be installed on restart or quit.

    Parameters:

    version
    string

    The version that will be installed on quit or an empty string if not known

    #onUpdaterWillRelaunchApplication

    Fired just before the updater restarts the application.

    #onUpdaterDidRelaunchApplication

    Fired when an application has been restarted due to an update.

    #onDidAbortWithError

    Fired when an update fails.

    Parameters:

    description
    string

    Description of the error.

    reason
    string

    The reason for the error.

    Methods

    #checkForUpdates

    Check for Vivaldi browser updates.

    Parameters:

    withUi
    boolean

    Indicates whether we want the auto-update ui to appear.

    #isUpdateNotifierEnabled

    Checks whether the update notifier is set to run on startup.

    #enableUpdateNotifier

    Sets the update notifier to run on startup and launches it.

    #disableUpdateNotifier

    Removes the update notifier from autorun and attempts to terminate it.

    #installUpdateAndRestart

    Installs update & restart. Should be called after an onWillInstallUpdateOnQuit event has occurred.

    #getAutoInstallUpdates

    Checks whether we automatically install updates

    #setAutoInstallUpdates

    Change automatically install updates setting

    Parameters:

    autoinstall
    boolean

    Indicates whether we want to automatically install updates.

    #getLastCheckTime

    Get the date & time we last checked for an update. Returns milliseconds since epoch.

    #getUpdateStatus

    Get a status of an update operation if any

    #hasAutoUpdates

    Return true if automatic updates are supported.