Beginner at Rails.
I'm coding CSS in my sample application. I understand there is Javascript code to help browsers, i.e. Internet Explorer, support HTML5.
What is the difference between HTML5 Shim and HTML5 Shiv? Is it something worth knowing?
http://html5shim.googlecode.com/svn/trunk/html5.js
http://html5shiv.googlecode.com/svn/trunk/html5.js
My code, y'all:
<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"> </script> <![endif]-->
The shim is to enable HTML5 elements to be able to be styled through CSS in Internet Explorer versions less than 9.
A shim is a piece of code used to correct the behavior of code that already exists, usually by adding new API that works around the problem. This differs from a polyfill, which implements a new API that is not supported by the stock browser as shipped.
It was originally called the html5-shiv.
Shiv really isn't the right term, as a shiv is a stabbing-implement.
A shim is something which you use to level things out (or prop them up). If a table has one leg that's too short, you might shim it with a piece of wood or a phone book...
So html5-shim is for people who expect html5shiv to be called a shim.
That's entirely it, as far as differences go.
Kind of like polyfills cover over the differences in implementations of features.
In North America, Polyfill might be called "Spackle".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With