Skip to content

Commit

Permalink
Don't set data to null
Browse files Browse the repository at this point in the history
Also fix a typo (and infinite recursion) in initialize a TextEvent.
  • Loading branch information
zcorpan committed Feb 8, 2024
1 parent 4955670 commit 83db856
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
7 changes: 4 additions & 3 deletions event-algo.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,11 @@ method steps are:
: Output
:: None

1. <a>Initialize a TextEvent</a> with |e|, |eventType| and |eventTarget|
1. <a>Initialize a UIEvent</a> with |e|, |eventType| and |eventTarget|

1. Initialize the following public attributes

1. Set event.data = null
1. Set event.data = ""

</div><!-- algorithm -->

Expand All @@ -1032,14 +1032,15 @@ method steps are:

: Input
:: |eventType|, a DOMString containing the event type
:: |data|, a DOMString containing event data
:: |data|, a DOMString containing event data, or null

: Output
:: None

1. Let target =
<a href="https://html.spec.whatwg.org/#currently-focused-area-of-a-top-level-browsing-context">currently focused area of a top-level browsing context</a>
1. Let |event| = result of <a>create a TextEvent</a> with |eventType|, |target|
1. If |data| is null, set |data| to the empty string.
1. Set |event|.{{TextEvent/data}} = |data|
1. Return the result of <a>dispatch</a> |event| at |target|

Expand Down
Loading

0 comments on commit 83db856

Please sign in to comment.