Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving should support a respecEvent #335

Merged
merged 2 commits into from Sep 22, 2014
Merged

Conversation

halindrome
Copy link
Contributor

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.

Add event notifications to the save functions so that specifications can, if they wish, subscribe to the events to do processing prior to saving a snapshot (e.g., if a spec has some dynamic content and the author wants to be certain it is in a base state before saving).
Moved the calls to respecEvents.pub into the toString and toXML
methods so that they get called even in the event of a browser that
supports direct downloading.
@halindrome
Copy link
Contributor Author

Does anyone have an objection to my merging in this pull request?

halindrome added a commit that referenced this pull request Sep 22, 2014
Saving should support a respecEvent
@halindrome halindrome merged commit be5e51d into w3c:develop Sep 22, 2014
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant