shawnbot / aight

JavaScript shims and shams for making IE8-9 behave reasonably
Other
756 stars 98 forks source link

Non standard / breaking polyfills #37

Closed WebReflection closed 10 years ago

WebReflection commented 10 years ago

Some included file might trick the surrounding logic with non standard implementations / behavior.

ie8 fixes for real events and custom events and bubbling, whatever you are using here is a partially broken sham, not a polyfill.

All tests in place that are more standard and green in IE8 than Safari, as example.

dom4 brings CustomEevent, classList (for real, with all tests as meant by W3C) and others DOM4 things to all browsers including IE8 if used after the previous polyfill.

I wonder why this project decided to not go for standards polyfill and use some library not fully tested against W3C standards … maybe three's room for improvements?

Best Regards

shawnbot commented 10 years ago

Hi, and thanks for your input. This project is very much an ad-hoc collection of (sometimes inelegant) solutions to specific problems that I encountered over several years of accommodating IE8 in my work. The goal has always been more along the lines of 80-20 coverage than 100% W3C standards compliance.

That said, there is certainly room for improvement, and I'm very much open to replacing any and all of the existing shims/shams/polyfills with more compliant and/or elegant ones, and your implementations look like a good fit if you're willing to offer them up for inclusion. (DOM4 compliance seems like overkill to me, but if Aight could get a bunch of other useful stuff in the process I would certainly consider it worthy.) I've been thinking for a while about a v2 release that would provide better standards compliance and testing coverage, and leaning on polyfills with their own test coverage would be a great start.

At this very moment I've got a newborn to take care of, but when I emerge from the fog of sleep deprivation this is one of the first things that I'll be thinking about. If you have any other suggestions in the meantime, feel free to include them here and I'll carry them add them to the inevitable v2 milestone.

shawnbot commented 10 years ago

So I started a v2 branch that uses your ie8 and dom4, es5-shim, a patch for DOM2 CSSStyleDeclaration prototype methods and a sham createElementNS(). I've added some basic unit tests that are far from exhaustive, but (so far) check out in IE8:

image

I'm going to close this issue, but feel free to send me a pull request with some other tests that you think would be worth including. I may also ask for your input on the PR to merge v2 into master (specifically re: licensing, and how you'd like that handled in the files that include yours). Thanks for pointing me toward your libraries!