ded / domready

lets you know when the dom is ready
MIT License
874 stars 129 forks source link

Notifications about IE support #28

Closed ghost closed 10 years ago

ghost commented 10 years ago

Good day,

I've "broken" one of my project today while updating to version 1.0.4. Could you add a notification somewhere to tell people that 0.3.0 is the latest version supporting IE < 9 please ? That could prevent other developers to do the same mistake.

XP is still supported until April 2014, XP malware and maybe other stuff until 2015 so I still expect to get IE8 users in the next few years with my current client projects.

I suppose by reading the tweet from https://twitter.com/ender/status/434784161568538624 there is a news somewhere about dropping support for IE8 and below but I didn't catch it :-/ Any place to stay tuned ?

Thank you :-)

patik commented 10 years ago

Is there any reason why support was dropped for IE (namely support for attachEvent)? I need to support IE8 (I'm guessing most projects still do, unfortunately). I've had to modify my copy and it only adds 7 lines to the development version (146 characters minified).

Before:

if (!loaded)
  doc.addEventListener(domContentLoaded, listener = function () {
    doc.removeEventListener(domContentLoaded, listener)
    loaded = 1
    while (listener = fns.shift()) listener()
  })

After:

if (!loaded)  
  doc.addEventListener ?
    doc.addEventListener(domContentLoaded, listener = function () {
      doc.removeEventListener(domContentLoaded, listener)
      loaded = 1
      while (listener = fns.shift()) listener()
    }) :

    doc.attachEvent('load', listener = function () {
      doc.detachEvent('load', listener)
      loaded = 1
      while (listener = fns.shift()) listener()
    })
ded commented 10 years ago

Hi there, I haven't done the due diligence making an official notice, but I've slowly been dropping < IE9 support. It's in the readme about the new browser support, there just isn't a full statement.

The good news I still cut a release at 0.3.0 and supports back to IE6 if this is what you desire.

I'll add a deprecation notice shortly