main/bookmarks
Classes
Section titled “Classes”Bookmarks
Section titled “Bookmarks”Defined in: app/src/main/bookmarks.ts:14
The bookmarks in the browser process: which addresses have a bookmark, for the star in the address bar, and the changes that the star and the bookmarks page make. The addresses load with the first web page a tab shows, so the data service does not start for a window that shows only the browser’s own pages.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Bookmarks(
data,router,internal,onChange,logger):Bookmarks
Defined in: app/src/main/bookmarks.ts:33
Parameters
Section titled “Parameters”The data service.
router
Section titled “router”IPC router, to tell open bookmarks pages about changes.
internal
Section titled “internal”Session
Session of the browser’s own pages.
onChange
Section titled “onChange”() => void
Called when the bookmarked addresses changed, to update the shells.
logger
Section titled “logger”Receives failures.
Returns
Section titled “Returns”Methods
Section titled “Methods”barItems()
Section titled “barItems()”barItems():
object[]
Defined in: app/src/main/bookmarks.ts:62
The items of the bookmarks bar. The first call loads the bookmarks; the shells update when they arrive.
Returns
Section titled “Returns”object[]
changed()
Section titled “changed()”changed():
Promise<void>
Defined in: app/src/main/bookmarks.ts:104
Loads the bookmarked addresses again and tells the shells and bookmarks pages.
Returns
Section titled “Returns”Promise<void>
contents()
Section titled “contents()”contents(
folder):BookmarkEntry[]
Defined in: app/src/main/bookmarks.ts:71
The bookmarks and folders in a folder, in their order.
Parameters
Section titled “Parameters”folder
Section titled “folder”number
The folder’s id.
Returns
Section titled “Returns”has(
url):boolean
Defined in: app/src/main/bookmarks.ts:52
Whether a page has a bookmark. The first web page loads the bookmarked addresses; the shells update when they arrive.
Parameters
Section titled “Parameters”string
The page’s address.
Returns
Section titled “Returns”boolean
toggle()
Section titled “toggle()”toggle(
url,title):void
Defined in: app/src/main/bookmarks.ts:82
Adds a bookmark for a page to the bookmarks bar, or removes every bookmark of the page.
Parameters
Section titled “Parameters”string
The page’s address.
string
The page’s title.
Returns
Section titled “Returns”void
Interfaces
Section titled “Interfaces”BookmarkEntry
Section titled “BookmarkEntry”Defined in: app/src/main/bookmarks.ts:128
A bookmark or folder; folders have no address.
Properties
Section titled “Properties”
readonlyid:number
Defined in: app/src/main/bookmarks.ts:129
parentId
Section titled “parentId”
readonlyparentId:number|null
Defined in: app/src/main/bookmarks.ts:130
readonlytitle:string
Defined in: app/src/main/bookmarks.ts:131
readonlyurl:string|null
Defined in: app/src/main/bookmarks.ts:132