Open Bug 1595802 Opened 5 years ago Updated 3 years ago

Consider converting nsITransaction* to WebIDL, adding async transactions

Categories

(Core :: DOM: Editor, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: WeirdAl, Unassigned)

Details

For a long time, I've thought about how nice it would be to have asynchronous transactions (where the *doTransaction methods return Promise<void>).

I've experimented with them a little bit, using a JavaScript implementation and a non-native editing environment. They allow me to construct transactions with control panels.

Another potential benefit might be in collaborative editing, where several people are working on a particular document simultaneously. Google Docs has that, but this combined with HTML editing could mean native collaborative editing of rich HTML documents.

Downsides:
(1) Would the other browsers implement something similar? I have done no research into this.
(2) The nsITransaction* interfaces would all need to be rewritten in WebIDL. Would that be acceptable?

I'd be willing to do the work, as a low-priority item.

Priority: -- → P3

I would like to get a rid of nsITransation XPCOM from editor, and add any new C++ transaction code (non-scriptable) for editor only. Since it seems to use this in non-editor components (places? and c-c), we still keep this (or we may move this to c-c at the future). If some modules wants transaction related code, it should create own API, not using nsITransaction.

Priority: P3 → P5

Well, and the editor's transaction items will need to be UndoItems of Undo API. So, I really don't like that the editor's transaction manager and transaction items are used by any other modules.

I'd forgotten that I had a hand in that API spec (eight years ago)... I do note that it doesn't have the async feature I was looking for, though.

Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.