2008年5月1日星期四

Open fire Bookmark

http://developer.mozilla.org/en/docs/Places:Bookmarks_Service

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

没有评论: