aFarkas / html5shiv

This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.
http://paulirish.com/2011/the-history-of-the-html5-shiv/
9.89k stars 2.56k forks source link

Audio tag is not working in IE 8 #130

Closed fire-falcon closed 11 years ago

fire-falcon commented 11 years ago

I have downloaded the latest version of html5shiv.zip and showed them in my page's head. But audio tag is not working on my page. Here is my function that is supposed to play sound when User clicks some button:

function playSounds() { var snd = new Audio("./alertbox/operator.wav"); snd.play(); }

And here is my code in my page header:

<script type="text/javascript" src="../html5shiv/dist/html5shiv.js"></script>
<script type="text/javascript">
    window.html5.elements = 'mark section customelement';
    html5.shivDocument(document);
</script>

But it's not playing sound on button click. What am I doing wrong?

aFarkas commented 11 years ago

html5shiv is only a simple shim for making custom elements work in IE. It does not polyfill the HTML5 APIs. If you need a polyfill, use something like webshims