RusticiSoftware / TinCanJS

JavaScript library for the Experience API (Tin Can API)
http://rusticisoftware.github.io/TinCanJS/
Apache License 2.0
207 stars 115 forks source link

Fix is for browser support in IE < 9 #22

Closed brianjmiller closed 11 years ago

brianjmiller commented 11 years ago

This is exposed by the prototypes when running from IE 8 (or earlier) and is from some really old code from TCDriver. Bit of a miracle it hasn't been exposed until now. In practice this change is exercised by the request complete function in LRS' sendRequest method for IE cross domain requests, but it should be safe to shim the global with this fix which will only happen when something else hasn't already shimmed it. Will test as part of prototypes update, but need upstream merge first. (Some day [soon] we'll have better unit tests.)

tseabrooks commented 11 years ago

This looks good. My only thinking is that there should be some sort've standard "shim.js" that has these sorts of things in it that we can include with all of our JS. Either community provided or internally provided. Not a task for today, just seems like the sort've thing you shouldn't rediscover on each new project.

@bscSCORM Off to QA.

brianjmiller commented 11 years ago

On 2/27/13 10:10 AM, Thomas Seabrooks wrote:

This looks good. My only thinking is that there should be some sort've standard "shim.js" that has these sorts of things in it that we can include with all of our JS. Either community provided or internally provided. Not a task for today, just seems like the sort've thing you shouldn't rediscover on each new project.

Yeah, there are a bunch of them. Balance between dependency hell, light weightedness, and avoiding this BS completely. So far we've dealt with the BS in favor of the other two. Since this is primarily a non-DOM oriented lib I'm inclined to continue this path. As soon as you start dealing with DOM then it gets real silly, real quick.

Brian J. Miller Rustici Software brian.miller@scorm.com