adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

IE/Edge + text-encoding #127

Closed oliverfoster closed 4 years ago

oliverfoster commented 5 years ago

In IE/Edge, if including the xapiwrapper.js in isolation as detailed in the README, sending string attachments isn't possible as the text-encoding library isn't listed as a requirement and therefore no TextEncoder is available in the browser.

<script type="text/javascript" src="./src/xapiwrapper.js"></script>

browser support table TextEncoder use part 1 TextEncoder use part 2

oliverfoster commented 5 years ago

A possible solution is to remove the text-encoding dependency and replace with a smaller shim for utf8 only - some like https://gist.github.com/Yaffle/5458286

Only distributing the code as a bundled, minified library by removing the case for including the src files in the browser independently, might simplify the code base somewhat. I've posted a question about this at #131