Serialize a DOM event to JSONML-based representation