Bug 1688827 [wpt PR 27325] - Test cases where request body gets used before network...
[gecko.git] / editor / nsIEditActionListener.idl
blobdc9f3862c4a8640f3124192f080a6849999901fb
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
7 #include "domstubs.idl"
9 webidl CharacterData;
10 webidl Node;
11 webidl Range;
14 Editor Action Listener interface to outside world
18 /**
19 * A generic editor action listener interface.
20 * <P>
21 * nsIEditActionListener is the interface used by applications wishing to be notified
22 * when the editor modifies the DOM tree.
24 * Note: this is the wrong class to implement if you are interested in generic
25 * change notifications. For generic notifications, you should implement
26 * nsIDocumentObserver.
28 [scriptable, uuid(b22907b1-ee93-11d2-8d50-000064657374)]
29 interface nsIEditActionListener : nsISupports
31 /**
32 * Called after the editor deletes a node.
33 * @param aChild The node to delete
34 * @param aResult The result of the delete node operation.
36 void DidDeleteNode(in Node aChild, in nsresult aResult);
38 /**
39 * Called after the editor joins 2 nodes.
40 * @param aLeftNode This node will be merged into the right node
41 * @param aRightNode The node that will be merged into.
42 * There is no requirement that the two nodes be of
43 * the same type.
44 * @param aParent The parent of aRightNode
45 * @param aResult The result of the join operation.
47 void DidJoinNodes(in Node aLeftNode,
48 in Node aRightNode,
49 in Node aParent,
50 in nsresult aResult);
52 /**
53 * Called after the editor inserts text.
54 * @param aTextNode This node getting inserted text.
55 * @param aOffset The offset in aTextNode to insert at.
56 * @param aString The string that gets inserted.
57 * @param aResult The result of the insert text operation.
59 void DidInsertText(in CharacterData aTextNode,
60 in long aOffset,
61 in AString aString,
62 in nsresult aResult);
64 /**
65 * Called before the editor deletes text.
66 * @param aTextNode This node getting text deleted.
67 * @param aOffset The offset in aTextNode to delete at.
68 * @param aLength The amount of text to delete.
70 void WillDeleteText(in CharacterData aTextNode,
71 in long aOffset,
72 in long aLength);
74 /**
75 * Called before the editor deletes the ranges.
76 * @param aRangesToDelete The ranges to be deleted.
78 void WillDeleteRanges(in Array<Range> aRangesToDelete);