accessKeys
Types
#AccessKeyDefinition
Contains the access key character and all relevant attributes from the element it belongs to
Properties:
- access_key
string
The access key itself, without modifiers
- tagname
string
The tagname of the access key element
- title
string
The title attribute of the access key element
- href
string
The href attribute of the access key element
- value
string
The value attribute of the access key element
- textContent
string
The textContent of the access key element
- id
string
The id attribute of the access key element
Methods
#getAccessKeysForPage
Get a list of all access keys defined on this page
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#action
Find the element corresponding to an access key and fire the access key action
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- id
string
Element ID to be used for lookup
autoUpdate
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
#onNeedRestartToReloadCodecs
Fired when an update to FFMPEG codecs happened while the application was running, and restart is needed to reload them
#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.
#onUpdateFinished
Signal sent when update completed without installation. Currently, only sent by macOS for exit on silent 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.
#needsCodecRestart
Return true if restart is needed due to codec update.
bookmarksPrivate
Types
#FolderIds
Ids for a set of folders.
Properties:
- bookmarks
string
⚠ NO DESCRIPTION PROVIDED
- mobile
string
⚠ NO DESCRIPTION PROVIDED
- trash
string
⚠ NO DESCRIPTION PROVIDED
#SpeedDialInfo
Object passed to the updateSpeedDialsForWindowsJumplist function.
Properties:
- title
string
⚠ NO DESCRIPTION PROVIDED
- url
string
⚠ NO DESCRIPTION PROVIDED
#BookmarkTreeNode
Copied from bookmarks.json
Properties:
- id
string
The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- parentId
- (optional)
string
The
id
of the parent folder. Omitted for the root node. - index
- (optional)
integer
The 0-based position of this node within its parent folder.
- url
- (optional)
string
The URL navigated to when a user clicks the bookmark. Omitted for folders.
- title
string
The text displayed for the node.
- nickname
string
The nickname for the node. Vivaldi extended property
- description
string
The description text for the node. Vivaldi extended property
- thumbnail
string
chrome://thumb/
pointing to the stored url of the thumbnail - partner
string
Partner id for the node. Vivaldi extended property
- speeddial
boolean
Boolean variable, stating if a folder is a speeddial folder
- themeColor
string
The theme color from the website, to use as the background of the speed dials thumbnail, if no other thumbnail is available
- bookmarkbar
boolean
Boolean variable, stating if a folder is a bookmark bar folder
- trash
boolean
true if this is the trash folder. Read only.
- dateAdded
- (optional)
number
When this node was created, in milliseconds since the epoch (
new Date(dateAdded)
). - dateGroupModified
- (optional)
number
When the contents of this folder last changed, in milliseconds since the epoch.
- faviconUrl
- (optional)
string
If present this url should be used to retrive a favicon.
- children
- (optional)
An ordered list of children of this node.
Array
of:- BookmarkTreeNode
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
#onFaviconChanged
Fired when a favicon changes.
Parameters:
- id
string
Bookmark id
- favicon_url
string
The favicon's url
#onMetaInfoChanged
Fired when meta info changes.
Parameters:
- id
string
Bookmark id
- changeInfo
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- nickname
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- description
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- thumbnail
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- speeddial
- (optional)
boolean
⚠ NO DESCRIPTION PROVIDED
- bookmarkbar
- (optional)
boolean
⚠ NO DESCRIPTION PROVIDED
- themeColor
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
Methods
#updateSpeedDialsForWindowsJumplist
Update the speed dial list in Windows 7+ jumplist.
Parameters:
- speedDials
⚠ NO DESCRIPTION PROVIDED
Array
of:- SpeedDialInfo
#emptyTrash
Empty the bookmarks trash folder.
#updatePartners
Update default bookmarks
#isCustomThumbnail
Check if the bookmark has a custom thumbnail from a local file or resource.
Parameters:
- bookmarkId
string
the id of the bookmark
#getFolderIds
Returns ids of top level folders.
#export
Exports bookmarks to a Chrome html bookmark file
Parameters:
- windowId
integer
The file selector will be modal to this window.
bookmarkContextMenu
Types
#Rect
Position and size of element in menu bar.
Properties:
- x
integer
Left position of item that opens menu, screen coordinates.
- y
integer
Top position of item that opens menu, screen coordinates.
- width
integer
Width of item that opens menu.
- height
integer
Height of item that opens menu.
#FolderEntry
⚠ NO DESCRIPTION PROVIDED
Properties:
- id
string
Bookmark folder id.
- offset
integer
Offset into folder.
- folderGroup
boolean
When true, sorted content will have folders first or last in list.
- rect
Rect
⚠ NO DESCRIPTION PROVIDED
#SortOrder
ENUM
Defines how to sort container items.
- ascending
- descending
#SortField
ENUM
Defines what element to use as sort key
- title
- url
- nickname
- description
- dateAdded
#Edge
ENUM
Defines position of menu items added in chrome code wrt bookmark items.
- above
- below
- off
#Icons
- Icons
Icons encoded as base64
Array
of:- string
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
#onOpen
Fires before menu opens.
Parameters:
- id
string
Menu id, same as the bookmark folder to be shown.
#onClose
Fires before menu closes.
Methods
#show
Shows a context menu.
Parameters:
- properties
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- siblings
List of menu entries.
Array
of:- FolderEntry
- id
string
Bookmark folder id. Must match an id in the sibling list.
- edge
- (optional)
Edge
Where to place extra menu items
- sortField
- (optional)
SortField
⚠ NO DESCRIPTION PROVIDED
- sortOrder
- (optional)
SortOrder
⚠ NO DESCRIPTION PROVIDED
- icons
Icons
Default and folder icons.
extensionActionUtils
Types
#ActionType
ENUM
browser- or pageAction.
- browser
- page
#ExtensionType
ENUM
Regular extension- or componentAction. Component actions will go through ToolbarActionViewController
- extensionAction
- componentAction
#MenuType
ENUM
What type of menu item.
- normal
- checkbox
- radio
- separator
#GlobalErrorType
ENUM
Type of global error. Disabled because of permission increase, or installed by third-party.
- installed
- upgrade
#MenuItem
Menu item representing a single menu item.
Properties:
- name
string
The name of the item as shown in the menu.
- id
string
The id for the item.
- enabled
boolean
Is the item enabled.
- visible
boolean
Is the item visible.
- checked
boolean
Is the item checked.
- menuType
MenuType
⚠ NO DESCRIPTION PROVIDED
- submenu
- (optional)
Sub menu items if the extension supplies a custom menu.
Array
of:- MenuItem
#SidePanelInfo
Side Panel description (if exists).
Properties:
- url
string
Side Panel URL.
- activeUrl
string
Side Panel URL.
#SidePanelOptions
⚠ NO DESCRIPTION PROVIDED
Properties:
- tabId
- (optional)
integer
If specified, the side panel options will only apply to the tab with this id. If omitted, these options set the default behavior (used for any tab that doesn't have specific settings). Note: if the same path is set for this tabId and the default tabId, then the panel for this tabId will be a different instance than the panel for the default tabId.
- path
- (optional)
string
The path to the side panel HTML file to use. This must be a local resource within the extension package.
- extensionId
- (optional)
string
The path to the side panel HTML file to use. This must be a local resource within the extension package.
- resourceUrl
- (optional)
string
The path to the side panel HTML file to use. This must be a local resource within the extension package.
- enabled
- (optional)
boolean
Whether the side panel should be enabled. This is optional. The default value is true.
#ExtensionInfo
Extension action per tab id.
Properties:
- tabId
integer
tab id, or kDefaultTabId(-1) if the information should be used for all tabs.
- id
string
The unique extension identifier.
- badgeTooltip
- (optional)
string
Tooltip for the button.
- badgeText
- (optional)
string
Badgetext, typically room for four chars.
- badgeIcon
- (optional)
string
data-url for the current icon.
- badgeTextColor
- (optional)
string
Text color for the badge text, currently unused.
- badgeBackgroundColor
- (optional)
string
Background color for the badge text.
- enabled
- (optional)
boolean
Whether the extension is enabled or not.
- actionType
- (optional)
ActionType
The type of the extensionAction, either pageaction or browseraction.
- visible
- (optional)
boolean
Visibility of the action button, defaults to true.
- allowInIncognito
- (optional)
boolean
Whether the action is available in incognito windows or not.
- extensionType
- (optional)
ExtensionType
The type of the extensionAction, either pageaction or browseraction. Defaults to |extensionAction|.
- name
string
Name of extension.
- homepage
- (optional)
string
Homepage of extension.
- optionspage
- (optional)
string
Address of extension options page.
- optionsInNewTab
- (optional)
boolean
false if the options page should be opened embedded, true if it opens in a new tab.
- keyboardShortcut
- (optional)
string
Keyboard shortcut to toggle this extension.
- sidePanel
- (optional)
SidePanelInfo
contains sidepanel URL.
#ExtensionInstallError
Extension error.
Properties:
- id
string
The unique extension identifier.
- name
string
Extension name.
- errorType
- (optional)
GlobalErrorType
The type of the extensionAction, either pageaction or browseraction. Defaults to |extensionAction|.
- commandId
integer
Int id to lookup an error on action.
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
#onAdded
Fired when an extension has been loaded.
Parameters:
- extension
ExtensionInfo
⚠ NO DESCRIPTION PROVIDED
#onRemoved
Fired when an extension has been unloaded.
Parameters:
- extension
ExtensionInfo
⚠ NO DESCRIPTION PROVIDED
#onUpdated
Fired when an extensionAction is changed.
Parameters:
- extension
ExtensionInfo
⚠ NO DESCRIPTION PROVIDED
#onClearAllValuesForTab
Fired on ExtensionAction::ClearAllValuesForTab().
Parameters:
- extensionId
string
⚠ NO DESCRIPTION PROVIDED
- tabId
number
⚠ NO DESCRIPTION PROVIDED
#onCommandAdded
Fired when a keyboard shortcut is added to an extension.
Parameters:
- extensionId
string
⚠ NO DESCRIPTION PROVIDED
- shortcut
string
⚠ NO DESCRIPTION PROVIDED
#onCommandRemoved
Fired when a keyboard shortcut is removed from an extension.
Parameters:
- extensionId
string
⚠ NO DESCRIPTION PROVIDED
- shortcut
string
⚠ NO DESCRIPTION PROVIDED
#onExtensionDisabledInstallErrorAdded
Fired when an extensionerror is created. Can be of various kinds of GlobalErrors
Parameters:
- error
ExtensionInstallError
⚠ NO DESCRIPTION PROVIDED
#onExtensionDisabledInstallErrorRemoved
Fired when an extensionerror is handled or removed. Can be of various kinds of GlobalErrors.
Parameters:
- error
ExtensionInstallError
⚠ NO DESCRIPTION PROVIDED
#onSidePanelOptionChanged
Fired when side panel opetion changed
Parameters:
- extendionId
string
The unique extension identifier.
- options
SidePanelOptions
⚠ NO DESCRIPTION PROVIDED
#onSidePanelActionRequested
Fired when side panel action requested
Parameters:
- extendionId
string
The unique extension identifier.
- Action
string
The unique action identifier.
Methods
#getToolbarExtensions
#executeExtensionAction
execute browserAction or pageAction for extension
Parameters:
- extensionId
string
- windowId
integer
id of the application window.
#removeExtension
Removes a specified extension.
Parameters:
- extensionId
string
The id for the extension we want to remove.
- windowId
integer
id of the application window. Used to find the Browser object.
#showExtensionOptions
Shows options for the given extension
Parameters:
- extensionId
string
The id for the extension we want to remove.
- windowId
integer
id of the application window. Used to find the Browser object.
#getExtensionMenu
Gets the context menu for the given extension
Parameters:
- extensionId
string
The id for the extension we want to get the menu for.
#executeMenuAction
Execute menu action for extension.
Parameters:
- extensionId
string
- windowId
integer
id of the application window.
- menuId
string
id of the menu item.
#showGlobalError
Show the dialog for an extension install error.
Parameters:
- commandId
integer
The id for the error.
- windowId
integer
id of the application window. Used to find the Browser object.
#triggerGlobalErrors
Loop through any pending global extension errors and fire events for the ui.
calendar
Types
#AccountType
ENUM
The account type. Maps to int in db: 0: Local. 1: Vivaldi.net calendar. 2: Google Calendar. 3: CalDAV. 4: Read only iCal.
- local
- vivaldi
- google
- caldav
- ical
- fastmail
#RecurrenceException
A object describing how an instance of event recurrence is changed.
Properties:
- exception_id
- (optional)
string
The id of the exception.
- cancelled
- (optional)
boolean
If a certain instance of recurring event is cancelled.
- date
- (optional)
number
The date of a recurring event that an exception should be added to. In milliseconds since the epoch.
- exception_event_id
- (optional)
string
The id of the event that serves as exception to the event in a recurrence series.
- parent_event_id
- (optional)
string
The id of the event that is parent to all the others events in the recurrence series.
#CreateNotificationRow
An object describing notification to be created during event creation.
Properties:
- name
string
Name of the notification.
- when
number
When this notification should fire. In milliseconds since the epoch.
#CreateInviteRow
An object describing invite to be created during event creation.
Properties:
- name
string
Name of the invite.
- address
string
The invite address.
- partstat
string
The participation status for the event invite.
#SupportedCalendarComponents
An object describing supported calendar component set.
Properties:
- vevent
boolean
Does the calendar support vevent.
- vtodo
boolean
Does the calendar support vtodo.
- vjournal
boolean
Does the calendar support vjournal.
#Notification
An object describing notification.
Properties:
- id
string
The unique identifier for the notification. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- event_id
- (optional)
string
The event id this notification applies to.
- name
string
Name of the notification.
- description
- (optional)
string
The description of the notification.
- when
number
When this notification should fire. In milliseconds since the epoch.
- period
- (optional)
number
If not null, when the notification will fire. In milliseconds since the epoch.
- delay
- (optional)
integer
The notification will fire after delay minutes from now. Can not be used together with when.
#Invite
Object describing event invite.
Properties:
- id
string
The id of the invite.
- event_id
string
The id of the event that this invite applies to.
- name
- (optional)
string
The name of the contact to send the invite to.
- address
string
The address of the contact to send the invite to.
- sent
- (optional)
boolean
States if the event invite has been sent or not.
- partstat
- (optional)
string
The participation status for the event invite.
#CalendarEvent
A calendar event. An event belongs to a single Calendar.
Properties:
- id
string
The unique identifier for the event. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- calendarId
string
The calendar id of the event.
- alarmId
- (optional)
string
The alarm id of the event.
- title
string
Title of event.
- description
- (optional)
string
The event description.
- start
- (optional)
number
When this event starts, in milliseconds since the epoch.
- end
- (optional)
number
When this event ends, in milliseconds since the epoch.
- allDay
- (optional)
boolean
All day event.
- is_recurring
- (optional)
boolean
Is this a recurring event.
- location
- (optional)
string
The location of the event.
- url
- (optional)
string
The url of the event.
- etag
- (optional)
string
The CalDAV etag id of the event.
- href
- (optional)
string
The CalDAV href id of the event.
- uid
- (optional)
string
The event uid.
- eventTypeId
- (optional)
string
The event type id.
- task
- (optional)
boolean
Whether this event is a task. Tasks can be marked as completed.
- complete
- (optional)
boolean
If this event is a task type you can mark it as complete.
- trash
- (optional)
boolean
Is this event trashed.
- trash_time
- (optional)
number
When this event was trashed, in milliseconds since the epoch.
- sequence
- (optional)
integer
iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.
- ical
- (optional)
string
The original ical message.
- rrule
- (optional)
string
The recurring rule. In iCalendar format.
- recurrenceExceptions
- (optional)
List of recurrence exceptions. Either cancelled instances or moved.
Array
of:- RecurrenceException
- notifications
- (optional)
List of notifications.
Array
of:- Notification
- organizer
- (optional)
string
The organizer of the event.
- invites
- (optional)
List of invites.
Array
of:- Invite
- timezone
- (optional)
string
The timezone of the event.
- priority
- (optional)
integer
Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.
- status
- (optional)
string
The overall status or confirmation for the event or todo.
- percentage_complete
- (optional)
integer
The percent completion of a todo to the organizer.
- categories
- (optional)
string
Event or todo categories. A comma separated list.
- component_class
- (optional)
string
Access classification for a event or todo.
- attachment
- (optional)
string
Document object for a event or todo.
- completed
- (optional)
number
The date and time that a todo was actually completed.
- syncPending
- (optional)
boolean
Does this event have any pending sync changes.
- deletePending
- (optional)
boolean
Should the event be deleted locally once server deletion is completed.
- end_recurring
- (optional)
number
When this event ends re-occurring. In milliseconds since the epoch.
#CreateDetails
Object passed to the create() function.
Properties:
- title
string
⚠ NO DESCRIPTION PROVIDED
- description
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- start
- (optional)
number
When this event shoud starts, in milliseconds since the epoch.
- end
- (optional)
number
When this event should ends, in milliseconds since the epoch.
- allDay
- (optional)
boolean
Is this a all day event.
- is_recurring
- (optional)
boolean
Is this a recurring event.
- location
- (optional)
string
The location of the event.
- url
- (optional)
string
The url of the event.
- calendarId
string
The calendar id of the event.
- etag
- (optional)
string
The CalDAV etag id of the event.
- href
- (optional)
string
The CalDAV href id of the event.
- uid
- (optional)
string
The event uid.
- task
- (optional)
boolean
Whether this event is a task. Tasks can be marked as completed.
- complete
- (optional)
boolean
If this event is a task type you can mark it as complete.
- sequence
- (optional)
integer
iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.
- ical
- (optional)
string
The original ical message.
- rrule
- (optional)
string
The recurring rule. In iCalendar format.
- eventTypeId
- (optional)
string
The event type id of the event.
- organizer
- (optional)
string
The organizer of the event.
- recurrenceExceptions
- (optional)
List of recurrence exceptions.
Array
of:- RecurrenceException
- notifications
- (optional)
List of notifications to create.
Array
of:- CreateNotificationRow
- invites
- (optional)
List of invites to create.
Array
of:- CreateInviteRow
- timezone
- (optional)
string
The timezone of the event to create.
- is_template
boolean
Is the event a template or not.
- priority
- (optional)
integer
Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.
- status
- (optional)
string
The overall status or confirmation for the event or todo.
- percentage_complete
- (optional)
integer
The percent completion of a todo to the organizer.
- categories
- (optional)
string
Event or todo categories. A comma separated list.
- component_class
- (optional)
string
Access classification for a event or todo.
- attachment
- (optional)
string
Document object for a event or todo.
- completed
- (optional)
number
The date and time that a todo was actually completed.
- syncPending
- (optional)
boolean
Does this event have any pending sync changes.
- deletePending
- (optional)
boolean
Should the event be deleted locally once server deletion is completed.
- end_recurring
- (optional)
number
When this event ends re-occurring. In milliseconds since the epoch.
#EventType
A event type.
Properties:
- id
string
The unique identifier for the event type. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- name
string
The event type name.
- color
- (optional)
string
The color of the event type.
- iconindex
- (optional)
integer
The event type icon index.
#CreateEventType
Object passed to the typeCreate() function.
Properties:
- name
string
⚠ NO DESCRIPTION PROVIDED
- color
- (optional)
string
The color of the event type.
- iconindex
- (optional)
integer
The event type iconindex.
#CreateEventsResults
Object stating how many events were created successfully and how many creations resulted in errors.
Properties:
- created_count
integer
Number of events created.
- failed_count
integer
Number of failed event creation attempts.
#CreateCalendarDetails
Object passed to the createCalendar() function.
Properties:
- accountId
string
The id of the account the calendar belongs to.
- name
string
The name of the calendar to be created.
- description
- (optional)
string
The description of the calendar to be created.
- orderindex
- (optional)
integer
The UI order of the calendar.
- iconindex
- (optional)
integer
The iconindex of the calendar.
- color
- (optional)
string
The color of the calendar.
- hidden
- (optional)
boolean
If this calendar should be visible.
- active
- (optional)
boolean
If this CalDAV calendar should be polled.
- lastChecked
- (optional)
number
When this calendar last checked for updates. In milliseconds since the epoch.
- timezone
- (optional)
string
The timezone of the calendar.
- ctag
- (optional)
string
The ctag field of the CalDAV calendar.
- supportedCalendarComponent
SupportedCalendarComponents
⚠ NO DESCRIPTION PROVIDED
#Calendar
Calendar that owns events.
Properties:
- id
string
The unique identifier for the calendar. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- accountId
string
The id of the account the calendar belongs to.
- name
string
The name of the calendar.
- description
- (optional)
string
The calendar description.
- orderindex
- (optional)
integer
The UI order of the calendar.
- color
- (optional)
string
The UI color of the calendar.
- hidden
- (optional)
boolean
States if the calendar is hidden in the UI.
- active
- (optional)
boolean
States if a CalDAV calendar should be polled.
- iconindex
- (optional)
integer
Icon index of the calendar.
- ctag
- (optional)
string
The ctag field of the CalDAV calendar.
- lastChecked
- (optional)
number
When this calendar last checked for updates. In milliseconds since the epoch.
- timezone
- (optional)
string
The timezone of the calendar.
- supportedCalendarComponent
SupportedCalendarComponents
⚠ NO DESCRIPTION PROVIDED
#updateCalendar
Object to update calendar.
Properties:
- accountId
- (optional)
string
The id of the account the calendar belongs to.
- name
- (optional)
string
The name of the calendar.
- description
- (optional)
string
The calendar description.
- orderindex
- (optional)
integer
The UI order of the calendar.
- color
- (optional)
string
The UI color of the calendar.
- hidden
- (optional)
boolean
States if the calendar is hidden in the UI.
- active
- (optional)
boolean
States if a CalDAV calendar should be polled.
- iconindex
- (optional)
integer
Icon index of the calendar.
- ctag
- (optional)
string
The ctag field of the CalDAV calendar.
- lastChecked
- (optional)
number
When this calendar last checked for updates. In milliseconds since the epoch.
- timezone
- (optional)
string
The timezone of the calendar.
- supportedCalendarComponent
- (optional)
SupportedCalendarComponents
⚠ NO DESCRIPTION PROVIDED
#updatedAccount
Object to update calendar.
Properties:
- name
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- username
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- url
- (optional)
string
The updated url of the account.
- account_type
- (optional)
AccountType
The type of account.
- interval
- (optional)
integer
The interval how often this account should poll. In seconds.
#createdAccount
Object to create calendar.
Properties:
- name
string
⚠ NO DESCRIPTION PROVIDED
- username
string
⚠ NO DESCRIPTION PROVIDED
- url
string
The url of the account to create.
- account_type
- (optional)
AccountType
The type of account.
- interval
- (optional)
integer
The interval how often this account should poll. In seconds.
#Account
An object describing calendar account.
Properties:
- id
string
The unique identifier for the account. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- name
string
Name of the account.
- username
string
The username of the account.
- url
string
The base url of the account.
- account_type
- (optional)
AccountType
The type of account.
- interval
- (optional)
integer
The interval how often this account should poll. In seconds.
#EventTemplate
A event template object.
Properties:
- id
string
The unique identifier for the event template.
- name
string
The name of the event template.
- ical
string
The ical of the event template.
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
#onIcsFileOpened
Called when the user opens a downloaded ics file
Parameters:
- filePath
string
⚠ NO DESCRIPTION PROVIDED
#onWebcalUrlOpened
Called when the user opens a webcal link
Parameters:
- url
string
⚠ NO DESCRIPTION PROVIDED
#onMailtoOpened
Called when the user opens a mailto link
Parameters:
- mailto
string
⚠ NO DESCRIPTION PROVIDED
#onEventCreated
Fired when a event is created.
Parameters:
- createdEvent
CalendarEvent
The created event.
#onNotificationChanged
Fired when notification is created, updated or deleted.
Parameters:
- changedNotification
Notification
The created, changed or updated notification.
#onCalendarDataChanged
Fired when the calendar datamodel should be reloaded.
Methods
#getAllEvents
Retrieves all events in calendar.
#getAllEventTypes
Retrieves all event types.
#getAllNotifications
Retrieves all notifications.
#eventCreate
Creates a event in the specified calendar.
Parameters:
- event
CreateDetails
⚠ NO DESCRIPTION PROVIDED
#eventsCreate
Creates multiple events.
Parameters:
- eventsList
⚠ NO DESCRIPTION PROVIDED
Array
of:- CreateDetailsMinimum items: 1
#deleteEvent
Deletes an event.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#deleteEventException
Deletes an recurring event exception.
Parameters:
- exception_id
string
The id of the exception to delete.
#updateRecurrenceException
Updates the recurrence exception of an event. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- recurrenceId
string
⚠ NO DESCRIPTION PROVIDED
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- cancelled
- (optional)
boolean
If a certain instance of recurring event is cancelled.
- date
- (optional)
number
The date of a recurring event that an exception should be added to. In milliseconds since the epoch.
- exception_event_id
- (optional)
string
The id of the event that serves as exception to the event in a recurrence series.
- parent_event_id
- (optional)
string
The id of the event that is parent to all the others events in the recurrence series.
#updateEvent
Updates the properties of an event. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- calendarId
- (optional)
string
The updated calendar id of event.
- alarmId
- (optional)
string
The updated alarm id of event.
- title
- (optional)
string
The updated title of event.
- description
- (optional)
string
The updated description of event.
- start
- (optional)
number
When this event shoud starts, in milliseconds since the epoch.
- end
- (optional)
number
Updated time when this event should end, in milliseconds since the epoch.
- allDay
- (optional)
boolean
Is this all day event.
- location
- (optional)
string
The location of the event.
- is_recurring
- (optional)
boolean
Is this a recurring event.
- url
- (optional)
string
The url of the event.
- etag
- (optional)
string
The CalDAV.etag of the event.
- href
- (optional)
string
The href id of the event.
- uid
- (optional)
string
The event uid.
- eventTypeId
- (optional)
string
The event type id.
- task
- (optional)
boolean
Whether this event is a task. Tasks can be marked as completed.
- complete
- (optional)
boolean
If this event is a task type you can mark it as complete.
- trash
- (optional)
boolean
Is this event trashed.
- sequence
- (optional)
integer
iCal sequence field according to: https://tools.ietf.org/html/rfc5545#section-3.8.7.4.
- ical
- (optional)
string
The original ical message.
- rrule
- (optional)
string
The recurring rule. In iCalendar format.
- organizer
- (optional)
string
The organizer of the event.
- timezone
- (optional)
string
The timezone of the event.
- priority
- (optional)
integer
Priority of event or task. Must be in the range [0..9]. 0 is equivalent of no priority.
- status
- (optional)
string
The overall status or confirmation for the event or todo.
- percentage_complete
- (optional)
integer
The percent completion of a todo to the Organizer.
- categories
- (optional)
string
Event or todo categories. A comma separated list.
- component_class
- (optional)
string
Access classification for a event or todo.
- attachment
- (optional)
string
Access classification for a event or todo.
- completed
- (optional)
number
The date and time that a todo was actually completed.
- syncPending
- (optional)
boolean
Does this event have any pending sync changes.
- deletePending
- (optional)
boolean
Should the event be deleted locally once server deletion is completed.
- end_recurring
- (optional)
number
When this event ends re-occurring. In milliseconds since the epoch.
#create
Creates a calendar.
Parameters:
- calendar
CreateCalendarDetails
⚠ NO DESCRIPTION PROVIDED
#getAll
Returns all calendars.
#delete
Deletes a calendar, with all its events and event exceptions.
Parameters:
- id
string
The id of the calendar to be deleted.
#update
Updates the properties of an calendar. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
updateCalendar
⚠ NO DESCRIPTION PROVIDED
#eventTypeCreate
Creates a event type.
Parameters:
- event_type
CreateEventType
⚠ NO DESCRIPTION PROVIDED
#eventTypeUpdate
Updates the properties of an event type. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- name
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- color
- (optional)
string
The updated color of the event type.
- iconindex
- (optional)
integer
The iconindex of the event type.
#deleteEventType
Deletes an event type.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#createEventException
Creates an exception to event instance in recurring series.
Parameters:
- parent_event_id
string
The parent id of the event in the recurrence series.
- exception_event_id
- (optional)
string
The id of the event that serves as exception to the event in a recurrence series.
- cancelled
boolean
Cancel this instance of recurring event.
- date
- (optional)
number
When the exception should happen. In milliseconds since the epoch.
#createNotification
Creates a notification.
Parameters:
- createNotification
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- event_id
- (optional)
string
The event id of the event to create the notification for.
- name
string
The name of the notification.
- description
- (optional)
string
The description of the notification.
- when
number
When the notification should fire. In milliseconds since the epoch.
- period
- (optional)
number
If not null, when the notification will fire. In milliseconds since the epoch.
- delay
- (optional)
integer
The notification will fire after delay minutes from now. Can not be used together with when.
#updateNotification
Updates the properties of a notification. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
The id of the notification to update.
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- name
- (optional)
string
The name of the notification.
- description
- (optional)
string
The description of the notification.
- when
- (optional)
number
When the notification should fire. In milliseconds since the epoch.
- period
- (optional)
number
If not null, when the notification will fire. In milliseconds since the epoch.
- delay
- (optional)
integer
The notification will fire after delay minutes from now. Can not be used together with when.
#deleteNotification
Deletes a notification.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#createInvite
Creates an invite for event.
Parameters:
- createInvite
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- event_id
string
The event id of the event to create the invite for.
- address
string
The email address to send the invite to.
- name
string
The name of the persion to send the invite to.
- partstat
- (optional)
string
The participation status for the event invite
- sent
- (optional)
boolean
Has the invite been sent.
#deleteInvite
Deletes an invite.
Parameters:
- id
string
The invite id to delete.
#updateInvite
Updates an invite for event.
Parameters:
- updateInvite
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- id
string
The id of the invite to update.
- address
- (optional)
string
The email address to send the invite to.
- name
- (optional)
string
The name of the persion to send the invite to.
- partstat
- (optional)
string
The participation status for the event invite.
- sent
- (optional)
boolean
Has the invite been sent.
#getAllAccounts
Retrieves all calendar accounts.
#createAccount
Creates an account.
Parameters:
- toCreate
createdAccount
⚠ NO DESCRIPTION PROVIDED
#updateAccount
Updates the properties of an account. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
updatedAccount
⚠ NO DESCRIPTION PROVIDED
#deleteAccount
Deletes an account and its calendars, events, recurring_exceptions, notifications etc
Parameters:
- id
string
The account id to be deleted
#createEventTemplate
Creates an event template.
Parameters:
- name
string
The event template name.
- ical
string
The event template ical.
#getAllEventTemplates
Retrieves all event templates.
#updateEventTemplate
Updates the properties of an event template. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
The id of the event template to update.
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- name
- (optional)
string
The updated name of the event template.
- ical
- (optional)
string
The updated ical of the event template.
#getParentExceptionId
Returns the parent event id of a exception event id.
Parameters:
- exception_event_id
string
The id of the event exception to return the parent event id for.
#deleteEventTemplate
Deletes an event template.
Parameters:
- id
string
The id of the event template to delete.
contacts
Types
#ContactPropertyName
ENUM
Property types for adding, updating and removing postal address and phonenumbers for contacts.
- postalAddress
- phoneNumber
#EmailAddress
An email address object
Properties:
- id
string
The unique identifier for the email address. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- emailAddress
- (optional)
string
The email address of the contact.
- type
- (optional)
string
The type of email address. WORK, HOME etc
- favorite
- (optional)
boolean
Is this email address favorite for user.
- obsolete
- (optional)
boolean
Is this email address obsolete. If true it should not show up in autocomplete when composing email
#Phonenumber
A phonenumber object
Properties:
- id
string
The unique identifier for the phonenumber. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- phoneNumber
- (optional)
string
The phonenumber.
- type
- (optional)
string
The type of phonenumber. WORK, HOME etc
#PostalAddress
A postal address object
Properties:
- id
string
The unique identifier for the postal address. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- postalAddress
- (optional)
string
The postal address.
- type
- (optional)
string
The type of postal address. WORK, HOME etc
#Contact
A contact object
Properties:
- id
string
The unique identifier for the contact. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- name
- (optional)
string
The name id of the contact.
- birthday
- (optional)
number
The birthday of the contact.
- note
- (optional)
string
A note for the contact.
- emailAddresses
⚠ NO DESCRIPTION PROVIDED
Array
of:- EmailAddress
- phoneNumbers
⚠ NO DESCRIPTION PROVIDED
Array
of:- Phonenumber
- postalAddresses
⚠ NO DESCRIPTION PROVIDED
Array
of:- PostalAddress
- avatarUrl
- (optional)
string
A url for the contact avatar url.
- separator
boolean
Is this contact a dummy separator.
- generatedFromSentMail
boolean
Is this contact generated by sent mail.
- trusted
- (optional)
boolean
Can this contact load external content
#CreateUpdateDetails
Object passed to the create and update contact function.
Properties:
- name
- (optional)
string
The name of the contact.
- birthday
- (optional)
number
The birthday of the contact. In milliseconds since epoch
- note
- (optional)
string
The note for the contact.
- generatedFromSentMail
- (optional)
boolean
Was this contact generated by sent mail.
- avatarUrl
- (optional)
string
A url for the contact avatar url.
- separator
- (optional)
boolean
Is this contact a dummy separator.
- trusted
- (optional)
boolean
Can this contact load external content
#AddPropertyDetails
Object passed to the addPropertyItem() function.
Properties:
- propertyName
ContactPropertyName
The type to add (postal address, phone).
- contactId
string
The id of the contact.
- propertyValue
string
The email address or phonenumber of the contact.
- type
string
The type of email address. Example: WORK, HOME. Note type=INTERNET is default.
- asDefault
- (optional)
boolean
Should the email address be default for the contact
#EmailAddressAddUpdate
Object passed to the addPropertyItem() function.
Properties:
- contactId
string
The id of the contact.
- emailAddress
- (optional)
string
The email address of the contact.
- type
- (optional)
string
The type of email address. WORK, HOME etc
- favorite
- (optional)
boolean
Is this email address favorite for user.
- obsolete
- (optional)
boolean
Is this email address obsolete. If true it should not show up in autocomplete when composing email
#RemovePropertyDetails
Object passed to the removeProperty() function.
Properties:
- propertyName
ContactPropertyName
The property name to remove (postal address, phone).
- contactId
string
The id of the contact.
- propertyId
string
The email address of the contact.
#UpdatePropertyDetails
Object passed to the updateProperty() function.
Properties:
- propertyName
ContactPropertyName
The property name to be updated (address, phone).
- contactId
string
The id of the contact.
- propertyId
string
The id of the property to be updated.
- propertyValue
string
The email address or phonenumber value to update for the given contact.
- type
string
The type of address, phone. WORK, HOME etc
#CreateManyContactsResults
Object stating how many contacts were created successfully and how many creations resulted in errors
Properties:
- created_count
- (optional)
integer
Number of contacts created
- failed_count
- (optional)
integer
Number of failed contacts creation attempts
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
#onContactCreated
Fired when a contact is created.
Parameters:
- createdContact
Contact
The created contact
#onContactRemoved
Fired when contact is deleted.
Parameters:
- removedContact
Contact
The deleted contact
#onContactChanged
Fired when contact is updated.
Parameters:
- changedContact
Contact
The changed contact
Methods
#getAll
Retrieves all contacts
#getAllEmailAddresses
Retrieves all email addresses for all contacts
#create
Creates a contact.
Parameters:
- contact
CreateUpdateDetails
⚠ NO DESCRIPTION PROVIDED
#createMany
Creates / imports multiple contacts.
Parameters:
- contactList
⚠ NO DESCRIPTION PROVIDED
Array
of:- CreateUpdateDetailsMinimum items: 1
#update
Updates the properties of a contact. Specify only the properties that you want to change. Unspecified properties will be left unchanged.
Parameters:
- id
string
The contact id to be updated
- changes
CreateUpdateDetails
⚠ NO DESCRIPTION PROVIDED
#delete
Deletes a contact.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#addPropertyItem
Adds a property to a contact.
Parameters:
- propertyToAdd
AddPropertyDetails
⚠ NO DESCRIPTION PROVIDED
#addEmailAddress
Adds an email address to a contact.
Parameters:
- emailToAdd
EmailAddressAddUpdate
Object holding the fields for the email address to create
#updateEmailAddress
Updates an email address for a contact.
Parameters:
- emailAddressId
string
The id of email address to update
- emailToUpdate
EmailAddressAddUpdate
Object holding the fields for the email address to update
#removeEmailAddress
Removes an email address for a contact.
Parameters:
- removeEmail
object
An object specifying properties to remove email address.
Object Properties:
- contactId
string
The contact id of which email address to remove.
- emailAddressId
string
The id of email address to remove
#updatePropertyItem
Updates a property for a contact.
Parameters:
- propertyToUpdate
UpdatePropertyDetails
⚠ NO DESCRIPTION PROVIDED
#removePropertyItem
Removes a property from a contact.
Parameters:
- propertyToRemove
RemovePropertyDetails
⚠ NO DESCRIPTION PROVIDED
#readThunderbirdContacts
Read thunderbird contacts from db files.
Parameters:
- path
string
Profile Path to thunderbird directory, containing: abook.sqlite and history.sqlite files.
contentBlocking
Types
#RuleGroup
ENUM
Used to specify whether a specific operation should apply to tracking blocking or adblocking.
- tracking
- ad_blocking
#ExceptionList
ENUM
Used to inform whether the exception list used in a rule group is a list of exemptions or a list for which process is enabled
- process_list
- exempt_list
#FetchResult
ENUM
The result of a fetch operation on a rule source.
- success: Fetch completed successfully.
- download_failed: For an online source, failed to download using the provided URL.
- file_not_found: For a local source, the file provided didn't seem to exist.
- file_read_error: For a local source, the file provided couldn't be read.
- file_unsupported: The rules file is of an invalid format or doesn't contain any valid rule.
- failed_saving_parsed_rules: The rules were fetched and compiled properly, but the result couldn't be saved to the profile.
- unknown: No fetching attempt has completed yet.
#RulesInfo
Information about the rules themselves and more detailed parsing results
Properties:
- valid_rules
integer
The number of entries in the file that resulted in a rule being compiled.
- unsupported_rules
integer
The number of entries in the file that resolved to valid rules that either didn't make sense or are not supported at this time.
- invalid_rules
integer
The number of entries in the file that resolved to valid rules that could not be parsed to a rule or were explicitly against the spec.
#AdBlockMetadata
Information extracted from the adblock file comments. If the user added a malicous source, these could be anything. Handle with care.
Properties:
- homepage
string
URL pointing to the original website for this list.
- title
string
List name.
- expires
integer
How often the list is refreshed, in hours.
- license
string
URL pointing to licensing info for the list.
- version
integer
Version number of the list.
#RuleSourceSettings
Parameters used when parsing the rules list. Can only be modified when the source is disabled
Properties:
- allow_abp_snippets
boolean
If false, any present abp snippet rules will be ignored.
- naked_hostname_is_pure_host
boolean
If true, any rule that looks like just a host name will be converted to match only the host part of the url.
- use_whole_document_allow
boolean
If true, any allow rule using the document type will cause all resources loaded by matching documents to be allowed (ABP beahvior).
#RuleSource
Information about a loaded rule source, including its fetching status and metadata retrieved when extracting rules from it
Properties:
- source_url
string
For an online source, this is the url that was provided when setting it up.
- source_file
string
For an local source, this is the file that was provided when setting it up.
- is_from_url
boolean
indicates whether the rule source is online or local, and which of the source_url and source_file fields is valid
- settings
RuleSourceSettings
See RuleSourceSettings.
- id
integer
⚠ NO DESCRIPTION PROVIDED
- rules_list_checksum
string
Checksum of the compiled rule file derived from this source. This will be the empty string if the rule source has never been fetched succesfully.
- unsafe_adblock_metadata
AdBlockMetadata
⚠ NO DESCRIPTION PROVIDED
- last_update
number
The last time the source was successfully fetched and the corresponding rules updated. Represented in milliseconds since the epoch.
- next_fetch
number
The next time a fetching and updating from the rule source will be attempted. Represented in milliseconds since the epoch.
- is_fetching
boolean
Whether fetching of the rule source is in progress
- last_fetch_result
FetchResult
The result of the last fetch attempt
- rules_info
RulesInfo
⚠ NO DESCRIPTION PROVIDED
- removable
boolean
⚠ NO DESCRIPTION PROVIDED
- loaded
boolean
⚠ NO DESCRIPTION PROVIDED
#BlockedCounter
How often requests relating to a domain were blocked
Properties:
- domain
string
⚠ NO DESCRIPTION PROVIDED
- blocked_count
integer
⚠ NO DESCRIPTION PROVIDED
#BlockedUrlsInfo
Information about a blocked URL
Properties:
- url
string
⚠ NO DESCRIPTION PROVIDED
- blocked_count
integer
⚠ NO DESCRIPTION PROVIDED
#TrackerInfo
Information for a given tracker
Properties:
- source_id
integer
The id of the rule source from which this info was obtained.
- info
any
⚠ NO DESCRIPTION PROVIDED
#BlockedTrackersInfo
Information about a blocked tracker
Properties:
- domain
string
⚠ NO DESCRIPTION PROVIDED
- blocked_urls
blocked urls that belong to this tracker
Array
of:- BlockedUrlsInfo
- tracker_info
⚠ NO DESCRIPTION PROVIDED
Array
of:- TrackerInfo
- blocked_count
integer
⚠ NO DESCRIPTION PROVIDED
#TabBlockedUrlsInfo
Information about urls that got blocked, per tab
Properties:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
- total_blocked_count
integer
⚠ NO DESCRIPTION PROVIDED
- blocked_trackers_info
blocked urls that belong to a known tracker, alongside with tracker information.
Array
of:- BlockedTrackersInfo
- blocked_urls_info
blocked urls for which there is no tracker information.
Array
of:- BlockedUrlsInfo
#AdAttributionDomain
Information about which domain ad attribution is enabled for, if any, for a given tab
Properties:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
- domain
string
⚠ NO DESCRIPTION PROVIDED
- active
boolean
True if the tab is currently on the ad attribution domain, causing ad attribution to be enabled.
#AllowedAdAttributionTrackers
Information about which trackers have been allowed for ad attribution, per tab
Properties:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
- tracker_urls
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
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
#onRuleSourceAdded
Fired when a known rule source has been added
Parameters:
- rule_source
RuleSource
⚠ NO DESCRIPTION PROVIDED
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onRuleSourceUpdated
The properties of a rule source have been updated, either because a fetch started or completed.
Parameters:
- rule_source
RuleSource
⚠ NO DESCRIPTION PROVIDED
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onRuleSourceEnabled
Fired when a known rule source has been enabled
Parameters:
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onRuleSourceDisabled
Fired when a known rule source has been disabled
Parameters:
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onRuleSourceRemoved
Fired when a known rule source has been removed
Parameters:
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onStateChanged
Fired when a group has been enabled/disabled or when an exception state has changed.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#onExceptionsChanged
Fired when the list of exceptions has changed.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- exception_list
ExceptionList
⚠ NO DESCRIPTION PROVIDED
#onUrlsBlocked
Fired when urls have been blocked by either the ad-blocker or the tracker-blocker. This is fired at most once per second.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- tab_ids
⚠ NO DESCRIPTION PROVIDED
Array
of:- integer
#onAdAttributionDomainChanged
Fires when the eTLD+s on which ad attribution is active changes or if the tab is navigated away from that domain.
Parameters:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
#onAdAttributionTrackersAllowed
Fired when trackers have been allowed on some tabs, as a result of ad attribution.
Parameters:
- tab_ids
⚠ NO DESCRIPTION PROVIDED
Array
of:- integer
Methods
#setRuleGroupEnabled
Changes whether a particular type of blocking is in effect.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- enabled
boolean
⚠ NO DESCRIPTION PROVIDED
#isRuleGroupEnabled
Checks whether a specific type of blocking is in effect.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#addKnownSourceFromURL
Adds an online rule source. Newly added sources are automatically enabled.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- url
string
⚠ NO DESCRIPTION PROVIDED
- source_settings
- (optional)
RuleSourceSettings
⚠ NO DESCRIPTION PROVIDED
#addKnownSourceFromFile
Adds an local rule source. Newly added sources are automatically enabled.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- file
string
⚠ NO DESCRIPTION PROVIDED
- source_settings
- (optional)
RuleSourceSettings
⚠ NO DESCRIPTION PROVIDED
#setKnownSourceSettings
Changes the settings used when parsing the rules
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
- source_settings
RuleSourceSettings
⚠ NO DESCRIPTION PROVIDED
#enableSource
Enables and loads a known rule source
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
#disableSource
Disables and unloads a known rule source
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
#fetchSourceNow
Forces fetching of a loaded rule source. Does nothing if a fetch is already in progress
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
#deleteKnownSource
Remove a known rule source. The source will be disabled before removal.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
#resetPresetSources
Re-adds all preset sources that were removed by the user.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#getRuleSource
Gets detailed information about a known rule source
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- source_id
integer
⚠ NO DESCRIPTION PROVIDED
#getRuleSources
Gets detailed information about all known rule sources. Loaded sources will have extra information.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#setActiveExceptionsList
Sets whether a rule group should use a list of exempted domains or a list of domains to which it applies.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- state
ExceptionList
⚠ NO DESCRIPTION PROVIDED
#getActiveExceptionsList
Checks whether a rule group is using a list of exempted domains or a list of domains to which it applies
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
#addExceptionForDomain
Adds an item to the exception list
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- exception_list
ExceptionList
⚠ NO DESCRIPTION PROVIDED
- domain
string
⚠ NO DESCRIPTION PROVIDED
#removeExceptionForDomain
Removes an item from the exception list
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- exception_list
ExceptionList
⚠ NO DESCRIPTION PROVIDED
- domain
string
⚠ NO DESCRIPTION PROVIDED
#removeAllExceptions
Removes all domains from the exception list
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- exception_list
ExceptionList
⚠ NO DESCRIPTION PROVIDED
#getExceptions
Retrieves all domains from the exeption list
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- exception_list
ExceptionList
⚠ NO DESCRIPTION PROVIDED
#getAllExceptionLists
Retrieves all the exception lists
#getBlockedUrlsInfo
Retrieves information about which URLs have been blocked from loading in a given tab
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- tab_ids
A list of tabs for which to retrieve blocked urls information.
Array
of:- integer
#getBlockedCounters
Retrieves the amount of requests blocked since the last time the counters got reset.
#clearBlockedCounters
Resets the counters used for getBlockedCounters
#isExemptOfFiltering
Returns whether a page URL will be exempt from filtering by a given rule group, based on the active exception list.
Parameters:
- rule_group
RuleGroup
⚠ NO DESCRIPTION PROVIDED
- url
string
⚠ NO DESCRIPTION PROVIDED
#getAdAttributionDomain
Gets the eTLD+1 for which ad attribution is currently active on the given tabs, if any.
Parameters:
- tab_ids
A list of tabs for which to retrieve the ad attribution stats.
Array
of:- integer
#getAdAttributionAllowedTrackers
Gets the allowed ad attribution trackers for the given tabs, if any.
Parameters:
- tab_ids
A list of tabs for which to retrieve allowed ad attribution trackers.
Array
of:- integer
contextMenu
Types
#Rect
Position and size of item that opens menu
Properties:
- x
number
Left position of item that opens menu, screen coordinates.
- y
number
Top position of item that opens menu, screen coordinates.
- width
number
Width of item that opens menu.
- height
number
Height of item that opens menu.
#Origin
ENUM
Menu location with respect to rectangle. With pointer the size and height is ignored.
- pointer
- topLeft
- bottomLeft
- topRight
- bottomRight
#ItemType
ENUM
What kind of item.
- command
- checkbox
- radio
- folder
#Icons
- Icons
Icons encoded as base64.
Array
of:- string
#ContainerMode
ENUM
Defines container layouts.
- inline
- folder
#ContainerContent
ENUM
Defines functionality to set up on the C++ side. One or more menu items may be created.
- extensions
- imageinprofile
- linkinprofile
- linktohighlight
- notes
- pwa
- linkinpwa
- sendlinktodevices
- sendpagetodevices
- sendimagetodevices
- spellcheck
- spellcheckoptions
- speech
#Item
One menu item.
Properties:
- name
string
Text in item.
- id
integer
The unique id of item.
- type
ItemType
The kind of menu element
- action
- (optional)
string
Action to execute. This is used for actions that needs to execute in C++. The value must be well defined
- radiogroup
- (optional)
integer
The radiobutton group this item belongs to.
- checked
- (optional)
boolean
true if the checkbox is checked, otherwise false. Only applies for type='checkbox'.
- enabled
- (optional)
boolean
true if the item is enabled.
- url
- (optional)
string
Url that can be used to determine a corresponding icon.
- shortcut
- (optional)
string
A shortcut displayed next to the name. No binding is added.
- showshortcut
- (optional)
boolean
Controls if a shortcut shall be shown. Needed for elements where shortcut is set up in C++ code
- persistent
- (optional)
boolean
If true the menu item will remain open after menu item is clicked with mouse.
- icons
- (optional)
Icons
Icon in PNG format encoded as base64.
#Container
Container to expand
Properties:
- id
integer
The unique id of item.
- name
string
Text in item when mode is folder
- content
ContainerContent
Specifies an element to expand in C++ to one or more elements. How it is expanded is implementation specific.
- mode
ContainerMode
Container content format
- icons
- (optional)
Icons
Icon in PNG format encoded as base64.
#Separator
One separator
Properties:
- label
- (optional)
string
Text in item.
#Element
One element in menu. All optional, but one and only one of 'item', 'separator' or 'container' should be set. 'children' is only considered when 'item' is set.
Properties:
- item
- (optional)
Item
⚠ NO DESCRIPTION PROVIDED
- container
- (optional)
Container
⚠ NO DESCRIPTION PROVIDED
- separator
- (optional)
Separator
⚠ NO DESCRIPTION PROVIDED
- children
- (optional)
Child menu items.
Array
of:- Element
#DocumentType
ENUM
The kind of document menu.
- page
- link
- image
- selection
#TextfieldType
ENUM
Defines the type of textfield
- addressfield
- searchfield
- regular
- document
#DocumentSupport
⚠ NO DESCRIPTION PROVIDED
Properties:
- copy
boolean
For elements outside editor
- audio
boolean
⚠ NO DESCRIPTION PROVIDED
- canvas
boolean
⚠ NO DESCRIPTION PROVIDED
- editoptions
boolean
⚠ NO DESCRIPTION PROVIDED
- emoji
boolean
⚠ NO DESCRIPTION PROVIDED
- extensions
boolean
⚠ NO DESCRIPTION PROVIDED
- highlight
boolean
⚠ NO DESCRIPTION PROVIDED
- pictureinpicture
boolean
⚠ NO DESCRIPTION PROVIDED
- password
boolean
⚠ NO DESCRIPTION PROVIDED
- passwordgeneration
boolean
⚠ NO DESCRIPTION PROVIDED
- passwordshowall
boolean
⚠ NO DESCRIPTION PROVIDED
- paste
boolean
⚠ NO DESCRIPTION PROVIDED
- plugin
boolean
⚠ NO DESCRIPTION PROVIDED
- qrcode
boolean
⚠ NO DESCRIPTION PROVIDED
- sendtodevices
boolean
⚠ NO DESCRIPTION PROVIDED
- video
boolean
⚠ NO DESCRIPTION PROVIDED
#DocumentArea
⚠ NO DESCRIPTION PROVIDED
Properties:
- devtools
boolean
⚠ NO DESCRIPTION PROVIDED
- editor
boolean
⚠ NO DESCRIPTION PROVIDED
- image
boolean
⚠ NO DESCRIPTION PROVIDED
- frame
boolean
⚠ NO DESCRIPTION PROVIDED
- webpanel
boolean
⚠ NO DESCRIPTION PROVIDED
#DocumentParams
Properties of the document that requests a menu
Properties:
- linkurl
string
⚠ NO DESCRIPTION PROVIDED
- linktitle
string
⚠ NO DESCRIPTION PROVIDED
- pageurl
string
⚠ NO DESCRIPTION PROVIDED
- pagetitle
string
⚠ NO DESCRIPTION PROVIDED
- srcurl
string
⚠ NO DESCRIPTION PROVIDED
- selection
string
⚠ NO DESCRIPTION PROVIDED
- printableselection
string
⚠ NO DESCRIPTION PROVIDED
- selectionurl
string
⚠ NO DESCRIPTION PROVIDED
- keywordurl
string
⚠ NO DESCRIPTION PROVIDED
- isdevtools
boolean
⚠ NO DESCRIPTION PROVIDED
- iseditable
boolean
⚠ NO DESCRIPTION PROVIDED
- isimage
boolean
⚠ NO DESCRIPTION PROVIDED
- isframe
boolean
⚠ NO DESCRIPTION PROVIDED
- ismailcontent
boolean
⚠ NO DESCRIPTION PROVIDED
- iswebpanel
boolean
⚠ NO DESCRIPTION PROVIDED
- ismailto
boolean
⚠ NO DESCRIPTION PROVIDED
- iswebpagewidget
boolean
⚠ NO DESCRIPTION PROVIDED
- support
DocumentSupport
⚠ NO DESCRIPTION PROVIDED
- textfield
- (optional)
TextfieldType
⚠ 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
#onDocumentMenu
Fires when a document menu is requested.
Parameters:
- window
integer
id of window where command occurred.
- document
integer
id of the document requesting this menu.
- state
DocumentParams
Document data for the given type of menu.
Methods
#show
Shows a new context menu.
Parameters:
- properties
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- children
⚠ NO DESCRIPTION PROVIDED
Array
of:- Element
- documentId
integer
⚠ NO DESCRIPTION PROVIDED
- icons
Icons
Default and folder icons.
- forceViews
boolean
⚠ NO DESCRIPTION PROVIDED
- origin
Origin
⚠ NO DESCRIPTION PROVIDED
- rect
Rect
⚠ NO DESCRIPTION PROVIDED
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
devtoolsPrivate
Types
#DevtoolResizingStrategy
Object containing size and state for the inspected web contents. The devtools itself always uses the full size.
Properties:
- inspectedLeft
integer
Left coordinate of inspected web contents.
- inspectedTop
integer
Top coordinate of inspected web contents.
- inspectedWidth
integer
Width of inspected web contents.
- inspectedHeight
integer
Height of inspected web contents.
- hideInspectedContents
boolean
false to hide the inspected contents, otherwise true.
#DevtoolsWindowParams
Object containing size and state for the undocked devtools window.
Properties:
- left
integer
Left coordinate of window.
- top
integer
Top coordinate of window.
- right
integer
Right coordinate of window.
- bottom
integer
Bottom coordinate of window.
- maximized
boolean
Should window be maximized.
- alwaysOnTop
boolean
Should window be always on top.
#PanelType
ENUM
Whether to open the the element panel (inspect mode), console panel, or the default.
- console: Open devtool with the Console panel selected
- inspect: Open devtools with the Elements panel selected
- default: Open devtools with the default panel selected
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
#onDockingStateChanged
Fired when devtools changed its docking state.
Parameters:
- tabId
integer
The tab id of the tab changing its devtools docking state.
- dockingState
string
The new devtools docking state. Possible values are right, bottom or undocked.
#onDockingSizesChanged
Fired when devtools changed its sizes. Use |getDockingStateSizes| to read the new sizes.
Parameters:
- tabId
integer
The tab id of the tab changing its devtools docking state.
#onClosed
Fired when docked devtools closed.
Parameters:
- tabId
integer
The tab id of the tab changing its devtools docking state.
#onDevtoolsUndocked
Fired when devtools wants to undock and we might need to open a window for it.
Parameters:
- tabId
integer
The tab id of the tab we are debugging.
- showWindow
boolean
Show the initial window. May be false in which case the user likely just re-selected inspect on an existing web page.
- params
DevtoolsWindowParams
⚠ NO DESCRIPTION PROVIDED
#onActivateWindow
Fired when devtools wants to activate the given undocked devtools window.
Parameters:
- tabId
integer
The tab id of the tab we are debugging.
Methods
#getDockingStateSizes
Used to request the size and state of the inspected webview.
Parameters:
- tabId
integer
The tab id of the tab changing its devtools docking state.
#closeDevtools
Explicitly close the open devtools instance for the given tabId or windowId.
Parameters:
- tabId
integer
The tab id of the tab to close devtools for.
- windowId
- (optional)
integer
The window id (not app window id) of the window to close all open devtools for.
#toggleDevtools
Toggle developer tools.
Parameters:
- windowId
integer
The window id for the browserwindow we want to toggle devtools for.
- panelType
PanelType
⚠ NO DESCRIPTION PROVIDED
editcommand
Methods
#execute
⚠ NO DESCRIPTION PROVIDED
Parameters:
- command
string
The command to be executed.
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
historyPrivate
Types
#TransitionType
ENUM
The transition type for this visit from its referrer.
- link
- typed
- auto_bookmark
- auto_subframe
- manual_subframe
- generated
- auto_toplevel
- form_submit
- reload
- keyword
- keyword_generated
#TypedHistoryItem
An object containing informations of one typed history entry
Properties:
- url
string
The URL navigated to by a user.
- title
string
The title of the page when it was last loaded.
- terms
string
The terms that the user searched for.
- visitCount
integer
The number of times the user has navigated to this page.
#DetailedHistoryItem
An object encapsulating one result of a top url history query.
Properties:
- id
string
The unique identifier for the item.
- url
string
The URL navigated to by a user.
- title
string
The title of the page when it was last loaded.
- lastVisitTime
- (optional)
number
When this page was last loaded, represented in milliseconds since the epoch.
- visitCount
integer
The number of times the user has navigated to this page.
- typedCount
- (optional)
integer
The number of times the user has navigated to this page by typing in the address.
- isBookmarked
boolean
States if the URL is bookmarked.
- score
integer
The relavancy score given to the URL.
#HistoryPrivateItem
An object encapsulating one result of a history query. Properties marked with 'Used for statistics' can be removed if we make a new API function for stats.
Properties:
- id
string
The unique identifier for the item.
- url
string
The URL navigated to by a user.
- address
string
Used for statistics. The address of the page navigated to by a user.
- title
string
The title of the page when it was last loaded.
- visitTime
number
When this page was visited, represented in milliseconds since the epoch.
- transitionType
TransitionType
Used for statistics. The transition type for this visit from its referrer.
- dateKey
string
Date string of the visit. Format: YYYY-MM-DD
#TopUrlItem
An object encapsulating one result of a top url history query.
Properties:
- date
string
The date of the visit for the top url
- url
string
The url visited
- numberOfVisit
- (optional)
integer
The visit count of the url.
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
#onVisitModified
Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history.
Parameters:
- modified
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- urls
- (optional)
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
Methods
#deleteVisits
Deletes all visits of the given URL for a certain period.
Parameters:
- details
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- url
string
The URL to remove.
- time
number
The visit time of the item to remove, represented in milliseconds since the epoch. IMPORTANT: This must be the exact visit time, to the microsecond. If it is truncated, then the deletion will not be synced.
#getTopUrlsPerDay
Retrives top url per day. Sorted by number of visits within the day
Parameters:
- maxTopUrlResults
number
The number of top urls to return per day.
#visitSearch
Retrives all visits. Sorted by visit time descending.
Parameters:
- query
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- startTime
- (optional)
number
Limit results to those visited after this date, represented in milliseconds since the epoch. If not specified, this defaults to 24 hours in the past.
- endTime
- (optional)
number
Limit results to those visited before this date, represented in milliseconds since the epoch.
#getTypedHistory
Retrieves a list of items used to populate the typed URL results of the address bar
Parameters:
- query
string
A piece of text that the results should contain
- maxResults
integer
The maximum number of items to return
#getDetailedHistory
Parameters:
- query
string
A piece of text that the results should contain
- maxResults
integer
The maximum number of items to return
#updateTopSites
Requests an update for top sites
importData
Types
#import_types
ENUM
⚠ NO DESCRIPTION PROVIDED
- internet_explorer
- firefox
- safari
- bookmarks_file
- opera
- chrome
- chromium
- vivaldi
- yandex
- opera_opium_beta
- opera_opium_dev
- brave
- edge
- edge_chromium
- thunderbird
- opera_opium
- arc
- opera_gx
- unknown
#UserProfileItem
UserProfileItem. Contains info for userprofile
Properties:
- profileDisplayName
string
The profile display name.
- profileName
string
The profile name.
- profilePath
- (optional)
string
The profile path, if it is different than parent profile.
- index
- (optional)
integer
The user profile index, if it is different than parent profile.
#ProfileItem
ProfileItem.
Properties:
- import_type
import_types
The type of import profile item
- name
string
Import item name.
- index
integer
The profile item index.
- history
boolean
Does profile support history.
- favorites
boolean
Does profile support favorites.
- passwords
boolean
Does profile support passwords.
- supportsMasterPassword
boolean
Does profile support a master password to decode passwords.
- speeddial
boolean
Does profile support Speed Dial.
- notes
boolean
Does profile support notes.
boolean
Does profile support email.
- contacts
boolean
Does profile support contacts.
- extensions
boolean
Does profile support extensions import.
- hasDefaultInstall
boolean
Is a default installation detected.
- detectedProfilePath
string
Is the path on disk to the detected profile.
- requiresInteractiveImport
boolean
Does the profile require interactive (file/directory picker dialog) selection by the user.
- requiresAccessPermission
boolean
Does the profile require explicit access permission to the profile folder/file.
- suggestedProfilePath
string
Suggested default profile path for profile selection dialog.
- dialogType
string
What type of dialog should be used for interactive import. Possible values are 'file' or 'folder'.
- mailPath
string
The path on disk to the detected mail profile
- UserProfiles
⚠ NO DESCRIPTION PROVIDED
Array
of:- UserProfileItem
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
#onImportStarted
Fired when a import session has started.
#onImportEnded
Fired when a import session has ended.
Parameters:
- error_count
integer
Number of data types that failed to import.
#onImportItemStarted
Fired when a import session for a data type has started.
Parameters:
- item
string
Name of data type.
#onImportItemEnded
Fired when a import session for a data type has ended.
Parameters:
- item
string
Name of data type.
#onImportItemFailed
Fired when a import session for a data type has failed.
Parameters:
- item
string
Name of data type.
- error
string
Error message that can be shown to the user.
Methods
#getProfiles
Retrieves import data profiles.
#startImport
Start import process.
Parameters:
- profileIndex
integer
Index of the profile we want to import. This is a null based index of results from getProfiles.
- askUserForFileLocation
boolean
Show file dialog to user.
- profileName
string
Name of profile.
- typesToImport
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- history
boolean
⚠ NO DESCRIPTION PROVIDED
- favorites
boolean
⚠ NO DESCRIPTION PROVIDED
- passwords
boolean
⚠ NO DESCRIPTION PROVIDED
- speeddial
boolean
⚠ NO DESCRIPTION PROVIDED
- notes
boolean
⚠ NO DESCRIPTION PROVIDED
- extensions
boolean
⚠ NO DESCRIPTION PROVIDED
- masterPassword
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- importPath
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
#openThunderbirdMailbox
Opens Thunderbird mailbox from disk and seek to seekPosition. If called with already opened file it only seeks to seekPosition. If called with a new path it closes the current file and opens the new one.
Parameters:
- path
string
Path to mailbox.
- seekPosition
- (optional)
string
Seek to this position after opening, serialized as a string because V8's integer type is too small for large mbox files.
#closeThunderbirdMailbox
Closes currently open thunderbird mailbox, if any
#readMessageFromThunderbirdMailbox
Read one message from currently open Thunderbird mailbox.
infobars
Types
#ButtonAction
ENUM
⚠ NO DESCRIPTION PROVIDED
- accept
- cancel
- link
- dismiss
#InfobarButton
Button to be shown in the infobar.
Properties:
- text
string
Text to be shown in the button.
- action
ButtonAction
The action to be performed when clicking this button.
- prominent
boolean
This is the prominent button and should receive styling accordingly.
#Infobar
Object passed to the onInfobarCreated event.
Properties:
- tabId
integer
The tabId this infobar is associated with.
- identifier
integer
The identifier used to identify this infobar. It is only unique in combination with |tabId|.
- messageText
string
The message text to be shown in the infobar.
- buttons
⚠ NO DESCRIPTION PROVIDED
Array
of:- InfobarButton
- linkText
string
The text associated with a link to be shown in the infobar.
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
#onInfobarCreated
Fired when a infobar has been created and should be shown.
Parameters:
- params
Infobar
Information about the infobar.
#onInfobarRemoved
Fired when a infobar has been removed and should no longer be visible.
Parameters:
- tabId
integer
The tabId this infobar is associated with.
- identifier
integer
The identifier used to identify this infobar. It is only unique in combination with |tabId|.
Methods
#sendButtonAction
Send the action defined on the clicked button.
Parameters:
- tabId
integer
The tabId this infobar is associated with.
- identifier
integer
The identifier used to identify this infobar. It is only unique in combination with |tabId|.
- action
string
The click action for this button. This must be the same as defined in the |InfoBarButton| type for this button.
mailPrivate
Types
#message
Message object. Used to create message in full text database table.
Properties:
- searchListId
integer
⚠ NO DESCRIPTION PROVIDED
- subject
string
The message subject.
- body
string
The message body.
- to
string
The message to address .
- cc
string
The message cc address .
- from
string
The message from address .
- replyTo
string
The message reply address .
#migration
Migration object. Returns search db version and if migration of search db is needed.
Properties:
- dbVersion
integer
The mail search db version.
- migrationNeeded
boolean
If database migration is needed.
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
#onUpgradeProgress
Reports import progress.
Parameters:
- progress
integer
Number of rows upgraded.
- total
integer
Total number of rows to be upgraded.
- msg
string
Message to be printed out.
#onDeleteMessagesProgress
Reports progress when deleting messages.
Parameters:
- delete_progress_count
integer
Number of messages deleted.
Methods
#getFilePaths
Returns array of file paths under a given directory.
Parameters:
- path
string
The root folder from where to build up the file paths.
#getFullPath
Given a file entry, return full path of the file
Parameters:
- filesystem
string
The file entry to be looked up
- path
string
The path
#getMailFilePaths
Returns array of file paths under the default profile /Mail directory.
#writeTextToMessageFile
Saves a mail to disk. The root folder location is the profile directory of the current running instance /Mail
Parameters:
- paths
String array that is used to create a folder structure, starting at user default profile /Mail The function returns error if empty
Array
of:- string
- fileName
string
The file name to be created/saved/overridden.
- raw
string
The raw mail content.
- append
- (optional)
boolean
Whether to append to file instead of write.
#writeBufferToMessageFile
Saves a mail to disk. The root folder location is the profile directory of the current running instance /Mail
Parameters:
- paths
String array that is used to create a folder structure, starting at user default profile /Mail The function returns error if empty
Array
of:- string
- fileName
string
The file name to be created/saved/overridden.
- raw
binary
The raw mail content as arrayBuffer
- append
- (optional)
boolean
Whether to append to file instead of write.
#deleteMessageFile
Deletes a file. The root folder location is the profile directory of the current running instance /Mail
Parameters:
- paths
String array that is used to build path to the file. Starting at user default profile/Mail.
Array
of:- string
- fileName
string
The file name to be deleted. With ending.
#renameMessageFile
Renames a file. The root folder location is the profile directory of the current running instance /Mail
Parameters:
- paths
String array that is used to build path to the file. Starting at user default profile/Mail.
Array
of:- string
- fileName
string
The file name to be renamed.
- newFileName
string
The new name for the file.
#readFileToBuffer
Reads the contents of a file. Returns the content as arrayBuffer
Parameters:
- fileName
string
Absoloute path to the file to be read.
#readMessageFileToBuffer
Reads a mail. The root folder location is the profile directory of the current running instance /Mail
Parameters:
- paths
String array that is used to build path to the file. Starting at user default profile/Mail.
Array
of:- string
- fileName
string
The file name to be read.
#messageFileExists
Check if file exists.Returns true if the file exists.
Parameters:
- paths
String array that is used to build path to the file. Starting at user default profile/Mail.
Array
of:- string
- fileName
string
The file name to be checked.
#readFileToText
Reads a file. Returns the file content as text.
Parameters:
- path
string
Absoulout path to the file to be read.
#getFileDirectory
Returns the user mail data directory and verfies that the directory exists.
Parameters:
- hashedAccountId
string
First 6 characters from the MD5 hash of the accountId. Appended to the end of the default mail data directory
#createFileDirectory
Creates the user mail data directory.
Parameters:
- hashedAccountId
string
First 6 characters from the MD5 hash of the accountId. Appended to the end of the default mail data directory
#createMessages
Creates messages for full text search.
Parameters:
- messages
⚠ NO DESCRIPTION PROVIDED
Array
of:- message
#deleteMessages
Deletes messages from full text search.
Parameters:
- messages
⚠ NO DESCRIPTION PROVIDED
Array
of:- integer
#updateMessage
Updates a message. All properties needs to be specified both new and previous ones.
Parameters:
- message
message
⚠ NO DESCRIPTION PROVIDED
#searchMessages
Searches messages with certain query.
Parameters:
- searchValue
string
The value to search for
#matchMessage
Does search value match certain message.
Parameters:
- searchListId
integer
The searchListId of the message to be checked.
- searchValue
string
The value to search for
#getDBVersion
Returns SQLite database version for MailDB.
#startMigration
Migrates the full text database index to contentless. Track progress in the listener: onUpgradeProgress. This can be slow.
#deleteMailSearchDB
Deletes MailSearchDB and MaildSearchDB-journal file. Re-creates the files afterwards. This action cannot be reverted.
menubar
Types
#Mode
ENUM
What part menubar to manipulate
- all
- update
- tabs
#Edge
ENUM
Defines position of menu items added in chrome code wrt container items.
- above
- below
- off
#ItemType
ENUM
What kind of item.
- command
- checkbox
- radio
- folder
- container
- separator
#MenuItem
One menu item.
Properties:
- name
string
Text in item.
- action
string
Action to execute.
- id
integer
The unique id of item.
- items
- (optional)
Child menu items.
Array
of:- MenuItem
- visible
- (optional)
boolean
Whether this menu item is visible or not. Defaults to true.
- type
- (optional)
ItemType
'normal' or 'checkbox'. Defaults to 'normal'.
- checked
- (optional)
boolean
true if the checkbox is checked, otherwise false. Only applies for type='checkbox'.
- enabled
- (optional)
boolean
false if the item should appear as grayed out. Assumed true if not set.
- withNoWindow
boolean
true if the item should remain normal when no windows are open. If false the item will be grayed out.
- emphasized
- (optional)
boolean
true if the item should appear in an emphasized style (typically bold).
- shortcut
- (optional)
string
String which illustrates a shortcut. The presence of a string will not execute menu action.
- url
- (optional)
string
Url that can be used to determine a corresponding icon.
- parameter
- (optional)
string
Parameter to command. Sent back unaltered.
- index
- (optional)
integer
Index in menu list. Can only be used insert into an existing list.
- edge
- (optional)
Edge
Where to place extra menu items
- icon
- (optional)
string
Icon in PNG format encoded as base64.
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
#onActivated
Fired when a main menu item is activated.
Parameters:
- window
integer
id of window where command occurred.
- action
string
Action to execute.
- parameter
string
Free format parameter to 'command'. Can be empty.
Methods
#getHasWindows
Returns true if there is one or more windows present in any profile.
#setup
Setup application's main menu.
Parameters:
- items
Menu items with string label.
Array
of:- MenuItem
menubarMenu
Types
#ContainerType
ENUM
Defines content of a container.
- bookmarks
- history
#SortOrder
ENUM
Defines how to sort container items.
- ascending
- descending
#SortField
ENUM
Defines what element to use as sort key.
- title
- url
- nickname
- description
- dateAdded
#Edge
ENUM
Defines position of menu items added in chrome code wrt container items.
- above
- below
- off
#ItemType
ENUM
What kind of item.
- command
- checkbox
- radio
- folder
#Rect
Position and size of element in menu bar.
Properties:
- x
integer
Left position of item that opens menu, screen coordinates.
- y
integer
Top position of item that opens menu, screen coordinates.
- width
integer
Width of item that opens menu.
- height
integer
Height of item that opens menu.
#Icons
- Icons
Icons encoded as base64.
Array
of:- string
#Item
One menu item.
Properties:
- id
integer
The unique id of item.
- name
string
Text in item.
- type
ItemType
Defaults to 'normal'.
- selected
- (optional)
boolean
Whether item is initially selected. Default to false.
- enabled
- (optional)
boolean
Whether item is enabled or not (grayed out) . Defaults to true.
- visible
- (optional)
boolean
Whether item is visible or not. Defaults to true.
- checked
- (optional)
boolean
true if the checkbox is checked. Ignored unless type is 'checkbox' or 'radiobutton'.
- radiogroup
- (optional)
integer
The radiobutton group this item belongs to. Must be present for a radio button.
- persistent
- (optional)
boolean
If true the menu item will remain open after menu item is clicked with mouse.
- shortcut
- (optional)
string
Shortcut to be displayed next to label.
- url
- (optional)
string
Url that can be used to determine a corresponding icon.
- icons
- (optional)
Icons
Icons for light and dark menus. There must be two icons and the last shall be for menus with a dark background.
#Separator
One separator
Properties:
- label
- (optional)
string
Text in item.
#Container
A collection of items set up and expanded from chrome.
Properties:
- id
string
Parent id of data to display.
- type
ContainerType
What kind of data to expand in this container.
- offset
integer
Offset into folder/parent data.
- groupFolders
boolean
If sorted, this flag will group any subfolders together.
- edge
Edge
Where to place extra menu items
- sortField
- (optional)
SortField
Sort key for elements.
- sortOrder
- (optional)
SortOrder
Sort order for elements.
#Element
One element in menu. All optional, but one and only one of 'item', 'separator' or 'container' should be set. 'children' is only considered when 'item' is set.
Properties:
- item
- (optional)
Item
⚠ NO DESCRIPTION PROVIDED
- separator
- (optional)
Separator
⚠ NO DESCRIPTION PROVIDED
- container
- (optional)
Container
⚠ NO DESCRIPTION PROVIDED
- children
- (optional)
Child menu items.
Array
of:- Element
#Menu
One menu with origin rect and a list if children.
Properties:
- id
integer
⚠ NO DESCRIPTION PROVIDED
- rect
Rect
⚠ NO DESCRIPTION PROVIDED
- children
⚠ NO DESCRIPTION PROVIDED
Array
of:- Element
#EventState
Describes keyboard modifiers and mouse button state.
Properties:
- ctrl
boolean
true if the Ctrl key is pressed when activating the menu.
- shift
boolean
true if the Shift key is pressed when activating the menu.
- alt
boolean
true if the Alt key is pressed when activating the menu.
- command
boolean
true if the Command key (Mac) is pressed when activating the menu.
- left
boolean
true if the left mouse button activated the menu.
- right
boolean
true if the right mouse button activated the menu.
- center
boolean
true if the center mouse button activated the menu.
#Disposition
ENUM
Defines where a bookmark should be opened.
- setting
- current
- new-tab
- new-window
- new-private-window
#BookmarkCommand
ENUM
Defines a non-navigation bookmark action.
- edit
- addactivetab
- addfolder
- addbookmark
- addseparator
- cut
- copy
- paste
#BookmarkAction
Passed with bookmark activation
Properties:
- id
string
⚠ NO DESCRIPTION PROVIDED
- command
BookmarkCommand
If set, disposition and background is ignored.
- disposition
Disposition
⚠ NO DESCRIPTION PROVIDED
- background
boolean
Extends disposition with a background option.
- state
EventState
⚠ NO DESCRIPTION PROVIDED
#Action
Passed with menu activation.
Properties:
- id
integer
Command id.
- state
EventState
⚠ 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
#onOpen
Fires before menu opens.
Parameters:
- id
integer
Menu id of the menu that opens.
#onClose
Fires before menu closes.
#onAction
Fired when menu item is activated.
Parameters:
- action
Action
What action to execute.
#onOpenBookmark
Fired when bookmark menu item is activated.
Parameters:
- windowId
integer
Window where action occurs.
- action
BookmarkAction
⚠ NO DESCRIPTION PROVIDED
#onBookmarkAction
Fired when bookmark command is activated.
Parameters:
- windowId
integer
Window where action occurs.
- action
BookmarkAction
⚠ NO DESCRIPTION PROVIDED
#onHover
Fired when a menu item with a url is highlighted.
Parameters:
- windowId
integer
Window where hover occurs.
- url
string
Url in menu item.
#onError
Fired if an error condtion occurs that can not be routed with a callback.
Parameters:
- text
string
Error message for logging purposes.
Methods
#show
Shows a context menu.
Parameters:
- properties
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- id
integer
Id of the menu in the 'siblings' list to open.
- siblings
List of menu entries.
Array
of:- Menu
- icons
Icons
Default and folder icons.
#getMaxId
Returns the maximium id (elements) a menu can use.
menuContent
Types
#NodeType
ENUM
Defines supported nodes
- menu
- command
- checkbox
- radio
- folder
- separator
- container
#Role
ENUM
Defines menu type.
- horizontal
- vertical
- mac
- context
#ContainerMode
ENUM
Defines container layouts.
- inline
- folder
#ContainerEdge
ENUM
Defines on what edge of a container additional items can be added.
- above
- below
- off
#MenuTreeNode
A node (folder or menu entry) in the menu tree. Child nodes are ordered within their parent folder.
Properties:
- id
string
Unique identifier.
- type
NodeType
The kind of node.
- action
string
A command or a menu identifier. It does not have to be unique. Can be empty for separators.
- custom
- (optional)
boolean
When true, the item has been added by the user.
- title
- (optional)
string
Node title. If not present the title is determined using the action.
- showshortcut
- (optional)
boolean
Show shortcut string.
- radiogroup
- (optional)
string
Mandatory for radio elements.
- containermode
- (optional)
ContainerMode
Mandatory for container elements.
- containeredge
- (optional)
ContainerEdge
Mandatory for container elements.
- parameter
- (optional)
string
Free form parameter. Format varies with action.
- children
- (optional)
An ordered list of children of this node.
Array
of:- MenuTreeNode
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
#onChanged
Fires when the content of a menu has changed.
Parameters:
- menu
string
Menu resource name.
- id
string
Unique identifier for menu.
- role
Role
Describes the role of menu.
- selectId
string
If non-negative this id can be used to set selected element.
- items
⚠ NO DESCRIPTION PROVIDED
Array
of:- MenuTreeNode
Methods
#get
Retrieves content of a menu.
Parameters:
- menu
string
Menu resource name.
#move
Moves one or more items within a menu.
Parameters:
- menu
string
Menu resource name.
- ids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
- parentId
string
⚠ NO DESCRIPTION PROVIDED
- index
integer
⚠ NO DESCRIPTION PROVIDED
#create
Add one or more items within a menu.
Parameters:
- menu
string
Menu resource name.
- parentId
string
⚠ NO DESCRIPTION PROVIDED
- index
integer
Where to add elements. A negative value means at end.
- items
⚠ NO DESCRIPTION PROVIDED
Array
of:- MenuTreeNode
#remove
Deletes one or more items within a menu.
Parameters:
- menu
string
Menu resource name.
- ids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#removeAction
Deletes one or more actions from all models
Parameters:
- actions
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#update
Updates the properties of a node.
Parameters:
- menu
string
Menu resource name.
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- title
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- parameter
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- showshortcut
- (optional)
boolean
⚠ NO DESCRIPTION PROVIDED
- containerMode
- (optional)
ContainerMode
⚠ NO DESCRIPTION PROVIDED
- containerEdge
- (optional)
ContainerEdge
⚠ NO DESCRIPTION PROVIDED
#reset
Restores default content within a menu or in a submenu of that menu.
Parameters:
- menu
string
Menu resource name.
- isContext
boolean
⚠ NO DESCRIPTION PROVIDED
- ids
- (optional)
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
mousegestures
notes
Types
#NodeType
ENUM
The kind of the node.
- note: A regular note. May have attachments as children.
- separator: A separator
- attachment: An attachment. Content is the attachment checksum.
- folder: A folder. May have notes and separators as children.
- main: The main notes folder.
- other: The other notes folder.
- trash: The trash.
#NoteTreeNode
A node (either a note-entry or a folder) in the notes tree. Child nodes are ordered within their parent folder.
Properties:
- id
string
The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
- parentId
- (optional)
string
The
id
of the parent folder. Omitted for the root node. - index
- (optional)
integer
The 0-based position of this node within its parent folder. Omitted for the root node.
- title
string
Title/subject of note.
- content
- (optional)
string
The content of the note. Omitted for separators and folders. For attachments, this contains the attachment checksum.
- url
- (optional)
string
A URL associated with the note. Omitted for separators and folders.
- dateAdded
- (optional)
number
When this node was created, in milliseconds since the epoch (
new Date(dateAdded)
). - dateModified
- (optional)
number
When this node was last modified, in milliseconds since the epoch (
new Date(dateModified)
). - children
- (optional)
An ordered list of children of this node. Only present for folders
Array
of:- NoteTreeNode
- type
NodeType
Which kind of node this is.
#CreateDetails
Object passed to the create() function.
Properties:
- parentId
- (optional)
string
Defaults to the root folder.
- index
- (optional)
integer
⚠ NO DESCRIPTION PROVIDED
- type
NodeType
⚠ NO DESCRIPTION PROVIDED
- title
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- url
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- content
- (optional)
string
The content of the node. For attachments, this is either a known attachment checksum copied from another attachment or a new base64-encoded attachment content
- date
- (optional)
number
A timestamp of the node's creation.
- lastmod
- (optional)
number
A timestamp of the node's last modification date.
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
#onCreated
Fired when a bookmark or folder is created.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- note
NoteTreeNode
⚠ NO DESCRIPTION PROVIDED
#onRemoved
Fired when a note or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- removeInfo
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- parentId
string
⚠ NO DESCRIPTION PROVIDED
- index
integer
⚠ NO DESCRIPTION PROVIDED
#onChanged
Fired when a note or folder changes.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- noteAfterChange
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- title
string
⚠ NO DESCRIPTION PROVIDED
- content
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- url
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- dateModified
- (optional)
number
⚠ NO DESCRIPTION PROVIDED
#onMoved
Fired when a note or folder is moved.
Parameters:
- id
string
The id of the moved note
- moveInfo
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- parentId
string
The id of the parent folder
- index
integer
The index inside the parent folder
- oldParentId
string
Previous parent id
- oldIndex
integer
Previous index inside the parent folder
#onImportBegan
Fired when a notes import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.
#onImportEnded
Fired when a notes import session is ended.
Methods
#get
Retrieves the specified NoteTreeNode(s).
Parameters:
- idOrIdList (overloaded)
string
⚠ NO DESCRIPTION PROVIDED
- idOrIdList (overloaded)
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
- int64Minimum items: 1
#getTree
Retrieves the entire Notes hierarchy.
#create
Creates a bookmark or folder under the specified parentId.
Parameters:
- note
CreateDetails
⚠ NO DESCRIPTION PROVIDED
#update
Updates the properties of a note or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- changes
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- title
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- content
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- url
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
#remove
Removes a note or an empty folder.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#search
Parameters:
- query
string
A string of words matched agains note contents.
#move
Moves the specified node to the provided location.
Parameters:
- id
string
The id to be moved
- destination
object
Object describing the target location
Object Properties:
- parentId
- (optional)
string
Id of target folder
- index
- (optional)
integer
The index inside the target folder
#emptyTrash
Empty the notes trash folder.
#beginImport
Signal that import has been started.
#endImport
Signal that import has been finished.
pageActions
Types
#ScriptOverride
ENUM
Whether a script should be always enabled or disabled.
- no_override
- enabled
- disabled
#OverridenScript
Used to report that a script is always enabled or disabled
Properties:
- script
string
⚠ NO DESCRIPTION PROVIDED
- override
ScriptOverride
⚠ 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
#onScriptsChanged
Fired when new scripts have been found in a page action directory or when some scripts were modified or deleted
#onOverridesChanged
Fired when something (usually a call to setScriptOverrideForTab) caused script overrides to change
Parameters:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
Methods
#getScripts
Returns the full path to all known page action scripts.
#setScriptOverrideForTab
Permanently enables or disables a script for a given tab, or cancels the override
Parameters:
- script
string
⚠ NO DESCRIPTION PROVIDED
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
- override
ScriptOverride
⚠ NO DESCRIPTION PROVIDED
#getScriptOverridesForTab
Get which scripts have been permanently enabled or disabled for a given tab
Parameters:
- tab_id
integer
⚠ NO DESCRIPTION PROVIDED
pipPrivate
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
#onVideoElementCreated
Fired when a video element has been created.
Parameters:
- tabId
integer
Tab id for the video element created event.
prefs
Types
#PreferenceValue
Preference with its new desired value.
Properties:
- path
string
The preference path
- value
- (optional)
any
Preference value. None indicate to use the default.
#TranslateLanguageSettings
Current settings active for the given language pair or just the source language.
Properties:
- isLanguagePairOnAlwaysTranslateList
boolean
Is the given language pair on the always translate list.
- isLanguageInNeverTranslateList
boolean
Is the given language source language on the never translate list.
- isSiteOnNeverTranslateList
boolean
Is the given site on the never translate list.
- shouldShowAlwaysTranslateShortcut
boolean
Should show always translate shortcut for this language.
- shouldShowNeverTranslateShortcut
boolean
Should show never translate shortcut for this language.
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
#onChanged
Fired when a preference value has changed.
Parameters:
- newValue
PreferenceValue
Information about the changed preference.
Methods
#get
Get a specific named preference value.
Parameters:
- path
string
The preference path
#set
Set a specific preference.
Parameters:
- newValue
PreferenceValue
⚠ NO DESCRIPTION PROVIDED
#getForCache
Get all preferences to be cached on the JS side with one call. Only changes to these will be reported by onChanged. The result type is optimized for bulk transfer of over 450 values
Parameters:
- paths
Which preferences are needed
Array
of:- string
#setLanguagePairToAlwaysTranslate
Translate: Add or remove a pair of languages to the preference for automatic translation.
Parameters:
- tabId
integer
The tab id used to look up the translate manager stored in the WebContents data. Not used for anything else.
- enable
boolean
true to add the language pair to the list, false to remove it from the list.
- original_language
string
Original language to translate from.
- target_language
string
Target language to translate to.
#setLanguageToNeverTranslate
Translate: Add or remove a pair of languages to the preference for never doing automatic translation.
Parameters:
- tabId
integer
The tab id used to look up the translate manager stored in the WebContents data. Not used for anything else.
- block
boolean
true to add the language to the blocked list, false to remove it from the list.
- original_language
string
Original language to never translate from.
- target_language
string
Target language to never translate to.
#setSiteToNeverTranslate
Translate: Add or remove a site to the preference for never doing automatic translation.
Parameters:
- tabId
integer
The tab id used to look up the translate manager stored in the WebContents data and the site to block.
- block
boolean
true to add the language to the blocked list, false to remove it from the list.
- original_language
string
Original language to never translate from.
- target_language
string
Target language to never translate to.
#getTranslateSettings
Translate: Get settings for the given language pair.
Parameters:
- tabId
integer
The tab id used to look up the translate manager stored in the WebContents data. Not used for anything else.
- original_language
string
Original language to never translate from.
- target_language
string
Target language to never translate to.
#setTranslationDeclined
Translate: Translation dialog was closed without being used, record that fact.
Parameters:
- tabId
integer
The tab id used to look up the translate manager stored in the WebContents data. Not used for anything else.
- explicitly_closed
boolean
true if the dialog was closed explicitly (from close button), otherwise false if it was closed from clicking outside it or similar.
- original_language
string
Original language of the page.
- target_language
string
Target language selected.
#resetTranslationPrefs
Translate: Resets the translation preferences to defaults.
- api['name']
- ⚠ WARNING! Failed to get info as type not provided
readingListPrivate
Types
#ReadingListEntry
Object passed to the update and returned in the get function.
Properties:
- url
string
The url of the entry. This is also the unique key.
- title
string
The title of the entry.
- read
boolean
Has entry been read.
- lastUpdate
number
Last updated in micro seconds since Jan 1st 1970.
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
#onModelChanged
Fired when the reading list data model has changed.
Methods
#add
Add a new entry to the reading list.
Parameters:
- url
string
The url of the entry. This is also the unique key. Only http/https urls are supported.
- title
string
The title of the entry.
#remove
Remove an entry from the reading list.
Parameters:
- url
string
The url of the entry.
#getAll
Returns all reading list entries.
#setReadStatus
Sets the read status on a url.
Parameters:
- url
string
url to set read status on.
- read
boolean
true for read, false for unread.
runtimePrivate
Types
#FeatureFlagInfo
Object returned from the getAllFeatureFlags function.
Properties:
- name
string
Name of this feature flag. This is the key used to look up the name.
- friendlyName
string
This is the normalized name of this feature flag suitable to be showed to the user.
- description
string
Description of this feature flag.
- value
boolean
The current value for this flag (true or false).
- locked
boolean
Locked from being changed. If true, it cannot be changed as it's locked from command line.
#UserProfile
Object returned from the getUserProfiles function.
Properties:
- name
string
Name of this user profile. For a guest profile, this should be ignored and translated string used instead.
- active
boolean
true if this is the active profile, otherwise false.
- path
string
Path of this user profile. This is used when opening and deleting profiles as it's unique.
- image
string
base64 encoded data url with the image to use for this profile. Empty for Guest profile.
- imageIndex
integer
The index into our array of default images this user is using. Corrensponds to |UserProfileImage| index value. Not valid for guest profiles.
- guest
boolean
true if this is the guest profile, otherwise false.
- customAvatar
string
Link to a HTTP-loadble custom avatar, if available.
#UserProfileImage
Object returned from the |getUserProfileImages|.
Properties:
- index
integer
Index of this user profile image in the table of available images.
- name
string
Name of this user profile image.
- image
string
base64 encoded data url with the image.
#ProfileStatEntry
Object returned from the |getProfileStatistics|.
Properties:
- category
string
Category of the count, 'History', 'Passwords' etc..
- count
integer
Number of data entries for this category.
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
#onProfilesUpdated
Fired when profiles have changed and the UI must be updated to reflect it.
Methods
#exit
Close all browsers and exit the application.
Parameters:
- prompt
boolean
Show exit confirmation when true.
#restart
Close all browsers and restart the application.
#getAllFeatureFlags
Gets all the registered Vivaldi feature flags.
#setFeatureEnabled
Enables or disables a feature.
Parameters:
- featureName
string
Name of the feature to enable or disable.
- enable
boolean
true to enable feature.
#isGuestSession
Checks whether the current profile is running as a guest session or not.
#hasGuestSession
Checks whether any guest session is open.
#switchToGuestSession
Switch to a guest session.
#closeGuestSession
Close all guest session windows.
#openProfileSelectionWindow
Open window for profile management.
#getUserProfiles
Get all or just the active registered user profile(s).
Parameters:
- activeOnly
- (optional)
boolean
If true, only return the active profile.
#openNamedProfile
Open a new window using the given named profile.
Parameters:
- profilePath
string
Path of the profile to open.
#closeActiveProfile
Close all windows for the active profile in this window.
#getUserProfileImages
Get all available user profiles images.
#updateActiveProfile
Updates the name and icon index for the active profile.
Parameters:
- name
string
New name for the profile.
- avatarIndex
integer
Index into the avatar table for the new avatar.
- createDesktopIcon
- (optional)
boolean
Create desktop icon if true, otherwise removes any created profile icon for this profile. Windows only.
#hasDesktopShortcut
Checks whether the active profile has a generated desktop shortcut. Windows only, other platforms will return false.
#getProfileDefaults
Returns defaults for a new profile.
#createProfile
Creates a new profile with the given name and icon.
Parameters:
- name
string
Name for the profile.
- avatarIndex
integer
Index into the avatar table for the avatar for the new profile.
- createDesktopIcon
boolean
Create desktop icon.
#getProfileStatistics
Returns statistics for the profile associated with the given profile path.
Parameters:
- profilePath
string
Path of the profile, unique per profile.
#deleteProfile
Deletes a profile after closing all open windows for that profile.
Parameters:
- profilePath
string
Path of the profile, unique per profile.
savedpasswords
Types
#SavedPasswordItem
Item containing saved password.
Properties:
- index
string
Saved password index in the list.
- origin
string
The origin url of saved password.
- username
string
The user name of saved password.
- password
string
The password in clear text.
#PasswordForm
Information about the password form to store or retrieve. The fields should match those documented in chromium/components/password_manager/core/browser/password_form.h
Properties:
- signon_realm
string
⚠ NO DESCRIPTION PROVIDED
- origin
string
⚠ NO DESCRIPTION PROVIDED
- username
string
⚠ NO DESCRIPTION PROVIDED
- password
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
Methods
#createDelegate
Creates a passwords_private_delegate for the current user profile.
#add
Stores a password in the password store.
Parameters:
- isExplicit
boolean
The action was initiated as the result of user input
- passwordForm
PasswordForm
⚠ NO DESCRIPTION PROVIDED
#get
Retrieves a password in the password store.
Parameters:
- passwordForm
PasswordForm
⚠ NO DESCRIPTION PROVIDED
#delete
Removes a password in the password store.
Parameters:
- isExplicit
boolean
The action was initiated as the result of user input
- passwordForm
PasswordForm
⚠ NO DESCRIPTION PROVIDED
#getList
Retrieves list of saved passwords.
#remove
Removes an item from the list retrieved with getList.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#authenticate
Before showing password to the user, make sure they are authenticated via the OS.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
searchEngines
Types
#DefaultType
ENUM
⚠ NO DESCRIPTION PROVIDED
- defaultSearch
- defaultPrivate
- defaultSearchField
- defaultSearchFieldPrivate
- defaultSpeeddials
- defaultSpeeddialsPrivate
- defaultImage
#TemplateURL
Represents a specific search engine. Urls and post params should only be used when editing the properties of a TemplateURL
Properties:
- id
string
⚠ NO DESCRIPTION PROVIDED
- readOnly
boolean
Search engines are marked as read only if they are provided by extensions, or early on if they come from the set available before the service is fully loaded
- extensionId
string
For regular search engines, this string is empty. Otherwise it contains the id of the extension that provided the search.
- name
string
⚠ NO DESCRIPTION PROVIDED
- keyword
string
⚠ NO DESCRIPTION PROVIDED
- faviconUrl
string
⚠ NO DESCRIPTION PROVIDED
- url
string
⚠ NO DESCRIPTION PROVIDED
- postParams
string
⚠ NO DESCRIPTION PROVIDED
- suggestUrl
string
⚠ NO DESCRIPTION PROVIDED
- suggestPostParams
string
⚠ NO DESCRIPTION PROVIDED
- imageUrl
string
⚠ NO DESCRIPTION PROVIDED
- imagePostParams
string
⚠ NO DESCRIPTION PROVIDED
- prepopulateId
integer
⚠ NO DESCRIPTION PROVIDED
#AllTemplateURLs
⚠ NO DESCRIPTION PROVIDED
Properties:
- templateUrls
⚠ NO DESCRIPTION PROVIDED
Array
of:- TemplateURL
- defaultSearch
string
⚠ NO DESCRIPTION PROVIDED
- defaultPrivate
string
⚠ NO DESCRIPTION PROVIDED
- defaultSearchField
string
⚠ NO DESCRIPTION PROVIDED
- defaultSearchFieldPrivate
string
⚠ NO DESCRIPTION PROVIDED
- defaultSpeeddials
string
⚠ NO DESCRIPTION PROVIDED
- defaultSpeeddialsPrivate
string
⚠ NO DESCRIPTION PROVIDED
- defaultImage
string
⚠ NO DESCRIPTION PROVIDED
- systemDefaultSearchChanged
boolean
⚠ NO DESCRIPTION PROVIDED
#SearchRequest
⚠ NO DESCRIPTION PROVIDED
Properties:
- url
string
⚠ NO DESCRIPTION PROVIDED
- contentType
string
⚠ NO DESCRIPTION PROVIDED
- postParams
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
#onTemplateUrlsChanged
Informs that template URLs have changed
Methods
#getKeywordForUrl
Obtains the default keyword for a given search URL
Parameters:
- url
string
⚠ NO DESCRIPTION PROVIDED
#getTemplateUrls
Retrieves data about all template URLS.
#addTemplateUrl
Adds a template url.
Parameters:
- templateUrl
TemplateURL
⚠ NO DESCRIPTION PROVIDED
#removeTemplateUrl
Removes a template url.
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
#updateTemplateUrl
Changes a template url.
Parameters:
- templateUrl
TemplateURL
⚠ NO DESCRIPTION PROVIDED
#moveTemplateUrl
reorders by moving a search engine before another one
Parameters:
- id
string
The search engine to move
- successor_id
- (optional)
string
The search engine will be moved before the one with this id or to the end if omitted. Must be different from id.
#setDefault
Sets a default template url.
Parameters:
- defaultType
DefaultType
⚠ NO DESCRIPTION PROVIDED
- id
string
⚠ NO DESCRIPTION PROVIDED
#getSearchRequest
Provides the request info to use for performing a search
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- searchTerms
string
⚠ NO DESCRIPTION PROVIDED
#getSuggestRequest
Provides the request info to use for requesting suggestions
Parameters:
- id
string
⚠ NO DESCRIPTION PROVIDED
- searchTerms
string
⚠ NO DESCRIPTION PROVIDED
#repairPrepopulatedTemplateUrls
resets the prepopulated template urls and the default search
Parameters:
- onlyKeepPrepopulated
boolean
⚠ NO DESCRIPTION PROVIDED
settings
Types
#ContentSettingsTypeEnum
ENUM
ContentSettingsType, see /components/content_settings/core/common/content_settings_types.h
- plugins
- popups
- geolocation
- notifications
#ContentSettingEnum
ENUM
ContentSetting, see /components/content_settings/core/common/content_settings_types.h
- allow
- block
- ask
- session_only
- detect_important_content
- num_settings
#ContentSettingItem
A full content setting description.
Properties:
- primary_pattern
string
URL pattern to match for the setting.
- secondary_pattern
string
This is only used for certain types. See https://developer.chrome.com/extensions/contentSettings#patterns
- type
ContentSettingsTypeEnum
⚠ NO DESCRIPTION PROVIDED
- setting
ContentSettingEnum
⚠ NO DESCRIPTION PROVIDED
Methods
#setContentSetting
Set a contentSetting outside the extension space.
Parameters:
- settingsItem
ContentSettingItem
⚠ NO DESCRIPTION PROVIDED
sync
Types
#SyncNotificationClientStatus
ENUM
Used to report whether we have a connection to the notification server.
- connected
- disconnected
#EngineState
ENUM
The state of the sync engine.
- stopped: Sync has not been requested by the user
- starting: Sync has been requested but the engine is not done starting
- starting_server_error: Sync has been requested but the engine is not done starting and can't do so because of a server issue
- started: The sync engine is running normally
- clearing_data: The sync engine is running, but it is in the process of requesting server data to be cleared.
- configuration_pending: The sync engine is running, but it is waiting for the current setup to be complete before actually syncing anything
- failed: The sync engine encountered an error that forced it to stop.
#DisableReason
ENUM
The reason why the sync engine is in a failed state. This should be kept in sync with SyncService::DisableReason (chromium/components/sync/driver/sync_service.h)
- enterprise_policy
- not_signed_in
- unrecoverable_error
- flag
#CycleStatus
ENUM
Error occuring as part of the sync cycle. This should be kept in sync with VivaldiSyncUIHelper::CycleStatus (sync/vivaldi_sync_ui_helper.h)
- not_synced
- success
- auth_error
- server_error
- network_error
- conflict
- throttled
- other_error
#ProtocolErrorType
ENUM
Possible error types for errors returned as part of sync server responses. This should be kept in sync with syncer::SyncProtocolErrorType (chromium/components/sync/protocol/sync_protocol_error.h)
- success
- not_my_birthday
- throttled
- transient_error
- migration_done
- disabled_by_admin
- partial_failure
- client_data_obsolete
- encryption_obsolete
- conflict
- invalid_message
- unknown
#ClientAction
ENUM
Possible action that the client can take to fix the last server-returned error. This should be kept in sync with syncer::ClientAction (chromium/components/sync/protocol/sync_protocol_error.h)
- upgrade_client
- disable_sync_on_client
- stop_sync_for_disabled_account
- reset_local_sync_data
- unknown
#DataType
ENUM
User selectable data types that we support
- bookmarks
- preferences
- passwords
- autofill
- history
- extensions
- apps
- reading_list
- tabs
- notes
#DataTypeSelection
A structure containing the system status of a data type.
Properties:
- dataType
DataType
⚠ NO DESCRIPTION PROVIDED
- enabled
boolean
true if we want to sync this data type, otherwise false.
#EngineData
Contains information about the state of the sync engine.
Properties:
- engineState
EngineState
⚠ NO DESCRIPTION PROVIDED
- disableReasons
⚠ NO DESCRIPTION PROVIDED
Array
of:- DisableReason
- protocolErrorType
ProtocolErrorType
⚠ NO DESCRIPTION PROVIDED
- protocolErrorDescription
string
Plain english description of the error as sent by the server
- protocolErrorClientAction
ClientAction
⚠ NO DESCRIPTION PROVIDED
- usesEncryptionPassword
boolean
Whether encryption has been set up
- needsDecryptionPassword
boolean
Whether a password is needed to decrypt the sync data
- isEncryptingEverything
boolean
Wheter the engine is encrypting all data types
- isSetupInProgress
boolean
Whether the sync service is being configured.
- isFirstSetupComplete
boolean
Whether the sync service has been configured and started before.
- syncEverything
boolean
Indicates that all datatypes will always be synced.
- dataTypes
List of available data types and whether the user chose to sync them.
Array
of:- DataTypeSelection
- isReady
boolean
⚠ NO DESCRIPTION PROVIDED
#CycleData
Contains information about the last sync cycle.
Properties:
- cycleStartTime
number
The last time a sync cycle started.
- downloadUpdatesStatus
CycleStatus
Whether the download updates part of the last sync cycle was successful
- commitStatus
CycleStatus
Whether the commit part of the last sync cycle was successful
- nextRetryTime
number
The time at which the next sync attempt will be made, if the last one failed
- isReady
boolean
⚠ 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
#onEngineStateChanged
Fired when the sync engine state has changed.
Parameters:
- data
EngineData
⚠ NO DESCRIPTION PROVIDED
#onCycleCompleted
Fired when a sync cycle completed.
Parameters:
- data
CycleData
⚠ NO DESCRIPTION PROVIDED
Methods
#start
Starts up sync. Feedback about the startup process can be obtained by listening to onEngineStateChanged.
#setEncryptionPassword
Sets the password to use for encryption/decryption of Sync data. If an empty password is supplied, the password supplied when logging in will be used.
Parameters:
- password
- (optional)
string
The encryption password to use. If not specified, We will attempt to use the currently stored login password instead.
#backupEncryptionToken
Saves the token derived from the encryption password to a file
Parameters:
- target_file
string
The file to which the token should be saved
#restoreEncryptionToken
Uses a previously backed-up token to set up encryption
Parameters:
- source_file
string
The file from which the token should be recovered
#getDefaultSessionName
Returns the device name as determined by the OS.
#setTypes
Sets which data types should be synced
Parameters:
- syncEverything
boolean
Sets which datatypes sould be synced.
- types
List of data types to be enabled
Array
of:- DataTypeSelection
#getEngineState
Returns informations about the status of the sync engine.
#getLastCycleState
Returns informations about the status of the last sync cycle.
#setupComplete
Informs the backend that the user is done configuring sync types
#clearData
Clear all the user's data on the server side and logs them out
tabsPrivate
Types
#TabAlertState
ENUM
The active media type.
- recording
- capturing
- playing
- muting
- bluetooth
- usb
- pip
- desktop_capturing
- vr_presenting_in_headset
- serial_connected
- bluetooth_scan
- hid_connected
- audio_recording
- video_recording
#TranslateStep
ENUM
Denotes which state the page is in with respect to translate.
- idle
- before_translate
- translating
- after_translate
- translate_error
#TranslateError
ENUM
Signals translation errors.
- no_error
- network
- init_error
- unknown_language
- unsupported_language
- identical_languages
- translation_error
- translation_timeout
- unexpected_script_error
- bad_origin
- script_load_error
#UpdateTabInfo
Object passed to the update and returned in the get function function.
Properties:
- showImages
- (optional)
boolean
Show images for all pages loaded in this tab. Default is true.
- loadFromCacheOnly
- (optional)
boolean
Only load the page from cache. Default is false.
- mimeType
- (optional)
string
The current documents mimetype.
- muteTab
- (optional)
boolean
If the tab should be quiet.
#DragData
Provides custom drag data.
Properties:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- mimeType
string
The mime type to use for the custom data.
- customData
string
The custom data.
- url
string
The url for the data. Needed for the html5 drag and drop engine. Not set in the onDropEnd event.
- title
string
The title for the data. Needed for the html5 drag and drop engine. Not set in the onDropEnd event.
- imageData
- (optional)
binary
The raw image data in RGBA format for the image to use during drag drop instead of a tab capture.
- posX
- (optional)
number
X offset inside the given app window in the UI coordinates.
- posY
- (optional)
number
Y offset inside the given app window in the UI coordinates.
- width
number
Width of the capture in the UI coordinates.
- height
number
Height of the capture in the UI coordinates.
- cursorX
integer
X offset into the image for the cursor during drag.
- cursorY
integer
Y offset into the image for the cursor during drag.
- isFromTouch
- (optional)
boolean
True if the drag was initiated from touch. Default is false.
#NavigationRect
Rect struct for spatial navigation.
Properties:
- left
integer
left
- top
integer
top
- width
integer
width
- height
integer
height
- right
integer
right
- bottom
integer
bottom
- href
string
Url of focused element in case it's a link.
#NavigationDirection
ENUM
Which direction to move the current spatnav rect.
- left
- right
- up
- down
#LanguageDetectionDetails
Details the language detection for the current page. Corresponds to LanguageDetectionDetails in C++.
Properties:
- url
string
The url of the page detected was done on.
- contentLanguage
string
The language detected by the content (Content-Language).
- cldLanguage
string
The language detected by CLD (Chromium's Compact Language Detector library).
- isCldReliable
boolean
true if the CLD detection is reliable, otherwise false.
- hasNoTranslate
boolean
Whether the notranslate is specified in head tag as a meta; or
- htmlRootLanguage
string
The language written in the lang attribute of the html element.
- adoptedLanguage
string
The adopted language, usually a authoritive decision on the different language tags in a document.
#CloseSpatnavParams
Reports layout change and element null check
Properties:
- layout_changed
boolean
True if layout changed
- current_element_valid
boolean
True is current element is not null. Currently used to see if previous escape closed a menu that made our current element disappear.
#TabPerformanceData
Memory information about a tab.
Properties:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- memoryUsage
integer
Memory usage of tab in bytes.
- discarded
boolean
If true |memoryUsage| will be saved memory.
#SendTabToSelfAction
ENUM
⚠ NO DESCRIPTION PROVIDED
- delete
- dismiss
#SendTabToSelfEntry
Url received from another Vivaldi instance.
Properties:
- guid
string
Unique identifier.
- url
string
The url.
- title
string
The url's title.
- deviceName
string
Sharing device name.
- sharedTime
number
Sharing time.
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
#onSendTabToSelfAdded
Fired when one or more urls are received from a remote instance.
Parameters:
- entries
⚠ NO DESCRIPTION PROVIDED
Array
of:- SendTabToSelfEntry
#onSendTabToSelfDismissed
Fired when one or more entries not to be used anymore.
Parameters:
- guids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#onMediaStateChanged
Fired when the media state changes on the tab.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- tabState
All the active media states for this tab.
Array
of:- TabAlertState
#onThemeColorChanged
Fired when a meta theme-color has a value from the web page.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- rgb
string
Fired when the theme-color in the meta header field has changed. Format is #rrggbb and provided in css hex.
#onTabUpdated
Fires when a |WebContent| is changed in some way.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- tabInfo
UpdateTabInfo
⚠ NO DESCRIPTION PROVIDED
#onDragEnd
Fires when tab dragging ends.
Parameters:
- dragAborted
boolean
This is an aborted drag (using ESC or similar).
- dropOutsideWindow
boolean
This is a valid drop outside any app window.
- posX
integer
X position of the drop in screen coordinates.
- posY
integer
Y position of the drop in screen coordinates.
#onPermissionAccessed
Fires when a |permission| is accessed.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- permission
string
⚠ NO DESCRIPTION PROVIDED
- origin
string
⚠ NO DESCRIPTION PROVIDED
- blocked
string
Current permission setting. 'allow', 'block', 'ask' or 'default'
#onKeyboardChanged
Fires for all keyboard changes that have not been consumed by the browser
Parameters:
- windowId
integer
Id of the browser window this keyboard event originates from.
- down
boolean
True when pressed, false when released
- modifiers
integer
Modifier state when change occured
- windowsKeyCode
integer
Value of key that changed
- afterGesture
boolean
True when the keyboard event completed a mouse or wheel gesture
- autoRepeat
boolean
True if the event is a result of automatic keyboard repeat.
#onMouseChanged
Fires when mouse state has changed.
Parameters:
- motion
boolean
True when mouse has moved, false when mouse is pressed/released.
#onKeyboardShortcut
Fires when on a keystroke that hasn't been consumed by the browser
Parameters:
- windowId
integer
Id of the browser window this keyboard event originates from.
- shortcutText
string
String representation of a keyboard shortcut
- autoRepeat
boolean
True if the shortcut is generated as a result of automatic keyboard repeat
- fromDevtools
boolean
True if the shortcut comes from a devtools window
#onTabIsDetached
Fired when a tab that is moved out of a window detaches from the source-window. This is used to make sure two WebViews don't try to use the same WebContents.
Parameters:
- tabId
integer
Tab id used for Tabstrip WebContents retrieval.
- windowId
integer
Target WindowId that the message is intended. As in not the window it is detached from, but the window it is attached to.
#onTabIsAttached
Fired when a WebContents is attached to an embedder. This is used to make sure two WebViews don't try to use the same WebContents.
Parameters:
- tabId
integer
Tab id used for Tabstrip WebContents retrieval.
- windowId
integer
WindowId of the embedder.
#onMouseGestureDetection
Fires when we detect a possible start of a mouse-gesture related event
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
#onMouseGesture
Fires when the user triggered a mouse gesture
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
- clientX
number
X-coordinate of the gesture start point
- clientY
number
Y-coordinate of the gesture start point
- gestureDirections
string
Sequence of gesture directions
#onTabSwitchEnd
Fires when the tab switch using mouse wheel terminates
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
#onRockerGesture
Fires when the user triggered a rocker gesture
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
- isLeft
boolean
True if this is the left rocker gesture
#onWebviewClickCheck
Fires to check if the user clicks on a webview.
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
- mousedown
boolean
true if this is a mousedown event, false for mouseup
- button
integer
the mouse button that was pressed, the values match DOM's MouseEvent.button
- clientX
number
X-coordinates of the click
- clientY
number
Y-coordinates of the click
#onPageZoom
Fires on page zoom events
Parameters:
- windowId
integer
Id of the Vivaldi window where the event was originated
- steps
number
Number of basic steps to increase or decrease zoom.
- clientX
number
X-coordinates of the pointer position
- clientY
number
Y-coordinates of the pointer position
#onBeforeUnloadDialogClosed
Fired when a beforeunload dialog has been closed.
Parameters:
- windowId
integer
Window Id containg the tab Id.
- tabId
integer
Tab id for the beforeunload dialog.
- proceed
boolean
If true, the tab operation that triggered the dialog has been allowed to proceed.
#onLanguageDetermined
Fired when the language of the current page has been determined.
Parameters:
- tabId
integer
The tab Id.
- details
LanguageDetectionDetails
⚠ NO DESCRIPTION PROVIDED
#onShowTranslationUI
Fired when we should show translation UI. The status decides what UI we should show.
Parameters:
- tabId
integer
The tab Id.
- step
TranslateStep
⚠ NO DESCRIPTION PROVIDED
- error
TranslateError
⚠ NO DESCRIPTION PROVIDED
- automaticTranslation
boolean
true if this was triggered by an automatic translation.
#onPageTranslated
Fired when a translation has been completed on a page.
Parameters:
- tabId
integer
The tab Id.
- srcLang
string
Source language code it was translated from.
- destLang
string
Destination language code it was translated to.
- error
TranslateError
⚠ NO DESCRIPTION PROVIDED
#onIsPageTranslatedChanged
Fired when a translation state has changed on a page, eg. revert has been used.
Parameters:
- tabId
integer
The tab Id.
- isTranslated
boolean
The translation state has changed. For eg. revert, it will be false after revert has been invoked.
#onTabResourceMetricsRefreshed
Fired when resource metrics are updated.
Parameters:
- info
TabPerformanceData
⚠ NO DESCRIPTION PROVIDED
Methods
#update
Update the given tab with Vivaldi-specific properties.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- tabInfo
UpdateTabInfo
⚠ NO DESCRIPTION PROVIDED
#get
Get Vivaldi-specific properties from the tab.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#insertText
Insert text into editable fields.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- text
string
The text to insert
#startDrag
Starts the HTML5 drag of the given tabs.
Parameters:
- dragData
DragData
The drag data to be transported in the dataobject.
#scrollPage
Scrolls the page up or down, depending on a parameter
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- scrollType
string
Whether to scroll up or down, and by how much
- scrollAmount
- (optional)
integer
The amount to scroll by
#moveSpatnavRect
Move current spatnav rect in |direction|
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- direction
NavigationDirection
⚠ NO DESCRIPTION PROVIDED
#activateSpatnavElement
Activate currently focused spatnav element
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- modifiers
integer
Keyboard modifiers to simulate shift or ctrl-clicking
#closeSpatnavOrCurrentOpenMenu
Returns true if layout changes by un-hovering the current spatnav element.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#hasBeforeUnloadOrUnload
Check if a page contains a beforeunload or unload handler.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#translatePage
Attempts to translate the given page.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
- srcLang
string
Source language code to translate from. May be omitted.
- destLang
string
Destination language code to translate to. Must be present.
#revertTranslatePage
Attempts to revert the translating of the given page.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#determineTextLanguage
Attempts to determined the language of the given text.
Parameters:
- tabId
integer
Any valid tabId can be used here, it is only used to determine which renderer to use.
- text
string
String to determine the language for. If the string is too short, this operation might not yield a language code.
#loadViaLifeCycleUnit
Calls TabLifecycleUnitSource::TabLifecycleUnit::Load if there is a TLU associated with the webcontents for the tab.
Parameters:
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#getTabPerformanceData
Look up performance data about tabs. We might migrate to TabRendererData instead.
Parameters:
- tabIds
Ids for tabs we want info about.
Array
of:- tabId
- integer
- 0
#getSendTabToSelfEntries
Fetch current entries that have been shared to us.
#execSendTabToSelfAction
Delete entries from the model.
Parameters:
- action
SendTabToSelfAction
⚠ NO DESCRIPTION PROVIDED
- guids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#dismissSendTabToSelfEntries
Dismiss entries from the model.
Parameters:
- guids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
themePrivate
Types
#BackgroundPosition
ENUM
⚠ NO DESCRIPTION PROVIDED
- stretch
- center
- repeat
#ThemeData
Basic typesafe theme data.
Properties:
- id
string
The id of the queried theme. This is always set.
- isInstalled
boolean
Is the theme installed or not.
- version
number
If the theme is installed, this is the version of the installed theme.
#ThemeObject
- ThemeObject
object
The theme object.
Object Properties:
- type
any
- preserveNull
True
#ExportOptions
⚠ NO DESCRIPTION PROVIDED
Properties:
- returnBlob
- (optional)
boolean
When true, the theme archive is returned as a memory blob instead of asking the user to select the file.
- windowId
- (optional)
number
Window to show the file selection dialog to select the output file. Must not be given when |returnBlob| is true.
- dialogTitle
- (optional)
string
The title of the file selection dialog to select the output file. Must not be given when |returnBlob| is true.
#ExportResult
⚠ NO DESCRIPTION PROVIDED
Properties:
- success
boolean
True if the theme was successfully exported. False on errors or if the user cancelled operation.
- dataBlob
- (optional)
binary
The exported archive as binary blob. This is given only on success and ony when |returnBlob| is true in |ExportOptions|.
#ImportOptions
⚠ NO DESCRIPTION PROVIDED
Properties:
- dataBlob
binary
The archive to import the theme from.
#ImportErrorKind
ENUM
⚠ NO DESCRIPTION PROVIDED
- io
- badArchive
- badSettings
- network
#ImportError
⚠ NO DESCRIPTION PROVIDED
Properties:
- kind
ImportErrorKind
Generic error kind
- details
string
low-level error message in English
#ImportResult
⚠ NO DESCRIPTION PROVIDED
Properties:
- error
- (optional)
ImportError
Error if any during the operation.
- themeID
string
The id of the imported theme or an empty string if the user cancels the import or on errors.
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
#onThemeDownloadStarted
Fired when the theme download is starting.
Parameters:
- themeId
string
⚠ NO DESCRIPTION PROVIDED
#onThemeDownloadProgress
Fired on download progress.
Parameters:
- themeId
string
⚠ NO DESCRIPTION PROVIDED
- currentValue
integer
Fired on download progress with the current progress value.
#onThemeDownloadCompleted
Fired on download and install completion.
Parameters:
- themeId
string
⚠ NO DESCRIPTION PROVIDED
- success
boolean
true on successful theme install.
- error
string
if success is false, provides an error description.
#onThemesUpdated
Fired if the preview or permanent theme collection has changed.
Parameters:
- preview
boolean
true if preview has changed, otherwise false.
Methods
#export
Export the theme into a zip file
Parameters:
- theme
ThemeObject
⚠ NO DESCRIPTION PROVIDED
- options
ExportOptions
⚠ NO DESCRIPTION PROVIDED
#import
Import and install theme archive.
Parameters:
- options
ImportOptions
⚠ NO DESCRIPTION PROVIDED
#download
Download and install theme.
Parameters:
- themeId
string
Theme ID of the theme to download and install. This parameter is primarily used for status events.
- url
string
URL to the theme to download and install.
#getThemeData
Get some information about the given theme id.
Parameters:
- id
string
Theme ID of the theme to return data about.
thumbnails
Types
#CaptureBookmarkParams
A structure containing parameters for the captureUrl call.
Properties:
- bookmarkId
string
Bookmark id to associate the captured thumbnail with.
- url
string
url to load and generate thumbnail for.
#CaptureUIParams
A structure containing parameters for the captureUI call.
Properties:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- posX
number
X offset inside the given app window in the UI coordinates.
- posY
number
Y offset inside the given app window in the UI coordinates.
- width
number
Width of the capture in the UI coordinates.
- height
number
Height of the capture in the UI coordinates.
- encodeFormat
- (optional)
string
The encoding format. 'jpg' or 'png'. Defaults to 'png'.
- encodeQuality
- (optional)
integer
The jpg encoding quality if format is 'jpg', otherwise ignored. Default is 90, which is very high quality.
- saveToDisk
- (optional)
boolean
The resulting image is saved under the configurable directory. Default is false.
- showFileInPath
- (optional)
boolean
If |saveToBasePath| is provided, setting this to true will open the folder with the file selected after capture has completed. Default is false.
- copyToClipboard
- (optional)
boolean
If true, will copy the image to clipboard in a raw and uncompressed format. This will override any file path arguments. Default is false.
- saveFilePattern
- (optional)
string
If set, will use this pattern to contruct the filename. Note that the file name is still guaranteed to be unique, and (1), (2) etc might be appended if needed.
#CaptureRect
Rect struct for capture actions where the result wanted is a cut-out of the full tab.
Properties:
- left
integer
x
- top
integer
y
- width
integer
width
- height
integer
height
#CaptureTabParams
A structure containing parameters for the captureTab call.
Properties:
- encodeFormat
- (optional)
string
The encoding format. 'jpg' or 'png'. Defaults to 'png'.
- encodeQuality
- (optional)
integer
The jpg encoding quality if format is 'jpg', otherwise ignored. Default is 90, which is very high quality.
- fullPage
- (optional)
boolean
true to capture the full height of the page, restricted to 20000 pixels height. Default is false.
- rect
- (optional)
CaptureRect
Wanted rect, output is not scaled.
- width
- (optional)
integer
The resulting width of the capture after scaling. Ignored if |fullPage| is true.
- height
- (optional)
integer
The resulting height of the capture after scaling or if onlyVisible is false, the maximum number of pixels to capture in height.
- saveToDisk
- (optional)
boolean
The resulting image is saved under the configurable directory. Default is false.
- showFileInPath
- (optional)
boolean
If |saveToBasePath| is provided, setting this to true will open the folder with the file selected after capture has completed. Default is false.
- copyToClipboard
- (optional)
boolean
If true, will copy the image to clipboard in a raw and uncompressed format. This will override any file path arguments. Default is false.
- saveFilePattern
- (optional)
string
If set, will use this pattern to contruct the filename. Note that the file name is still guaranteed to be unique, and (1), (2) etc might be appended if needed.
Methods
#captureUI
Captures a part of the visible UI for the given app window.
Parameters:
- params
CaptureUIParams
⚠ NO DESCRIPTION PROVIDED
#captureTab
Captures the contents of a tab.
Parameters:
- tabId
integer
The tab id to capture. 0 to capture the current active tab.
- params
CaptureTabParams
⚠ NO DESCRIPTION PROVIDED
#captureBookmark
Loads a url then captures the contents of it and attached it to a bookmark.
Parameters:
- params
CaptureBookmarkParams
⚠ NO DESCRIPTION PROVIDED
translateHistory
Types
#TextItem
Properties:
- code
string
Language code.
- text
string
Text.
#HistoryItem
Properties:
- id
string
Unique identifier.
- srcItem
TextItem
Text and language code of original (non-translated) data.
- translatedItem
TextItem
Text and language code of translated data.
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
#onAdded
Fires when elements have been appended to the list.
Parameters:
- items
Elements in the order they have been added
Array
of:- HistoryItem
- index
number
Index where the elements are located.
#onMoved
Fires when an element has been moved within the list.
Parameters:
- id
string
Identifier of element that has been moved.
- index
number
Index to where element has been moved.
#onRemoved
Fires when elements have been appended to the list.
Parameters:
- ids
A list of ids that have been removed. An empty list means all.
Array
of:- string
Methods
#get
Retrieves the full history.
#add
Adds an item to the list. If item already exists that item is returned without adding a duplicate. The returned item's id it set up in the call.
Parameters:
- item
HistoryItem
Data to add. Note, the id element is ignored.
- index
number
Where to add element. -1 indicates end of list.
#remove
Removes one or more items.
Parameters:
- ids
List of identifiers representing items to be removed.
Array
of:- string
#reset
Removes items with matching timestamp.
Parameters:
- since
number
In milliseconds since epoch. Remove all items with a timestamp greater or equal to this value.
vivaldiAccount
Types
#FetchErrorType
ENUM
⚠ NO DESCRIPTION PROVIDED
- no_error: Everything went fine
- network_error: Couldn't fetch data because of a network issue.
- server_error: The server provided an unexpected response to our request.
- invalid_credentials: The server explicitly rejected our credentials.
#FetchError
properties of an error that occured during a network request.
Properties:
- errorType
FetchErrorType
⚠ NO DESCRIPTION PROVIDED
- serverMessage
string
⚠ NO DESCRIPTION PROVIDED
- errorCode
integer
⚠ NO DESCRIPTION PROVIDED
#AccountInfo
A structure detailing the informations about the currrently logged in account.
Properties:
- accountId
string
The unique account identifier, as retrieved from the server. Typically, this is just a case-sensitive version of the username or an empty string if it hasn't been retrieved yet. The UI should check whether this is empty to determine whether the user has set up an account, even if the tokens might be missing.
- username
string
The username, as entered by the user.
- pictureUrl
string
A link to the user's avatar. This is typically an https url, but the server is free to provide any valid url.
- donationTier
string
⚠ NO DESCRIPTION PROVIDED
#State
Data reporting the current state of the account and associated tokens.
Properties:
- accountInfo
AccountInfo
⚠ NO DESCRIPTION PROVIDED
- hasSavedPassword
boolean
Whether we found a password for this sync account in the password manager.
- hasToken
boolean
If we have a token, we are practically logged in (but we may still need to get the accountId to be fully operational).
- accessToken
string
The actual access token. This is provided as a temporary measure until the notification code is moved to C++.
- hasEncryptedToken
boolean
We found a saved encrypted token, but could not decrypt it.
- tokenRequestTime
number
⚠ NO DESCRIPTION PROVIDED
- nextTokenRequestTime
number
⚠ NO DESCRIPTION PROVIDED
- lastTokenFetchError
FetchError
⚠ NO DESCRIPTION PROVIDED
- lastAccountInfoFetchError
FetchError
⚠ NO DESCRIPTION PROVIDED
- isReady
boolean
⚠ NO DESCRIPTION PROVIDED
#PendingRegistration
Information about an account that's in the process of registering.
Properties:
- username
string
⚠ NO DESCRIPTION PROVIDED
- password
string
⚠ NO DESCRIPTION PROVIDED
- recovery_email
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
#onAccountStateChanged
Fired whenever something changed with the account
Parameters:
- state
State
⚠ NO DESCRIPTION PROVIDED
Methods
#login
Attempt to obtain an access token for vivaldi.net using the provided credentials.
Parameters:
- username
string
⚠ NO DESCRIPTION PROVIDED
- password
string
⚠ NO DESCRIPTION PROVIDED
- savePassword
boolean
⚠ NO DESCRIPTION PROVIDED
#logout
Clear the previously obtained tokens and forget the logged in username.
#getState
Retrieve the current state of the account manager.
#setPendingRegistration
Stores credentials for an account in the process of registering. Call without parameter to discard the currently stored credentials
Parameters:
- registration
- (optional)
PendingRegistration
⚠ NO DESCRIPTION PROVIDED
#getPendingRegistration
Retrieves the last stored credentials for a registration in progress.
sessionsPrivate
Types
#ContentType
ENUM
Defines role of a node in content. 'group' is the same as a stack.
- window
- workspace
- pinned
- group
- tab
#BackupType
ENUM
Defines how a backup should be made.
- backup
- autosave
#ContentTarget
Settings used when moving an element in a saved session.
Properties:
- beforeTabId
number
Target id. Move items before tab with this id. At end if negative.
- group
- (optional)
string
Target tab stack id. Remove id if empty.
- pinned
- (optional)
boolean
Target pinned state.
- windowId
- (optional)
number
Target window id. Not set when target is within a workspace.
- workspace
- (optional)
number
Target workspace id. Remove id if negative.
#WorkspaceItem
Holds information of a workspace. Not actual tabs, but the workspace itself.
Properties:
- id
number
Unique identifier.
- name
string
Name shown in UI.
- icon
string
Icon shown in UI.
- emoji
string
emoji shown in UI.
#TabContent
Holds information of a tab
Properties:
- id
number
Unique identifier.
- index
number
Index as stored in database.
- name
string
Active page title. Can be empty.
- fixedName
string
Name provided by user. Overrides 'name'. Has not been set if string is empty.
- url
string
Url of active entry in navigation list.
- pinned
boolean
Pinned state of the tab.
- quarantine
boolean
Tab is not installed if true
- group
string
The group (stack) the tab belongs to. Can be empty which means no group.
- fixedGroupName
string
Name provided by user. Has not been set if string is empty.
#WindowContent
Holds information of a window.
Properties:
- id
number
Unique identifier.
- quarantine
boolean
Window is not installed if true.
- tabs
Tabs in window.
Array
of:- TabContent
#WorkspaceContent
Holds information, including tabs of a workspace.
Properties:
- id
number
Unique identifier.
- quarantine
boolean
Workspace is not installed if true.
- tabs
Tabs in workspace.
Array
of:- TabContent
- name
string
Name shown in UI.
- icon
string
Icon shown in UI.
- emoji
string
emoji shown in UI.
#ContentModel
⚠ NO DESCRIPTION PROVIDED
Properties:
- id
number
Session identifier.
- windows
⚠ NO DESCRIPTION PROVIDED
Array
of:- WindowContent
- workspaces
⚠ NO DESCRIPTION PROVIDED
Array
of:- WorkspaceContent
#GroupAlias
⚠ NO DESCRIPTION PROVIDED
Properties:
- group
string
Existing group id.
- alias
string
A new unique id that can be used instead of the existing.
#WorkspaceState
⚠ NO DESCRIPTION PROVIDED
Properties:
- groups
List of new group ids. There must be one entry for each affected group.
Array
of:- GroupAlias
- item
WorkspaceItem
List of workspaces in session.
#ContentCommands
⚠ NO DESCRIPTION PROVIDED
Properties:
- ids
Tabs and windows in a session.
Array
of:- number
- groupAliases
- (optional)
A list of new group ids that must be supplied when creating a window. There must be one entry for each affected group.
Array
of:- GroupAlias
- move
- (optional)
boolean
For moving tabs.
- pin
- (optional)
boolean
For setting pinned state.
- quarantine
- (optional)
boolean
For setting quarantine state.
- remove
- (optional)
boolean
For deleting a tab.
- tabstack
- (optional)
boolean
For creating a stack. There must be at least two tabs in the 'ids' list.
- title
- (optional)
string
For setting title. Ignored if number of ids is not 1.
- target
- (optional)
ContentTarget
Used for commands: ['move', 'tabstack'].
- type
- (optional)
ContentType
Used for commands: ['title'].
- window
- (optional)
boolean
For creating a window.
- workspace
- (optional)
boolean
For creating a workspace.
- workspaceState
- (optional)
WorkspaceState
Used for commands: ['workspace']
- workspaceId
- (optional)
number
Used for commands: ['workspace']
#ItemType
ENUM
Defines supported items
- folder
- node
- history
#GroupName
Holds custom name for a group (tab stack).
Properties:
- id
string
Group identifier.
- name
string
Visible name in UI.
#SessionItem
Object that holds all information about a single session.
Properties:
- id
number
Unique identifier.
- type
ItemType
Tells what kind of item. 'folder' or 'node'. A 'node' can have children (it is then a container).
- name
string
Session display name.
- createDateJS
number
Session save date in JS format.
- modifyDateJS
number
Session update date in JS format.
- windows
number
Number of windows in this session.
- tabs
number
Number of tabs in this session.
- quarantined
number
Number of quarantined (inactive) tabs in this session.
- workspaces
List of workspaces in session.
Array
of:- WorkspaceItem
- groupNames
List of custom group names (tab stack names) in session. Can be empty.
Array
of:- GroupName
- parentId
number
Unique identifier.
- containerId
number
Set for elements in a container or trash, -1 otherwise.
- content
- (optional)
ContentModel
⚠ NO DESCRIPTION PROVIDED
- children
- (optional)
An ordered list of children of this node.
Array
of:- SessionItem
#SessionIds
- SessionIds
⚠ NO DESCRIPTION PROVIDED
Array
of:- number
#SessionModel
⚠ NO DESCRIPTION PROVIDED
Properties:
- items
⚠ NO DESCRIPTION PROVIDED
Array
of:- SessionItem
- rootId
number
⚠ NO DESCRIPTION PROVIDED
- autosaveId
number
⚠ NO DESCRIPTION PROVIDED
- trashId
number
⚠ NO DESCRIPTION PROVIDED
- loadingFailed
boolean
⚠ NO DESCRIPTION PROVIDED
#SessionOpenOptions
Options for opening the session.
Properties:
- newWindow
boolean
The session will open in a new window.
- oneWindow
boolean
All tabs will open in one windows.
- withWorkspace
boolean
Open workspace tabs.
- tabIds
Open given tabs only.
Array
of:- number
#SessionAddOptions
Options for adding a new session or updating an existing session.
Properties:
- name
string
User friendly description of the session. [add, duplicate].
- filename
string
Filename without extension. Final name be extended with numbers (N) on collision. [all]
- parentId
number
Parent of new session node in the model. [add, duplicate].
- index
number
Where to insert among parent's siblings. [add, duplicate].
- owner
string
Free form token that is passed back with the event. Allows proper handling when data is added. [add, duplicate].
- fromId
- (optional)
number
If set, the new entry is copied from the given.
- windowId
- (optional)
integer
Save only the given window. 0 or not set means all windows. Ignored if 'fromId' is set. [add, update]
- ids
- (optional)
List of tab identifiers to be saved. Ignored if 'fromId' is set. [add, upddate]
Array
of:- integer
- backup
- (optional)
BackupType
Special flag for timed backups. No other options are then used.
#SessionChange
ENUM
Defines what has changed.
- added
- changed
- deleted
- moved
- content
#SessionChangeData
⚠ NO DESCRIPTION PROVIDED
Properties:
- owner
string
Caller component (in UI) identifier.
- parentId
number
Set for 'added' and 'moved' events.
- index
number
Set for 'added' and 'moved' events.
- item
- (optional)
SessionItem
Set for 'added' and 'changed' event.
- content
- (optional)
ContentModel
Set for 'content' event.
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
#onChanged
Fired when a session is added or removed.
Parameters:
- id
number
⚠ NO DESCRIPTION PROVIDED
- change
SessionChange
⚠ NO DESCRIPTION PROVIDED
- data
SessionChangeData
⚠ NO DESCRIPTION PROVIDED
#onPersistentLoad
Fired when a persisted session is loaded.
Parameters:
- state
boolean
⚠ NO DESCRIPTION PROVIDED
Methods
#getAll
Returns all previously saved sessions stored on disk.
#add
Saves all open tabs to the named session.
Parameters:
- options
SessionAddOptions
Controls the adding behavior.
#delete
Deletes session. Items in the trash folder are permanently removed. Others are moved to trash.
Parameters:
- id
number
Identifier of session to delete.
- index
number
Index to move to in trash folder.
#emptyTrash
Permanently deletes all trashed session.
#getAutosaveIds
Get ids for nodes that are older than 'days' old from the time the function was called
Parameters:
- days
number
Number of days to go hack in history.
#getContent
Returns contents of a session.
Parameters:
- id
number
Identifier of session.
#makeContainer
Turns a history session into the default entry of the container.
Parameters:
- id
number
Session identifier.
#modifyContent
Changes internal settings in a session
Parameters:
- id
number
Session identifier.
- commands
ContentCommands
Describes changes to be made
#move
Moves session.
Parameters:
- id
number
Identifier of session to move.
- parentId
number
New parent
- index
number
Position in new parent's child list.
#open
Open a specific named session.
Parameters:
- id
number
Identifier of session to open.
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- options
SessionOpenOptions
Session open options.
#rename
Renames the named session.
Parameters:
- id
number
Identifier of session to rename.
- name
string
New name.
#update
Updates a session with current open tabs.
Parameters:
- id
number
Identifier of session to update.
- options
SessionAddOptions
Controls the update behavior.
utilities
Types
#Color
Object defining an RGB color.
Properties:
- red
integer
Red color.
- green
integer
Green color.
- blue
integer
Blue color.
#GetEnvVarsResponse
- GetEnvVarsResponse
object
Object containing valid environment variable values.
Object Properties:
- type
string
#WindowState
ENUM
The state of this browser window.
- normal: Normal window state (i.e. not minimized, maximized, or fullscreen).
- minimized: Minimized window state.
- maximized: Maximized window state.
- fullscreen: Fullscreen window state.
#WindowType
ENUM
Type of window. normal is a browser-window.
- normal
- popup
- settings
#WindowRestoreState
ENUM
State of window after going out of fullscreen.
- normal
- minimized
- maximized
#WindowRestoreStateFromFullscreen
ENUM
State of window after going out of html-fullscreen.
- normal
- minimized
- maximized
- fullscreen
#StatusbarMode
ENUM
Statusbar view setting. 'on' | 'off' | 'overlay' (StatusBarDisplayValues from gen/prefs/prefNames.js)
- on
- off
- overlay
#WindowProperties
Type WindowState in ./stores/WindowStore.js
Properties:
- type
WindowType
⚠ NO DESCRIPTION PROVIDED
- state
- (optional)
WindowState
⚠ NO DESCRIPTION PROVIDED
- restoreStateFullscreen
WindowRestoreState
⚠ NO DESCRIPTION PROVIDED
- restoreStateHtml5Fullscreen
WindowRestoreStateFromFullscreen
⚠ NO DESCRIPTION PROVIDED
- nativeDecorations
boolean
Window is uses native window-controls.
- incognito
boolean
Window is incognito.
- guest
boolean
Window is guest.
- html5FullScreen
boolean
Window is fullscreened through htmlelement.requestFullScreen.
- active
boolean
Window is active.
- minimalUI
- (optional)
boolean
Window is incognito.
- visibleUI
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- bookmarksBar
boolean
Showing bookmarksbar.
- addressBar
boolean
Showing addressbar.
- panelToggle
boolean
Showing panel-toggle.
- tabs
boolean
Showing tabs.
- statusBar
StatusbarMode
⚠ NO DESCRIPTION PROVIDED
#BroadcastAction
Identifies broadcast type. Only one property should be used.
Properties:
- startDragging
- (optional)
boolean
⚠ NO DESCRIPTION PROVIDED
- endDragging
- (optional)
boolean
⚠ NO DESCRIPTION PROVIDED
- translate
- (optional)
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- winId
number
The window where translation takes place.
- lang
string
Language of text to be translated.
- text
string
Text to be translated.
#DialogName
ENUM
Name of the dialog to set position for.
- chromecast: The Chromecast dialog with source and destination. Centered over the active webview.
- password: The password dialog opening to save a password.
- permission: The permission dialog allowing or blocking one or more permissions.
#CookieMode
ENUM
CookieMode enumeration, corresponds to CookieControlsMode in chromium/components/content_settings/core/browser/cookie_settings.h
- off: All cookies allowed.
- BlockThirdParty: Block third party cookies.
- BlockThirdPartyIncognitoOnly: Block third party cookies in incognito mode only.
#FlowDirection
ENUM
The direction a dialog would be opened from the given rect.
- down: Dialog should position itself below the given rect.
- up: Dialog should position itself above the given rect.
#UrlValidResults
Object that describes the validitity of a given url.
Properties:
- urlValid
boolean
The url is a correctly formatted url. This might be true even if the protocol is not valid.
- isBrowserUrl
boolean
The url can be shown directly by the browser.
- schemeParsed
string
The parsed and authorative protocol scheme as parsed by Chromium.
- normalizedUrl
string
Returns the raw spec, i.e., the full text of the URL, in canonical UTF-8, if the URL is valid.
#WhatsNewResults
Object that describes how a What's new page can be used.
Properties:
- show
boolean
true if the What's new page can be shown, otherwise false.
- firstrun
boolean
true if this the first time the Whats new page is shown. Do not use if 'show' is false.
#UrlFragments
Object with url fragments, including top level domain which is eTLD aware.
Properties:
- scheme
- (optional)
string
If URL cannot be parsed at all, this will be absent
- username
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- password
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- host
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- port
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- path
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- query
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- ref
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- tld
- (optional)
string
⚠ NO DESCRIPTION PROVIDED
- urlForSecurityDisplay
- (optional)
string
URL formatted for security display, meaning formatted in unicode in a way to avoid IDN homograph attack.
- tldForSecurityDisplay
- (optional)
string
TLD for security display
- hostForSecurityDisplay
- (optional)
string
Host for security display
- pathForSecurityDisplay
- (optional)
string
Path for security display
- queryForSecurityDisplay
- (optional)
string
Query for security display
- refForSecurityDisplay
- (optional)
string
ref for security display
#FileExtension
A single extension item used for filtering
Properties:
- ext
string
Extension ending, eg. 'jpg'
#SelectFileDialogType
ENUM
The type of selectfile dialog to show.
- file: This is a file select dialog.
- save_file: This is a file select dialog, allowing to choose a nonexistent file for saving.
- folder: This is a folder select dialog.
#SelectFileOptions
Option object for selectFile.
Properties:
- windowId
integer
Id of the window to show the file selection dialog against.
- title
string
Title of the file select dialog.
- type
SelectFileDialogType
Type of file select dialog, defaults to 'file'.
- accepts
- (optional)
Extensions to filter file names on.
Array
of:- FileExtension
- defaultPath
- (optional)
string
The file's default path and name.
#SelectLocalImageParams
Option object for selectLocalImage.
Properties:
- windowId
integer
Id of the window to show the file selection dialog against.
- title
string
Title for the file selection dialog.
- profileImage
- (optional)
boolean
Store the image path as the path for a custom profile avatar.
- themeId
- (optional)
string
The id of theme to store the background image in.
- thumbnailBookmarkId
- (optional)
string
The bookmark id where to store the selected local path.
#StoreImageOptions
Option object for storeImage.
Properties:
- url
- (optional)
string
The URL to read the data from. Currently only the file URL is supported.
- data
- (optional)
binary
The image data.
- mimeType
- (optional)
string
The type of the image.
- themeId
- (optional)
string
The id of theme to store the image as theme background.
#SharedDataValue
Data key+value pair.
Properties:
- key
string
The data key.
- value
any
The data value.
#DateFormats
An object containing various system date/time formats
Properties:
- shortDateFormat
string
Short date format.
- longDateFormat
string
Long date format.
- timeFormat
string
12/24 hour time format string
- firstDayOfWeek
number
The first day of the week. 0-6 (Sunday to Saturday)
#CaptureQRDestination
ENUM
Where to store the generated QR code
- dataurl: Store as a returned data url.
- file: Store in the download location.
- clipboard: Store in the clipboard
#GetVersionResults
⚠ NO DESCRIPTION PROVIDED
Properties:
- vivaldiVersion
string
The Vivaldi version as a string.
- chromiumVersion
string
The Chromium version as a string.
#TranslateError
ENUM
The error messages translate can return.
- no_error
- network
- unknown_language
- unsupported_language
- timeout
- error
#TranslateTextResponse
⚠ NO DESCRIPTION PROVIDED
Properties:
- error
TranslateError
⚠ NO DESCRIPTION PROVIDED
- detectedSourceLanguage
string
Language code of the detected language code of the provided source text, if any.
- sourceText
The original source strings.
Array
of:- string
- translatedText
The translated text corresponding to the given sourceText.
Array
of:- string
#ReadImageData
An object that defines the data read from the image file.
Properties:
- data
Read image as raw bytes.
Array
of:- integer
- type
string
Mime type of the read image.
#DirectMatchItem
A Direct match item
Properties:
- name
string
⚠ NO DESCRIPTION PROVIDED
- title
string
⚠ NO DESCRIPTION PROVIDED
- click_url
string
⚠ NO DESCRIPTION PROVIDED
- target_url
string
⚠ NO DESCRIPTION PROVIDED
- image_url
string
⚠ NO DESCRIPTION PROVIDED
- image_path
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
#onScroll
Fires for Mac when scroll device changes.
Parameters:
- scrollType
integer
Device that triggers scrolling. 1: Mouse, 2: Trackpad 3: Inertial
#onSharedDataUpdated
Fires when a shared data value has changed or been added.
Parameters:
- key
string
Name of the key for the value.
- value
any
The new value for the key.
#onSuspend
Fired when the computer is about to suspend.
#onResume
Fired when the computer has resumed from suspension.
#onPasswordIconStatusChanged
Fires for password icon status change.
Parameters:
- windowId
integer
Window id to show/hide icon for
- show
boolean
Whether to show or hide icon
#onDownloadManagerReady
Fired when the download manager has loaded all its data.
#onRazerChromaReady
Fired when the Razer Chroma API has been initialized.
#onTopSitesChanged
Fired when topsites list has changed.
#onBroadcastMessage
Test.
Parameters:
- message
BroadcastAction
The message to receive.
#onShowQRCode
Fired when Chromium wants us to show a QR code for the given url.
Parameters:
- url
string
The url to show the QR code for.
Methods
Open print preview dialog.
Parameters:
- windowId
integer
WindowId of browser printing active tab.
#clearAllRecentlyClosedSessions
Clears the list of recently closed tabs and/or windows.
#clearRecentlyClosedTabs
Clears one or more recently closed tabs.
Parameters:
- ids
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#isTabInLastSession
Checks whether a given tab is part of the last loaded session
Parameters:
- tabId
integer
The tab id to check if part of the session
#isUrlValid
Validates given URL. Returns UrlValidResults with the results.
Parameters:
- url
string
The URL to validate
#canOpenUrlExternally
Check if the browser can potentially open the URL using an external application or an extension. This should only be called if it is already known that the URL is a valid one and is not handled by the browser directly to get a valid result.
Parameters:
- url
string
The URL to check
#getUrlFragments
Splits given URL. Returns UrlFragments including top level domain which is eTLD aware.
Parameters:
- url
string
The URL to process.
#urlToThumbnailText
Gets the text for a fallback speeddial thumbnail
Parameters:
- url
string
The URL to get the text from.
#getSelectedText
Returns selected text in page with given id
Parameters:
- tabId
integer
The page to examine
#selectFile
Select a single file and returns the file name.
Parameters:
- options
SelectFileOptions
⚠ NO DESCRIPTION PROVIDED
#selectLocalImage
Ask the user to select an image file and store its path as a data mapping URL in a bookmark or a preference.
Parameters:
- params
SelectLocalImageParams
⚠ NO DESCRIPTION PROVIDED
#cleanUnusedImages
Cleans unused images (thumbnails)
Parameters:
- createdBefore
integer
Run only if createdBefore <= the number of the images created sinct the last cleanup.
#storeImage
Save image from the memory blob to the image store and return related chrome:// URL.
Parameters:
- options
StoreImageOptions
⚠ NO DESCRIPTION PROVIDED
#getVersion
Gets the Vivaldi version and Chromium versions.
#getEnvVars
Gathers values of environment variables specified in the first argument, returns a list of pairs containing keys and values (or none in case the variable does not exist)
Parameters:
- keys
list of names of environment variables
Array
of:- string
#getMediaAvailableState
Windows: Returns whether this version of the OS has media codecs installed. Might return false on N versions of Windows.
#setSharedData
Sets the given data to be kept in-memory for the duration of the Vivaldi setting (until Vivaldi exits).
Parameters:
- keyValuePair
SharedDataValue
The Key-value.
#getSharedData
Gets the given data from the in-memory storage.
Parameters:
- keyValuePair
SharedDataValue
The Key-value, the value is the default value returned if the key does not exist.
#takeMutex
Uses the in-memory storage to synchronize access to a resource accross several vivaldi extension processes (until Vivaldi exits).
Parameters:
- name
string
A name uniquely identifying the mutex.
- wait
- (optional)
boolean
Whether to wait for the mutex to be available or to to throw an error if it isn't. Defaults to true.
#releaseMutex
Relinquish use of a mutex obtained in takeSharedMutex.
Parameters:
- handle
any
The handle to the mutex, returned from takeSharedMutex.
#getSystemDateFormat
Returns various date/time system formats
#getSystemCountry
Return the system settings for the country if available.
#setLanguage
Sets the Vivaldi language code.
Parameters:
- locale
string
⚠ NO DESCRIPTION PROVIDED
#getLanguage
Gets the active Vivaldi language code.
#setVivaldiAsDefaultBrowser
Set Vivaldi as the default browser.
#isVivaldiDefaultBrowser
Is Vivaldi the default browser.
#launchNetworkSettings
Launch network settings.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
#savePage
Saves web page.
Parameters:
- tabId
integer
Id to of page being saved.
#openPage
Open web page.
Parameters:
- windowId
integer
WindowId of browser opening a local file.
#broadcastMessage
Broadcast a message to all windows. Works from regular to private windows as well.
Parameters:
- message
BroadcastAction
The message to send.
#setDefaultContentSettings
Set Vivaldi default content settings.
Parameters:
- contentSetting
string
⚠ NO DESCRIPTION PROVIDED
- value
string
⚠ NO DESCRIPTION PROVIDED
#getDefaultContentSettings
Set Vivaldi default content settings.
Parameters:
- contentSetting
string
⚠ NO DESCRIPTION PROVIDED
#setBlockThirdPartyCookies
Set Vivaldi default content settings.
Parameters:
- cookieMode
CookieMode
Cookie control for third party cookies.
#getBlockThirdPartyCookies
Set Vivaldi default content settings.
#openTaskManager
Opens Vivaldi task manager dialog.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
#createQRCode
Opens the QR Code bubble window for the given page.
Parameters:
- id
integer
The id of the page.
#getStartupAction
Returns the startup action.
#setStartupAction
Returns the startup action.
Parameters:
- startup
string
⚠ NO DESCRIPTION PROVIDED
- urls
⚠ NO DESCRIPTION PROVIDED
Array
of:- string
#canShowWhatsNewPage
Checks whether showing the What's new page is allowed.
#showPasswordDialog
Shows password manage dialog.
Parameters:
- windowId
integer
The window id the dialog belongs to.
#setDialogPosition
Sets the opening position for the given Chromium-triggered dialog.
Parameters:
- dialogName
DialogName
The window to set the position for.
- windowId
integer
The window id the dialog belongs to.
- position
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- left
integer
Anchor left position in client coordinates.
- top
integer
Anchor top position in client coordinates.
- width
integer
Anchor width.
- height
integer
Anchor height.
- flowDirection
FlowDirection
The direction the dialog should be positioned based on the rect.
#isRazerChromaAvailable
Is the Razer Chroma API available.
#isRazerChromaReady
Is the Razer Chroma API initialized and ready to accept commands.
#setRazerChromaColor
Set the color(s) for the configured Razer Chroma lights.
Parameters:
- colors
⚠ NO DESCRIPTION PROVIDED
Array
of:- Color
- Array of colors to be set for the configured lights. If multiple colors are set, it will cycle quickly between them from the first to the last.
#isDownloadManagerReady
Checks whether the download manager has initialized. If not, register for the onDownloadManagerReady event to be notified when it's ready.
#setContentSettings
Set a contentsetting for a pattern .
Parameters:
- details
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- primaryPattern
string
The pattern for the primary URL. For details on the format of a pattern, see Content Setting Patterns.
- secondaryPattern
- (optional)
string
The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns.
- type
string
The resource identifier for the content type.
- value
string
The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values.
- incognito
- (optional)
boolean
Where to set the setting (default: regular).
#isDialogOpen
Checks whether the given native dialog is open.
Parameters:
- dialogName
DialogName
Dialog name to check for visibility.
#focusDialog
Focus the named dialog so keyboard navigation within it is available.
Parameters:
- dialogName
DialogName
Dialog name to check for visibility.
#startChromecast
Shows the Chromecast dialog.
Parameters:
- windowId
integer
Window id where casting should start.
#isFirstRun
chrome::IsChromeFirstRun()
#generateQRCode
Generate a QR image based on the given data.
Parameters:
- data
string
Data to encode in the QR code. The maximum length of the data is 288 bytes.
- destination
- (optional)
CaptureQRDestination
Destination of the QR capture, defaults to 'dataurl'.
#getGAPIKey
Returns G API key.
#getVivaldiNetOAuthClientSecret
Returns Vivaldi.net OAuth client secret.
#getVivaldiNetOAuthClientId
Returns Vivaldi.net OAuth client id.
#getGOAuthClientId
Returns G OAuth API client id.
#getGOAuthClientSecret
Returns G OAuth API client secret.
#getMOAuthClientId
Returns MS OAuth API client id.
#getYOAuthClientId
Returns Yahoo OAuth client id.
#getYOAuthClientSecret
Returns Yahoo OAuth client secret.
#getFOAuthClientId
Returns Fastmail OAuth client id.
#getAOLOAuthClientId
Returns AOL OAuth client id.
#getAOLOAuthClientSecret
Returns AOL OAuth client secret.
#getCommandLineValue
Gets the command line value for the given named argument.
Parameters:
- value
string
Name of the command line switch without initial dashes eg. translate-server-url.
#hasCommandLineSwitch
Check if the command line has switch present for the given argument.
Parameters:
- value
string
Name of the command line switch without initial dashes eg. translate-server-url.
#osCrypt
⚠ NO DESCRIPTION PROVIDED
Parameters:
- plain
string
The content to encrypt
#osDecrypt
⚠ NO DESCRIPTION PROVIDED
Parameters:
- encrypted
string
The content to decrypt
#translateText
⚠ NO DESCRIPTION PROVIDED
Parameters:
- sourceLanguageCode
string
The language code of the source text, or empty if you want the server to try to detect the language.
- destinationLanguageCode
string
The destination language code.
- sourceText
The strings to translate.
Array
of:- string
#showManageSSLCertificates
Show the OS manage certificates dialog.
Parameters:
- windowId
integer
The window to use as parent window for the dialog
#setProtocolHandling
Turn on/off protocol handling for web pages.
Parameters:
- enabled
boolean
Turn on/off protocol handling for web pages.
#browserWindowReady
Signals that JS has fully set up browser window and its event listeners.
Parameters:
- windowId
number
⚠ NO DESCRIPTION PROVIDED
#readImage
Reads an image file from the file system from the specified URL to the object.
Parameters:
- url
string
⚠ NO DESCRIPTION PROVIDED
#detectNewCrashes
Checks to see if there are any new crash reports since the last function call.
#isRTL
Checks if current locale Right-To-Left locale.
#getDirectMatch
Get DirectMatch item that best matches the query
Parameters:
- query
string
The query to search in items
#emulateUserInput
Notifies render there has been user driven input. To be used when normal input is not detected in render because of blocking event loop handling (eg when menus are open).
Parameters:
- windowId
number
⚠ NO DESCRIPTION PROVIDED
#isVivaldiPinnedToLaunchBar
Check is Vivaldi pinned to the launch bar. If pinning is not available, throws an Error.
#pinVivaldiToLaunchBar
Pin Vivaldi icon to the launch bar.
#downloadsDrag
Start a native drag for the downloads items.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- downloadIds
Array of IDs of the download items to initiate the drag.
Array
of:- integer
webViewPrivate
Types
#ThumbnailParams
Object passed to various thumbnail capture functions.
Properties:
- width
- (optional)
integer
The width of the scaled output bitmap.
- height
- (optional)
integer
The height of the scaled output bitmap.
- scale
- (optional)
number
Set scale of the output bitmap, defaults to 0.5. Note that |width.height| will be used if both |scale| and |width.height| are set.
Methods
#getThumbnail
⚠ NO DESCRIPTION PROVIDED
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
- params
ThumbnailParams
⚠ NO DESCRIPTION PROVIDED
#showPageInfo
⚠ NO DESCRIPTION PROVIDED
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
- position
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- left
integer
Anchor left position, screen coordinates.
- top
integer
Anchor top position, screen coordinates.
#setIsFullscreen
⚠ NO DESCRIPTION PROVIDED
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
- isFullscreen
boolean
This is used to set a webview as fullscreen or not. This is needed for updating the pseudo-style :fullscreen when going in and out of fullscreen not via element.requestFullscreen and element.cancelFullscreen .
#getPageHistory
⚠ NO DESCRIPTION PROVIDED
Parameters:
- instanceId
integer
The instance ID of the guest
process.
#allowBlockedInsecureContent
Will load all blocked content in a page.
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
#sendRequest
Navigates the webview to a given URL but with greater control over the sent request.
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
- url
string
The URL of the page to navigate to.
- transitionType
historyPrivate.TransitionType
How the URL was reached.
- fromUrlField
boolean
Whether the request came from the url field
- usePost
boolean
Whether to perform the navigation via POST.
- postData
string
When using POST, this will be the body of the request.
- extraHeaders
string
Extra headers to pass with the request. See OpenURLParams in chromium code.
#getPageSelection
Get any selected text in the page.
Parameters:
- instanceId
integer
⚠ NO DESCRIPTION PROVIDED
windowPrivate
Types
#WindowState
ENUM
The state of this browser window.
- normal: Normal window state (i.e. not minimized, maximized, or fullscreen).
- minimized: Minimized window state.
- maximized: Maximized window state.
- fullscreen: Fullscreen window state.
#CreateWindowOptions
Object passed to the |create| function.
Properties:
- bounds
- (optional)
object
⚠ NO DESCRIPTION PROVIDED
Object Properties:
- left
- (optional)
integer
⚠ NO DESCRIPTION PROVIDED
- top
- (optional)
integer
⚠ NO DESCRIPTION PROVIDED
- width
integer
⚠ NO DESCRIPTION PROVIDED
- height
integer
⚠ NO DESCRIPTION PROVIDED
- minWidth
- (optional)
integer
⚠ NO DESCRIPTION PROVIDED
- minHeight
- (optional)
integer
⚠ NO DESCRIPTION PROVIDED
- windowDecoration
- (optional)
boolean
Enable window decoration. Defaults to false.
- incognito
- (optional)
boolean
Incogito window. Default is false.
- focused
- (optional)
boolean
If true, opens a active window. Default is true.
- state
- (optional)
WindowState
The state to set the window to. Default is normal window state (i.e. not minimized, maximized, or fullscreen).
- tabUrl
- (optional)
string
The url to be added as a new tab, this will be added to the tab model. Not used for settings, popups, etc.
- vivExtData
- (optional)
string
Extra data to attach to the window.
- windowKey
- (optional)
string
Id to identify the window. If a window with a given id is created while another window with the same id already exists, the currently opened window will be focused instead of creating a new window.
#WindowType
ENUM
The type of this browser window.
- normal: This is a normal browser window.
- settings: This is a settings window.
- popup: This is a popup window.
- devtools: This is a devtools window.
#FocusedElementInfo
Information about the HTML element having focus.
Properties:
- tagName
string
Element tag name
- type
string
Element type
- editable
boolean
True if element is editable.
- role
string
Element role
#ControlButtonsPadding
ENUM
The padding type used for drawing control buttons (macOS only)
- native: ⚠ NO DESCRIPTION PROVIDED
- lightPadding: ⚠ NO DESCRIPTION PROVIDED
- mediumPadding: ⚠ NO DESCRIPTION PROVIDED
- heavyPadding: ⚠ 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
#onWindowDidChangeScreens
Fired when the window has changed screens include a parameter that says whether the new screen has a notch.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- hasNotch
boolean
Screen has a notch (true) or without notch (false).
#onStateChanged
Fired when the window state changes (minimize/maximize/fullscreen).
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- state
WindowState
The new state set to the window.
#onPositionChanged
Fired when the window changes position.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
#onActivated
Fired when the window changes activation.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- activated
boolean
Changed activation state.
#onBeforeUnloadDialogOpened
Fired when a beforeunload dialog is shown for a tab.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- tabId
integer
⚠ NO DESCRIPTION PROVIDED
#onWindowClosed
Fired when a window is closed, even for guest windows.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
#onPageInfoPopupChanged
Fired when a page information popup visibility changes.
Parameters:
- windowId
integer
⚠ NO DESCRIPTION PROVIDED
- visible
boolean
⚠ NO DESCRIPTION PROVIDED
#onActiveTabStatusText
Fired when the active tab has new loadstate text. Will reset to Parameters: ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Fired when the webcontents has a window object. chrome.windows.getviews find this now. Parameters: ⚠ NO DESCRIPTION PROVIDED Create a window with additional Vivaldi specific properties. Parameters: Url to page to show as the full window UI of the new window. ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Returns the window id of the window we are currently running inside. Sets the window state. Parameters: The window id of the window to change the state for. The state to set the window to. Notify C++ about the position of the maximize button to show extra native GUI like the split window menu in Windows 11. Parameters: The window id of the window to update the coordinates of the maximize button. ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Get information about currently focused element in Vivaldi window or any of its webviews. Parameters: ⚠ NO DESCRIPTION PROVIDED Returns true if the screen the window is on has a notch. Parameters: ⚠ NO DESCRIPTION PROVIDED Request a new control buttons position. Parameters: ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Performs a haptic feedback. Each listener type has the same functions, used for each listener API in the same way: Adds a function to a listener for an event Removes a function to a listener for an event Returns a boolean if a function is attached to a listener for an event Returns a boolean if a listener has any attached functions Returns array of promises dispatched to the listener Fired when the default zoom changes. Parameters: The new zoom level Fired when the UI zoom changes. Parameters: The new UI zoom level ⚠ NO DESCRIPTION PROVIDED Parameters: The new value for Vivaldi UI zoom factor. ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Parameters: The new Vivaldi default global zoom factor. ⚠ NO DESCRIPTION PROVIDED Each listener type has the same functions, used for each listener API in the same way: Adds a function to a listener for an event Removes a function to a listener for an event Returns a boolean if a function is attached to a listener for an event Returns a boolean if a listener has any attached functions Returns array of promises dispatched to the listener Fired when the default zoom changes. Parameters: The new zoom level Fired when the UI zoom changes. Parameters: The new UI zoom level ⚠ NO DESCRIPTION PROVIDED Parameters: The new value for Vivaldi UI zoom factor. ⚠ NO DESCRIPTION PROVIDED ⚠ NO DESCRIPTION PROVIDED Parameters: The new Vivaldi default global zoom factor. ⚠ NO DESCRIPTION PROVIDEDinteger
string
#onWebContentsHasWindow
integer
Methods
#create
string
CreateWindowOptions
WindowType
#getCurrentId
#setState
integer
WindowState
#updateMaximizeButtonPosition
integer
number
number
number
number
#getFocusedElementInfo
integer
#isOnScreenWithNotch
integer
#setControlButtonsPadding
integer
ControlButtonsPadding
#performHapticFeedback
zoom
Listeners
How to use listeners
.addListener(
function
callback).removeListener(
function
callback).hasListener(
function
callback).hasListeners()
.dispatch()
#onDefaultZoomChanged
number
#onUIZoomChanged
number
Methods
#setVivaldiUIZoom
number
#getVivaldiUIZoom
#setDefaultZoom
number
#getDefaultZoom
preferenceDefinitions
Listeners
How to use listeners
.addListener(
function
callback).removeListener(
function
callback).hasListener(
function
callback).hasListeners()
.dispatch()
#onDefaultZoomChanged
number
#onUIZoomChanged
number
Methods
#setVivaldiUIZoom
number
#getVivaldiUIZoom
#setDefaultZoom
number
#getDefaultZoom