Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Add API dox for Editor.addEventListener, with possible event ids and …
Browse files Browse the repository at this point in the history
…error codes
  • Loading branch information
Friedrich W. H. Kossebau committed Dec 3, 2013
1 parent 50f18a1 commit 62db9e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions programs/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 62db9e2

Please sign in to comment.