Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


some damn DOM fix for this damned browser

Subscribe to updates I use ie8

Statistics on ie8

Number of watchers on Github 285
Number of open issues 0
Average time to close an issue 14 days
Main language JavaScript
Average time to merge a PR 2 days
Open pull requests 1+
Closed pull requests 4+
Last commit over 2 years ago
Repo Created about 7 years ago
Repo Last Updated over 2 years ago
Size 866 KB
Organization / Authorwebreflection
Page Updated
Do you use ie8? Leave a review!
View ie8 activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating ie8 for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

ie8 donate


This is year 2017. IE8 was released in 2009. You should not support IE8 anymore.

Not even transpilers support it. Be sure you actually really need this polyfill, testing your projects via real IE8 and not some IE11 emulator.

FYI this repository is slowly going to die as it should be. If I were you, I wouldn't wait for updates here or waste time for this browser.

in a nutshell

  • addEventListener, removeEventListener, and dispatchEvent for IE8 including custom bubbling events
  • timeStamp, cancelable, bubbles, defaultPrevented, target, currentTarget and relatedTarget properties per each event
  • document.createEvent('Event') standard API with e.initEvent(type, bubbles, cancelable) supported too
  • preventDefault(), stopPropagation(), stopImmediatePropagation() working with both synthetic and real events
  • document.addEventListener('DOMContentLoaded', callback, false) supported
  • textContent, firstElementChild, lastElementChild, previousElementSibling, nextElementSibling, childElementCount
  • document.defaultView, window.getComputedStyle
  • HTMLElement
  • basic support for DOM Ranges mutations

current tests file and live test page

how to include the project

Here a page example

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

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.

ie8 in CDN

It is now possible to include this file through cdnjs

<!--[if IE 8]><script

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.

W3C DOM Level.next

If you'd like to upgrade even more IE8 capabilities, consider adding dom4 polyfills after ie8.js file.

That would provide enough horse-powers to hazard CustomElement polyfill on top.

known gotchas

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

  • a standard capturing phase. The logic involved to pause a synthetic or DOM event, capture up, and re-dispatch top-down is probably not worth it the time and the size of the code. Right now if the useCapture flag is used, the event is prepended instead of appended simulating somehow the 99% of the time reason we might opt for the capture phase, being this usually slower too so it's a good practice, in any case, to .stopPropagation() on capture.
  • not supported modern events, DOMContentLoaded a part, such transitionend or 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

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.


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.


Andrea Giammarchi
ie8 open issues Ask a question     (View All Issues)
  • over 4 years some new ie8 Compatibility
ie8 open pull requests (View All Pulls)
  • FIX: Minor jshint issues
ie8 questions on Stackoverflow (View All Questions)
  • Box-shadow issue on IE8 & IE11
  • jQuery ie8 Object Null or undefined
  • Bootstrap menu javascript function not working in IE8
  • How to detect IE8 and display a page or alert
  • Download with php with headers do not work on IE8
  • Youtube embed overriding document font styles IE8
  • min-height : 100vh not working in ie8
  • How can I get the bottom padding of an input working in IE8?
  • How to hide drop down arrow in IE8 & IE9?
  • Difference between IE8 & EmulateIE8
  • Drupal 7: Split css for IE8 after less compilation
  • jQuery .ajax getting Access Denied on Cross Domain Request in IE8/9
  • Grid issue on IE8 with Unsemantic
  • CKEditor IE8 issue
  • How to make Bootstrap responsive layout work on IE8
  • How to add specific bower components as IE8 conditional block in Gulp
  • RESOLVED: jQuery .animate() not doing anything in IE8
  • Kentico does not work on IE8
  • CSS rounded corners in IE8
  • can anyone help me make circle progress charts for IE8, without SVGs, maybe with a graphic?
  • IE7, IE8 support for css3 media query
  • Fixed width on IE8 doesn't work
  • How to handle self signed certificate error in IE8 using Selenium Webdriver + Java
  • How does a web browser (IE8) determine the token to send for the Authorization: Negotiate request header?
  • Sys.WebForms.PageRequestManagerServerErrorException error on IE8
  • IE8 and CustomValidator issue
  • Force IE9 to emulate IE8. Possible?
  • Css style problems on input in IE8
  • bootstrap 3.3.4 not apply on IE8 browser
  • Use ASP.NET C# to open Full Screen on Google Chrome and IE8 after Login
ie8 list of languages used
Other projects in JavaScript