zjrJS Javascript Library

zjrJS.MSIE.h5A() - zjrJS Javascript Library

This information lives on a webpage hosted at the following web address: 'https://omegajunior.globat.com/code/zjrjs/'.

How to use zjrJS.MSIE.h5A(), an HTML5 Shim

Declaration
zjrJS.MSIE.h5A();

Goal
To add "support" for common HTML5 elements to MSIE. Apparently MSIE 5 through 8 react better to HTML5 objects after creating them through JS.

Typical usage
When your web site is marked up in HTML5, and you have to include visitors that suffer Microsoft's outdated browser, and wish to improve their experience of your web site, then you can ask h5A() to trigger MSIE 5 through 8 into believing it knows common HTML5 HTMLElements.

Watch out
The Html5 documentation is a work in progress. Though many browsers are implementing it as we're writing, including MSIE10, Html5 is likely to change. HtmlElement tag names are subject to change as well. Remember to compare your site's mark-up with the Html5 documentation before implementing a new web site.

When to avoid
Avoid using h5A() in any browser that isn't MSIE 5 through 8. It should not cause any problems if you happen to use it anyway. Just be aware that we haven't tested it anywhere else, and that MSIE 10 is likely to contain some Html5 support.

Member Type
Method (no return value).

Parameters
None.

Dependencies
None.

Example
<script type="text/javascript" src="zjrJS.version.js" id="zjrJS"></script>
<script type="text/javascript">/* <![CDATA[ */
zjrJS.Doc.aE(window,"load",function(){
if(MSIE in zjrJS){if(version in zjrJS.MSIE){
if(zjrJS.MSIE.version > 4 && zjrJS.MSIE.version < 9){
zjrJS.MSIE.h5A();
}
}}
});
/* ]]> */</script>


Mind you that zjrJS.MSIE.version is not part of the standard zjrJS API. We will leave it to you to detect what user agent your visitor is using, though we recommend our best practice on MSIE Version Sniffing.

Download:

Download zjrJS’ latest stable build (20141202t2322) minified (7.1KB).

Download zjrJS’ latest stable build (20141202t2322) (11.9KB).

Clicky Analytics