Skip to content

Commit

Permalink
Issue whatwg#625. Define Event.srcElement and Event.returnValue for c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Mar 30, 2018
1 parent 07c110c commit 7da8e8e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dom.bs
Expand Up @@ -431,6 +431,7 @@ would have been {{Event/AT_TARGET}}.
interface Event {
readonly attribute DOMString type;
readonly attribute EventTarget? target;
readonly attribute EventTarget? srcElement; // historical
readonly attribute EventTarget? currentTarget;
sequence<EventTarget> composedPath();

Expand All @@ -446,6 +447,7 @@ interface Event {

readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
attribute boolean returnValue;
void preventDefault();
readonly attribute boolean defaultPrevented;
readonly attribute boolean composed;
Expand Down Expand Up @@ -580,6 +582,9 @@ string.
<p>The <dfn attribute for=Event><code>target</code></dfn> attribute's getter must return the
<a>context object</a>'s <a for=Event>target</a>.

<p>The <dfn attribute for=Event><code>srcElement</code></dfn> attribute's getter must return the
<a>context object</a>'s <a for=Event>target</a>.

<p>The <dfn attribute for=Event><code>currentTarget</code></dfn> attribute must return the value it
was initialized to. When an <a>event</a> is created the attribute must be initialized to null.

Expand Down Expand Up @@ -675,6 +680,12 @@ The <dfn attribute for=Event><code>bubbles</code></dfn> and
<dfn attribute for=Event><code>cancelable</code></dfn> attributes
must return the values they were initialized to.

<p>The <dfn attribute for=Event><code>returnValue</code></dfn> attribute must be initialized to true
when an <a>event</a> is created. When the attribute is set to false it must set the <a>canceled flag</a>
if the {{Event/cancelable}} attribute value is true and the <a>in passive listener flag</a> is
unset. The {{Event/returnValue}} attribute's getter must return false if the <a>canceled flag</a> is
set, and true otherwise.

The <dfn method for=Event><code>preventDefault()</code></dfn> method, when invoked, must set the
<a>canceled flag</a> if the {{Event/cancelable}} attribute value is true and the
<a>in passive listener flag</a> is unset.
Expand Down

0 comments on commit 7da8e8e

Please sign in to comment.