Skip to content

Commit

Permalink
Check for an EventTarget before dispatching violation events (#549)
Browse files Browse the repository at this point in the history
SHA: 9af8f75
Reason: push, by @antosart

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
antosart and github-actions[bot] committed Jun 30, 2022
1 parent a4ff4f3 commit 75b918a
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link href="https://www.w3.org/2008/site/images/favicon.ico" rel="icon">
<meta content="Bikeshed version 37b7e7e68, updated Fri May 27 15:08:11 2022 -0700" name="generator">
<link href="https://www.w3.org/TR/CSP3/" rel="canonical">
<meta content="a6ebf9289d0e01b8d86f2143195cc2c9adebbe1a" name="document-revision">
<meta content="9af8f7539302e31a9d6e10f40caefabfcb525095" name="document-revision">
<style>
ul.toc ul ul ul {
margin: 0 0 0 2em;
Expand Down Expand Up @@ -1916,13 +1916,12 @@ <h3 class="heading settled algorithm" data-algorithm="Report a violation" data-l
<p>If <var>target</var> is <code>null</code>:</p>
<ol>
<li data-md>
<p>Set <var>target</var> be <var>violation</var>’s <a data-link-type="dfn" href="#violation-global-object" id="ref-for-violation-global-object⑤">global object</a>.</p>
<p>Set <var>target</var> to <var>violation</var>’s <a data-link-type="dfn" href="#violation-global-object" id="ref-for-violation-global-object⑤">global object</a>.</p>
<li data-md>
<p>If <var>target</var> is a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/window-object.html#window" id="ref-for-window③">Window</a></code>, set <var>target</var> to <var>target</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/window-object.html#concept-document-window" id="ref-for-concept-document-window①">associated <code>Document</code></a>.</p>
</ol>
<li data-md>
<p><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire">Fire an event</a> named <code>securitypolicyviolation</code> that uses the <code class="idl"><a data-link-type="idl" href="#securitypolicyviolationevent" id="ref-for-securitypolicyviolationevent②">SecurityPolicyViolationEvent</a></code> interface at <var>target</var> with
its attributes initialized as follows:</p>
<p>If <var>target</var> <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#implements" id="ref-for-implements">implements</a> <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget">EventTarget</a></code>, <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire" id="ref-for-concept-event-fire">fire an event</a> named <code>securitypolicyviolation</code> that uses the <code class="idl"><a data-link-type="idl" href="#securitypolicyviolationevent" id="ref-for-securitypolicyviolationevent②">SecurityPolicyViolationEvent</a></code> interface at <var>target</var> with its attributes initialized as follows:</p>
<dl>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-securitypolicyviolationevent-documenturi" id="ref-for-dom-securitypolicyviolationevent-documenturi">documentURI</a></code>
<dd data-md>
Expand Down Expand Up @@ -5024,6 +5023,13 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
Violation DOM Events </a>
</ul>
</aside>
<aside class="dfn-panel" data-for="term-for-eventtarget">
<a href="https://dom.spec.whatwg.org/#eventtarget">https://dom.spec.whatwg.org/#eventtarget</a><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-eventtarget">5.5.
Report a violation </a>
</ul>
</aside>
<aside class="dfn-panel" data-for="term-for-dom-event-bubbles">
<a href="https://dom.spec.whatwg.org/#dom-event-bubbles">https://dom.spec.whatwg.org/#dom-event-bubbles</a><b>Referenced in:</b>
<ul>
Expand Down Expand Up @@ -6705,6 +6711,13 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
Violation DOM Events </a> <a href="#ref-for-idl-USVString⑤">(2)</a> <a href="#ref-for-idl-USVString⑥">(3)</a> <a href="#ref-for-idl-USVString⑦">(4)</a> <a href="#ref-for-idl-USVString⑧">(5)</a> <a href="#ref-for-idl-USVString⑨">(6)</a> <a href="#ref-for-idl-USVString①⓪">(7)</a> <a href="#ref-for-idl-USVString①①">(8)</a>
</ul>
</aside>
<aside class="dfn-panel" data-for="term-for-implements">
<a href="https://webidl.spec.whatwg.org/#implements">https://webidl.spec.whatwg.org/#implements</a><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-implements">5.5.
Report a violation </a>
</ul>
</aside>
<aside class="dfn-panel" data-for="term-for-idl-object">
<a href="https://webidl.spec.whatwg.org/#idl-object">https://webidl.spec.whatwg.org/#idl-object</a><b>Referenced in:</b>
<ul>
Expand Down Expand Up @@ -6758,6 +6771,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><span class="dfn-paneled" id="term-for-element">Element</span>
<li><span class="dfn-paneled" id="term-for-event">Event</span>
<li><span class="dfn-paneled" id="term-for-dictdef-eventinit">EventInit</span>
<li><span class="dfn-paneled" id="term-for-eventtarget">EventTarget</span>
<li><span class="dfn-paneled" id="term-for-dom-event-bubbles">bubbles</span>
<li><span class="dfn-paneled" id="term-for-dom-event-composed">composed</span>
<li><span class="dfn-paneled" id="term-for-connected">connected</span>
Expand Down Expand Up @@ -7011,6 +7025,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><span class="dfn-paneled" id="term-for-Default">Default</span>
<li><span class="dfn-paneled" id="term-for-Exposed">Exposed</span>
<li><span class="dfn-paneled" id="term-for-idl-USVString">USVString</span>
<li><span class="dfn-paneled" id="term-for-implements">implements</span>
<li><span class="dfn-paneled" id="term-for-idl-object">object</span>
<li><span class="dfn-paneled" id="term-for-idl-unsigned-long">unsigned long</span>
<li><span class="dfn-paneled" id="term-for-idl-unsigned-short">unsigned short</span>
Expand Down

0 comments on commit 75b918a

Please sign in to comment.