mozilla

Compare Revisions

fuelIAnnotations

Change Revisions

Revision 168372:

Revision 168372 by Potappo on

Revision 168373:

Revision 168373 by MarkFinkle on

Title:
fuelIAnnotations
fuelIAnnotations
Slug:
Toolkit_API/FUEL/fuelIAnnotations
Toolkit_API/FUEL/fuelIAnnotations
Tags:
XPCOM, Interfaces, FUEL, Firefox, "XPCOM API Reference"
XPCOM, Interfaces, FUEL, Firefox, "XPCOM API Reference"
Content:

Revision 168372
Revision 168373
tt182    <h2 name="Examples">
183      Examples
184    </h2>
185    <pre>
186const NEVER_EXPIRE = 0;
187 
188function url(spec) {
189  var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci
 >.nsIIOService);
190  return ios.newURI(spec, null, null);
191}
192 
193var bookmark = Application.bookmarks.menu.addBookmark("Mozilla", 
 >url("http://www.mozilla.com/"));
194bookmark.annotations.set("mystuff/public", true, NEVER_EXPIRE);
195bookmark.annotations.set("mystuff/rating", 5, NEVER_EXPIRE);
196 
197alert(bookmark.annotations.get("mystuff/rating"));
198 
199bookmark.annotations.remove("mystuff/rating");
200</pre>

Back to History