Go back to top

vivaldi.bookmarkContextMenu Modders API Reference

Use the vivaldi.bookmarkContextMenu API to show a bookmark menu for the bookmark bar.

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.