Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider an IE8+ version of HTML5Shiv #70

Open
jonathantneal opened this issue Jun 20, 2012 · 5 comments
Open

Consider an IE8+ version of HTML5Shiv #70

jonathantneal opened this issue Jun 20, 2012 · 5 comments

Comments

@jonathantneal
Copy link
Collaborator

There could be lots of optimisations done for an IE8+ version.

In a world where IE6 and IE7 step aside, IE8 would then offer new approaches to the same HTML5 incompatibilities. One approach would be to drop the list of sectioning elements in lieu of a defineProperty listener, hijacking the innerHTML setter, and shivving support for new elements responsively.

http://www.jonathantneal.com/blog/a-close-shiv/

@paulirish
Copy link
Collaborator

I think it's worth exploring.

also it's be "IE8" instead of "IE8+" right?

@jonathantneal
Copy link
Collaborator Author

True that. IE8.

(Unless there's something IE9 isn't telling us, or the unlikely event that more polyfilling and style shimmings make their way in.)

@aFarkas
Copy link
Owner

aFarkas commented Jun 24, 2012

I also thought about using defineProperty to fix IE8. From my point of view this approach is soooo much cleaner and looks extremly promissing.

I have just added a first draft in the defineProperty branch. What we need is a really good cloneNode patch, new unit tests, perf (and size) optimizations and documentation.

Some important points:

  1. Do not redeclare body.innerHTML. This totally destroys the robustness of this approach (and this is the main advantage over our duckpunch). If someone wants to add html5shiv at the bottom of a document or load it async, she/he can write those lines her/his own (But we should make clear that his can harm other scripts and is really bad for performance).
  2. This script should never mix IE6/7 solutions with IE8 solutions. The defineProperty approach is so much better and different, that we can not guarantee similiar behavior. (Therefore this scripts also adds a false positive for supportsUnknownElements in 6/7.
  3. Before moving on with this branch, I would like to finalize/release the current version 3.6 in the main branch. It's marked as RC and is fully unit tested. After releasing it, I want to start on the documentation. So please review :-).

@jonathantneal
Copy link
Collaborator Author

Hey guys, pinging this conversation again. What would you think about a rewrite for v4? Here are three suggestions.

  1. More fun. Shiv the prototype & defineProperty way.
  2. More clear. The v3 IE6+ version becomes the branch, like normalize.css did it.
  3. Less legal. Switch to MIT or Public Domain license.

@aFarkas
Copy link
Owner

aFarkas commented Jan 24, 2014

In short: YES!!! With 2. I would wait a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants