Bug 469441 Comment 44 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to fluks from comment #42)
> (In reply to Marco Bonardo [::mak] from comment #41)
> > I'd be ok extending PlacesUtils.bookmarks.fetch to also fetch the path of a bookmark if a specific option is passed into it (so, on demand).
> 
> Do you mean having an about:config entry?

no, a property of the options object that is passed to fetch()
(In reply to fluks from comment #42)
> (In reply to Marco Bonardo [::mak] from comment #41)
> > I'd be ok extending PlacesUtils.bookmarks.fetch to also fetch the path of a bookmark if a specific option is passed into it (so, on demand).
> 
> Do you mean having an about:config entry?

no, a property of the options object that is passed to fetch()
I was thinking about something like `let bm = await PlacesUtils.bookmarks.fetch(guid, undefined, { includePath: true });` and you'd get back a bookmark object that includes a `path` property, that may be something like `[ {guid, title}, {guid, title}, ... ]` starting from the parent up to the first meaningful root (toolbar, menu, unfiled, mobile, ...).
(In reply to fluks from comment #42)
> (In reply to Marco Bonardo [::mak] from comment #41)
> > I'd be ok extending PlacesUtils.bookmarks.fetch to also fetch the path of a bookmark if a specific option is passed into it (so, on demand).
> 
> Do you mean having an about:config entry?

no, a property of the options object that is passed to fetch()
I was thinking about something like `let bm = await PlacesUtils.bookmarks.fetch(guid, undefined, { includePath: true });` and you'd get back a bookmark object that includes a `path` property, that may be something like `[ {guid, title}, {guid, title}, ... ]` starting from the parent up to the first meaningful root (toolbar, menu, unfiled, mobile, ...).

You could start filing a dependency bug in toolkit /Places to add that, then here you'd use that API to implement the feature in browser.

Back to Bug 469441 Comment 44