darobin/respec — pull request #335 by halindrome (2014-08-20 18:56:34+00:00)
Title: Saving should support a respecEvent

Added calls to respecEvents.pub in the various save methods so that a spec author can subscribe to those methods and perform a cleanup on their specification if they need to before the static version is generated.

NOTE: There is no obvious way to add an automated test for this. I have tested it by the simple expedient of adding a respecEvents.sub("save", function(det) { window.alert("save called with "+det);}) to a document I was working on. The alert was correctly displayed.