script-for-event-xhtml.xhtml (621B)
1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head> 3 <title>Scripts with for and event attributes</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 </head> 7 <body> 8 <div id="log"></div> 9 <script> 10 var run = false; 11 </script> 12 <script for="window" event="bar"> 13 // This script should not run, but should not cause a parse error either. 14 run = true; 15 </script> 16 <script> 17 test(function() { 18 assert_false(run, "Script was unexpectedly run.") 19 }, "Scripts with for and event attributes should not run.") 20 </script> 21 </body> 22 </html>