some damn DOM fix for this damned browser
dispatchEventfor IE8 including custom bubbling events
currentTargetproperties per each event
document.createEvent('Event')standard API with
e.initEvent(type, bubbles, cancelable)supported too
stopImmediatePropagation()working with both synthetic and real events
document.addEventListener('DOMContentLoaded', callback, false)supported
Here a page example
ie8<!--[if IE 8]><script src="ie8.js"></script><![endif]-->
It is now possible to include this file through cdnjs
<!--[if IE 8]><scriptsrc="//cdnjs.cloudflare.com/ajax/libs/ie8/0.5.0/ie8.js"></script><![endif]-->
This polyfill normalize the EventTarget interface for every node.
If you'd like to upgrade even more IE8 capabilities, consider adding dom4 polyfills after
That would provide enough horse-powers to hazard CustomElement polyfill on top.
Here a humble list of things what won't probably ever be fixed in IE8
useCaptureflag is used, the event is prepended instead of appended simulating somehow the 99% of the time reason we might opt for the
capturephase, being this usually slower too so it's a good practice, in any case, to
DOMContentLoadeda part, such
transitionendor similar. As events might exist and might not exist in any browser out there, it does not make sense to fix them here. However, this polyfill provides all needed tools to fix special events through a powerful, custom events compatible, W3C standard API
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.
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.