View on GitHub

Ie8

some damn DOM fix for this damned browser

Download this project as a .zip file Download this project as a tar.gz file

ie8

in a nutshell

that's pretty much it for now ...

current tests file and live test page

how to include the project

Here a page example

<!doctype html>
<html>
  <head>
    <title>ie8</title>
    <!--[if IE 8]><script src="ie8.js"></script><![endif]-->
    <script>
    this.addEventListener('load', function(e) {
      alert('Hello Standards');
    });
    </script>
  </head>
</html>

The file can be either the full version or the minified one and could be placed before or after some third parts library accordingly with compatibility.

W3C DOM Level 2

This polyfill normalize the EventTarget interface for every node.

This shim normalizes the DOM Level 2 Event interface too, adding an extra DOM Level 3 .stopImmediatePropagation() as bonus.

known gotchas

Here a humble list of things what won't probably ever be fixed in IE8

possible troubleshooting

Some library could do weak features detection and decide the browser is IE8 regardless and threat it like that, some other might assume since this stuff is there and working much more should be possible too.

Well, in 4 years of problems and counting, I have no idea about how many libraries still do work arounds for IE8 but if your libraries are ignoring such browser you might want to add this file regardless and probably find IE8 automagically fixed for all your JS needs.

about

The very first thought I had about this project was: how the hack is possible nobody had gone down this road before?

I am still thinking the same so ... there might be many things this polyfill is not fixing (yet). If you have any specific request please file a feature request (or a bug) in the proper section.

It's about IE8 so I am expecting 23456789065123456789 tickets about problems each day so probably only most relevant will be considered due the amount of time it might take.

Thanks for your contribution and your understanding.

author

twitter/WebReflection
Andrea Giammarchi