Initiating the Bookmarks Service
var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Components.interfaces.nsINavBookmarksService);
Corresponding function inserts a child bookmark into the given folder. If this item already exists in the given folder, it will be moved to the new position.
long long insertBookmark (in long long aParentFolder, //aParentFolder = the id of the parent folder
in nsIURI aURI, //aURI = the URI to insert
in long aIndex, //aIndex = the index to insert at, or -1 to append
in AString aTitle //aTitle = the title of the new bookmark
)
Returns:
The ID of the newly-created bookmark
没有评论:
发表评论