5 frame
= window
.top
.document
.getElementById('frame');
7 // Setting the sandbox flag at runtime should not change whether scripts
8 // are allowed in this document.
10 frame
.sandbox
= 'allow-same-origin'; // NO allow-scripts
12 ++window
.top
.allowedExecuted
;
14 // This means that new scripts (such as the onload handler below) should
15 // continue to execute, even though the frame now has a sandbox attribute.
17 function onload_hook()
19 ++window
.top
.allowedExecuted
;
25 <body onload='onload_hook();'
></body>