 id="block5"></div>
<script nonce='abc'>
  async_test(t => {
    var shadow = document.querySelector('#block5').attachShadow({"mode":"closed"});
    var style = document.createElement('style');
    style.innerText = 'p { color: red; }';
    style.addEventListener('securitypolicyviolation', t.step_func_done(e => {
      assert_equals(e.blockedURI, "inline");
      assert_equals(e.target, style);
    }));
    shadow.appendChild(style);
  }, "Correct targeting inside shadow tree (style).");
</script>

<!-- Pus