tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_object_inherit.html (640B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Bug 1457100: Test OBJECT inherits CSP if needed</title>
      5  <meta charset="utf-8">
      6  <meta http-equiv="Content-Security-Policy" content= "img-src https://bug1457100.test.com"/>
      7 </head>
      8 <body>
      9 <object id="dataObject" data="data:text/html,object<script>var foo = 0;</script>"></object>
     10 
     11 <script type="application/javascript">
     12  var dataObject = document.getElementById("dataObject");
     13  dataObject.onload = function () {
     14    var contentDoc = SpecialPowers.wrap(dataObject).contentDocument;
     15    var cspJSON = contentDoc.cspJSON;
     16    window.parent.postMessage({cspJSON}, "*");
     17  }
     18 </script>
     19 
     20 </body>
     21 </html>