From 62db9e22fecbec5f2c6bc8b2c5a2406229f17ff6 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 3 Dec 2013 17:02:46 +0100 Subject: [PATCH] Add API dox for Editor.addEventListener, with possible event ids and error codes --- programs/editor/Editor.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/programs/editor/Editor.js b/programs/editor/Editor.js index 33b46507..22bab2a7 100644 --- a/programs/editor/Editor.js +++ b/programs/editor/Editor.js @@ -333,6 +333,20 @@ define("webodf/editor/Editor", [ }; /** + * Allows to register listeners for certain events. Currently + * available events are, with the type of the argument passed to the callback: + * Editor.EVENT_BEFORESAVETOFILE - no argument + * Editor.EVENT_SAVEDTOFILE - no argument + * Editor.EVENT_HASLOCALUNSYNCEDOPERATIONSCHANGED - boolean, reflecting new hasLocalUnsyncedOperations state + * Editor.EVENT_HASSESSIONHOSTCONNECTIONCHANGED - boolean, reflecting new hasSessionhostConnection state + * Editor.EVENT_ERROR - string, one of these errorcodes: + * "notMemberOfSession" + * "opExecutionFailure" + * "sessionDoesNotExist" + * "unknownOpReceived" + * "unknownServerReply" + * "unresolvableConflictingOps" + * * @param {!string} eventid * @param {!Function} listener * @return {undefined}