564
edits
| Line 24: | Line 24: | ||
// let's work out the minimal amount of API here | // let's work out the minimal amount of API here | ||
jetpack.places.find(cnn.com); // searches both History and Bookmarks | let places = jetpack.places.find("cnn.com"); // searches both History and Bookmarks | ||
// 'places' looks like an array of objects: | |||
[ | |||
{ url:"cnn.com", kind: 'history', visitDate: '2009-11-20 12:00:09', ... }, | |||
{ url: "video.cnn.com", kind: 'bookmark', lastVisit: '2009-11-03 09:45:23', ...} | |||
] | |||
jetpack.bookmarks.find("cnn.com") // only search bookmarks | let places = jetpack.history.find("cnn.com"); // only search history | ||
let places = jetpack.bookmarks.find("cnn.com") // only search bookmarks | |||
</pre> | </pre> | ||
edits