Implement remaining bookmarks.onImportBegan and onImportEnded WebExtensions API events

NEW
Assigned to

Status

()

Toolkit
WebExtensions: Compatibility
P3
normal
6 months ago
4 months ago

People

(Reporter: bsilverberg, Assigned: mstriemer)

Tracking

(Blocks: 1 bug, {dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bookmarks]triaged)

(Reporter)

Description

6 months ago
Bug #1221764 implements onCreated, onChanged, onMoved and onRemoved, which are the most commonly used events. Based on the Chrome spec [1], there are still a few missing:

- onChildrenReordered
- onImportBegan
- onImportEnded

[1] https://developer.chrome.com/extensions/bookmarks
Keywords: dev-doc-needed
(Reporter)

Comment 1

5 months ago
I looked into Chrome's onChildrenReordered event, and I don't think it would ever fire from Firefox. As per the docs [1], and my testing, it never fires as the result of manually executing a move, even if you are using the UI to reorder child bookmarks in a folder. The only time it fires is if you use the "Reorder by Title" menu item that appears in a submenu under "Organize" from the Bookmark Manager. I do not think Firefox has an equivalent function, and therefore the case that would cause onChildrenReordered to fire could never happen in Firefox. Do you agree, Kris?

[1] https://developer.chrome.com/extensions/bookmarks#event-onChildrenReordered
Flags: needinfo?(kmaglione+bmo)

Comment 2

5 months ago
Yeah. Maybe we should just implement it as a stub.
Flags: needinfo?(kmaglione+bmo)
(Reporter)

Comment 3

5 months ago
Updating this to only be about implementing onImportBegan and onImportEnded.
No longer depends on: 1221764
Priority: -- → P3
Summary: Implement remaining chrome.bookmarks events → Implement remaining bookmarks.onImportBegan and onImportEnded WebExtensions API events
Whiteboard: [bookmarks] → [bookmarks]triaged

Comment 4

4 months ago
Presumably this would mean implementing bookmarks.import and export
Assignee: nobody → mstriemer
(Reporter)

Comment 5

4 months ago
Not really. Even without those API methods, import and export functions can be invoked by a user, which would then result in these events firing. In fact, Chrome doesn't even have import or export methods in their bookmarks API [1], so this would not be a matter of Chrome parity, but rather would be new APIs if we were to implement them.

[1] https://developer.chrome.com/extensions/bookmarks

Comment 6

4 months ago
Fair enough then, let's skip those methods and focus on the events.
You need to log in before you can comment on or make changes to this bug.