sandbox_005.htm (1275B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>HTML5 Sandbox: Block script execution inside iframe with sandbox attribute.</title> 5 <meta name="timeout" content="long"> 6 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> 7 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 8 <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#sandboxed-scripts-browsing-context-flag" /> 9 <meta name="assert" content="Block script execution inside iframe with sandbox attribute." /> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 </head> 13 <body> 14 <script type="text/javascript"> 15 16 var t = async_test("Block script execution inside iframe with sandbox attribute."); 17 18 function callback(event) 19 { 20 t.step(function(){ 21 assert_true('sandbox' in document.createElement('iframe')); 22 assert_true(!event); 23 }); 24 t.done(); 25 } 26 27 var timer = setTimeout(callback, 4000); 28 window.addEventListener("message", callback, false); 29 </script> 30 <iframe src="support/iframe_sandbox_001.htm" sandbox style="display: none"></iframe> 31 <div id=log></div> 32 </body> 33 </html>