Added a save hook into the DOMExporter.