TreeWalker

TreeWalker

new TreeWalker(rootBookmark)

Source:
Example
import { BookmarksDocument } from "@thoughtsunificator/bookmarks-document"

const bookmarksDocument = new BookmarksDocument()

const treeWalker = bookmarksDocument.createTreeWalker(element)
const bookmarksList = []
while (treeWalker.nextBookmark()) {
	bookmarksList.push(treeWalker.currentBookmark)
}
Parameters:
Name Type Description
rootBookmark BookmarkFolder

Methods

parentBookmark() → {BookmarkFolder}

Source:
Returns:
Type
BookmarkFolder

nextBookmark() → {Bookmark}

Source:
Returns:
Type
Bookmark