All Projects → WebReflection → Ie8

WebReflection / Ie8

Licence: mit
some damn DOM fix for this damned browser

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Ie8

o9n
🖥 A screen.orientation ponyfill
Stars: ✭ 55 (-81.48%)
Mutual labels:  polyfill
webvr-polyfill-dpdb
An up-to-date Device Parameter Database for the WebVR Polyfill
Stars: ✭ 29 (-90.24%)
Mutual labels:  polyfill
React Native Drawer Layout
A platform-agnostic drawer layout for react-native
Stars: ✭ 258 (-13.13%)
Mutual labels:  polyfill
Array.prototype.at
An ES-spec-compliant (proposed) `Array.prototype.at`shim/polyfill/replacement that works as far down as ES3.
Stars: ✭ 20 (-93.27%)
Mutual labels:  polyfill
String.prototype.matchAll
Spec-compliant polyfill for String.prototype.matchAll, in ES2020
Stars: ✭ 14 (-95.29%)
Mutual labels:  polyfill
web-streams-polyfill
Web Streams, based on the WHATWG spec reference implementation
Stars: ✭ 198 (-33.33%)
Mutual labels:  polyfill
NetStandardPolyfills
Type and Reflection polyfill extension methods. .NET 3.5+ and .NET Standard 1.0+.
Stars: ✭ 22 (-92.59%)
Mutual labels:  polyfill
Formdata
HTML5 `FormData` polyfill for Browsers.
Stars: ✭ 292 (-1.68%)
Mutual labels:  polyfill
core-web
like core-js but for Web APIs (based on polyfill.io)
Stars: ✭ 34 (-88.55%)
Mutual labels:  polyfill
v8go-polyfills
Add polyfills to rogchap/v8go
Stars: ✭ 25 (-91.58%)
Mutual labels:  polyfill
audioworklet-polyfill
strictly unofficial polyfill for Web Audio API AudioWorklet
Stars: ✭ 49 (-83.5%)
Mutual labels:  polyfill
scoped
Scoped CSS polyfill
Stars: ✭ 67 (-77.44%)
Mutual labels:  polyfill
Gapotchenko.FX
.NET polyfill to the future. A versatile RAD framework for .NET platform.
Stars: ✭ 23 (-92.26%)
Mutual labels:  polyfill
async generator
Making it easy to write async iterators in Python 3.5
Stars: ✭ 87 (-70.71%)
Mutual labels:  polyfill
Abortcontroller Polyfill
Polyfill for the AbortController DOM API and abortable fetch (stub that calls catch, doesn't actually abort request).
Stars: ✭ 273 (-8.08%)
Mutual labels:  polyfill
appHistory
A polyfill for the AppHistory proposal
Stars: ✭ 21 (-92.93%)
Mutual labels:  polyfill
fromentries
Object.fromEntries() ponyfill (in 6 lines)
Stars: ✭ 62 (-79.12%)
Mutual labels:  polyfill
Url Polyfill
Polyfill URL and URLSearchParams to match last ES7 specifications
Stars: ✭ 294 (-1.01%)
Mutual labels:  polyfill
Bootstrap Ie8
Bootstrap 4 for IE8 and IE9
Stars: ✭ 278 (-6.4%)
Mutual labels:  polyfill
rangefix
Workaround for browser bugs in Range.prototype.getClientRects and Range.prototype.getBoundingClientRect.
Stars: ✭ 35 (-88.22%)
Mutual labels:  polyfill

ie8 donate

warning

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>
<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.

ie8 in CDN

It is now possible to include this file through cdnjs

<!--[if IE 8]><script
  src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.8.0/ie8.js"
></script><![endif]-->

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.

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].