Get Google Chrome's root bookmarks folder

后端 未结 3 1659
遥遥无期
遥遥无期 2021-01-31 06:53

I\'m trying to write a better bookmark manager in Chrome extensions. The problem is that there are no simple examples (that I can find) about how to actually use the bookmarks A

3条回答
  •  醉酒成梦
    2021-01-31 07:00

    Bookmarks are organized in a tree, where each node in the tree is either a bookmark or a group (a folder that can contain nodes). Each node in the tree is represented by a BookmarkTreeNode object.

    There is no root bookmarks folder in the sense of a file system object. All the bookmarks are stored in a structured file that you access through the api in the link you provided. The root of the tree is returned by getTree:

    chrome.bookmarks.getTree
    

提交回复
热议问题