x-tag / core-2

X-Tag 2 - A tiny Web Components library that packs a big punch
MIT License
37 stars 8 forks source link

added feature #6

Closed ghost closed 7 years ago

ghost commented 7 years ago

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.