FUEL/0.2/Plan
Jump to navigation
Jump to search
< FUEL/0.2
Due Date: Feb 28, 2007
Deliverable: Complete API
File I/0
TBD
Bookmarks
- Add A Bookmark
- Browse Bookmarks
Example:
var b = Bookmarks.getAll(); while ( b.hasNext() ) { var cur = b.next(); console.log( "title", cur.title ); } Bookmarks.add({ title: "Foo Bar", url: "http://mozilla.org/" });
Storage (SQLite)
- Attach to an existing SQLite DB
- Create DB
- Perform a basic query
- Get JS-object results back
Example:
var db = new Storage("myfile.db"); var q = db.prepare("SELECT * FROM foo WHERE foo = ?;"); q.execute( "bar" ); while ( q.hasNext() ) { var row = q.next(); console.log( "foo", row.foo ); console.log( "username", row.username ); }
Application Storage
see: http://www.xulplanet.com/ndeakin/article/359/
- Allows extensions to store state during lifetime of application
- Model on DOM:Storage API
Example:
Application.storage.set("password", "jimmy01"); Extension.storage.set("blockedpagecount", "20");