0

I would like to use html5shiv for support on IE9 but I can't get it to work. I have installed this in the head section:

<!--[if IE 9]>

<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

I need support for HTML5 Iframe sandbox:

<iframe id="iframe" src="http://www.telegraaf.nl" sandbox="allow-scripts allow-forms allow-same-origin"></iframe>

The website in the Iframe will break out the iframe in IE9 so that means the sandbox is not working. I think the problem is maybe that the sandbox is an attribute of iframe rather than a "style method/element".

So basically I need some advice on this. What else can I do? Is there a plugin (jquery?javascript?) somewhere that will support sandbox in IE?

4
  • Actually IE9 supports HTML5. Commented May 14, 2013 at 8:54
  • @undefined Oke but it doesn't seem to support sandbox. (and I actually need it for IE8 as well ) Commented May 14, 2013 at 8:56
  • 1
    The html5shiv script does not add any functionality – it simply makes unknown elements known to IE by creating them. This does not influence what attributes IE might support on certain elements; and besides that, iframe is not even in the list of elements that the shiv deals with. Commented May 14, 2013 at 8:58
  • @CBroe Thanks, I already kinda figured that out (Im new at this) Commented May 14, 2013 at 9:04

1 Answer 1

1

You don't need html5shiv in this case but a polyfill for that property.

Sign up to request clarification or add additional context in comments.

2 Comments

I did everything suggested over here: css-tricks.com/how-to-use-the-webshims-polyfill It doesn't work for iframe sandbox so it seems. I did accept your answer because I don't think there is anything else...This is what I did jsfiddle.net/u5Kpq/2 Doesn't work in IE9 Any other suggestions..?
In short, IE < 10 doesn't support sandbox attribute (caniuse.com/iframe-sandbox). Here is where it works: caniuse.com/iframe-sandbox It seems that a polyfill doesn't exist for this attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.