gabrieldoty / simplify-scorm

Scorm 1.2 Javascript API
MIT License
230 stars 77 forks source link

Add ability to load CMI data from a JSON object #10

Closed xob closed 6 years ago

xob commented 6 years ago

I had to place the method on window.API itself instead of on the cmi because I needed access to the setCMIValue method, and I didn't want to expose it so that the cmi object could access it.

So, instead of having a nicer-named window.API.cmi.fromJSON(), here is my take on window.API.loadFromJSON()

I also added an example on the README