event.details value is dependent on file type, so for json the value of event.details would be an object and for html or xml it would be a document. Otherwise event.details value is text.
-- edit
To send back the appropriate type I added a logical if switch that changes the [xhr.responseType] dependent on the file extension of the request.
event.details value is dependent on file type, so for
json
the value of event.details would be an object and forhtml or xml
it would be a document. Otherwise event.details value is text.-- edit
To send back the appropriate type I added a logical if switch that changes the
[xhr.responseType]
dependent on the file extension of the request.