BookmarkTreeNode class
A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
class BookmarkTreeNode extends ChromeObject {
BookmarkTreeNode({String id, String parentId, int index, String url, String title, var dateAdded, var dateGroupModified, List<BookmarkTreeNode> children}) {
if (id != null) this.id = id;
if (parentId != null) this.parentId = parentId;
if (index != null) this.index = index;
if (url != null) this.url = url;
if (title != null) this.title = title;
if (dateAdded != null) this.dateAdded = dateAdded;
if (dateGroupModified != null) this.dateGroupModified = dateGroupModified;
if (children != null) this.children = children;
}
BookmarkTreeNode.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
/**
* The unique identifier for the node. IDs are unique within the current
* profile, and they remain valid even after the browser is restarted.
*/
String get id => jsProxy['id'];
set id(String value) => jsProxy['id'] = value;
/**
* The `id` of the parent folder. Omitted for the root node.
*/
String get parentId => jsProxy['parentId'];
set parentId(String value) => jsProxy['parentId'] = value;
/**
* The 0-based position of this node within its parent folder.
*/
int get index => jsProxy['index'];
set index(int value) => jsProxy['index'] = value;
/**
* The URL navigated to when a user clicks the bookmark. Omitted for folders.
*/
String get url => jsProxy['url'];
set url(String value) => jsProxy['url'] = value;
/**
* The text displayed for the node.
*/
String get title => jsProxy['title'];
set title(String value) => jsProxy['title'] = value;
/**
* When this node was created, in milliseconds since the epoch (`new
* Date(dateAdded)`).
*/
dynamic get dateAdded => jsProxy['dateAdded'];
set dateAdded(var value) => jsProxy['dateAdded'] = jsify(value);
/**
* When the contents of this folder last changed, in milliseconds since the
* epoch.
*/
dynamic get dateGroupModified => jsProxy['dateGroupModified'];
set dateGroupModified(var value) => jsProxy['dateGroupModified'] = jsify(value);
/**
* An ordered list of children of this node.
*/
List<BookmarkTreeNode> get children => listify(jsProxy['children'], _createBookmarkTreeNode);
set children(List<BookmarkTreeNode> value) => jsProxy['children'] = jsify(value);
}
Extends
ChromeObject > BookmarkTreeNode
Constructors
new BookmarkTreeNode({String id, String parentId, int index, String url, String title, dateAdded, dateGroupModified, List<BookmarkTreeNode> children}) #
Create a new instance of a ChromeObject, which creates and delegates to
a JsObject proxy.
BookmarkTreeNode({String id, String parentId, int index, String url, String title, var dateAdded, var dateGroupModified, List<BookmarkTreeNode> children}) {
if (id != null) this.id = id;
if (parentId != null) this.parentId = parentId;
if (index != null) this.index = index;
if (url != null) this.url = url;
if (title != null) this.title = title;
if (dateAdded != null) this.dateAdded = dateAdded;
if (dateGroupModified != null) this.dateGroupModified = dateGroupModified;
if (children != null) this.children = children;
}
new BookmarkTreeNode.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject, which delegates to the given
JsObject proxy.
BookmarkTreeNode.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
Properties
List<BookmarkTreeNode> children #
An ordered list of children of this node.
List<BookmarkTreeNode> get children => listify(jsProxy['children'], _createBookmarkTreeNode);
set children(List<BookmarkTreeNode> value) => jsProxy['children'] = jsify(value);
var dateAdded #
When this node was created, in milliseconds since the epoch (new
Date(dateAdded)).
dynamic get dateAdded => jsProxy['dateAdded'];
set dateAdded(var value) => jsProxy['dateAdded'] = jsify(value);
var dateGroupModified #
When the contents of this folder last changed, in milliseconds since the epoch.
dynamic get dateGroupModified => jsProxy['dateGroupModified'];
set dateGroupModified(var value) => jsProxy['dateGroupModified'] = jsify(value);
String id #
The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
String get id => jsProxy['id'];
set id(String value) => jsProxy['id'] = value;
int index #
The 0-based position of this node within its parent folder.
int get index => jsProxy['index'];
set index(int value) => jsProxy['index'] = value;
String parentId #
The id of the parent folder. Omitted for the root node.
String get parentId => jsProxy['parentId'];
set parentId(String value) => jsProxy['parentId'] = value;
String title #
The text displayed for the node.
String get title => jsProxy['title'];
set title(String value) => jsProxy['title'] = value;
String url #
The URL navigated to when a user clicks the bookmark. Omitted for folders.
String get url => jsProxy['url'];
set url(String value) => jsProxy['url'] = value;
Methods
String toString() #
Returns a string representation of this object.
String toString() => jsProxy.toString();