Skip to content

Commit

Permalink
Specify the textInput event
Browse files Browse the repository at this point in the history
Fixes #353
  • Loading branch information
zcorpan authored Nov 24, 2023
1 parent e47b95e commit 81f7bd4
Showing 1 changed file with 113 additions and 0 deletions.
113 changes: 113 additions & 0 deletions sections/legacy-event-types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ completeness.
+| keypress | Sync | Yes | <code>Element</code> | KeyboardEvent | Yes | Yes | Varies: launch <a>text composition system</a>; |
| | | | | | | | EVENT{blur} and EVENT{focus} events; |
| | | | | | | | EVENT{DOMActivate} event; other event |
+| textInput | Sync | Yes | <code>Element</code> | TextEvent | Yes | Yes | EVENT{input} event |
++-----------------------------+--------+----------+------------------------------------------+------------------+------------+------------+------------------------------------------------+


Expand Down Expand Up @@ -517,6 +518,118 @@ completeness.
++---+-------------+------------------------+---------------------+--------------------------------+
</div>

<h3 id="legacy-textevent-events">Legacy {{TextEvent}} events</h3>

<h4 id="interface-textevent">Interface TextEvent</h4>


<pre class="idl">
[Exposed=Window]
interface TextEvent : Event {
readonly attribute DOMString data;
void initTextEvent(DOMString type,
optional boolean bubbles = false,
optional boolean cancelable = false,
optional Window? view = null,
optional DOMString data = "undefined");
};
</pre>

<dl dfn-for="TextEvent">
<dt><dfn attribute>data</dfn></dt>
<dd>
<code>data</code> holds the value of the characters generated by
an input method. This MAY be a single Unicode character or a
non-empty sequence of Unicode characters [[Unicode]]. Characters
SHOULD be normalized as defined by the Unicode normalization
form <em>NFC</em>, defined in [[UAX15]]. This
attribute MAY be the <a>empty string</a>.

The <a>un-initialized value</a> of this attribute MUST be
<code>""</code> (the empty string).
</dd>

<dt><dfn method>initTextEvent(typeArg)</dfn></dt>
<dd>
Initializes attributes of a <code>TextEvent</code> object.
This method has the same behavior as {{Event/initEvent()}}.

<dl class="parameters">
<dt>DOMString typeArg</dt>
<dd>
Refer to the {{Event/initEvent()}} method for a description of this parameter.
</dd>

<dt>boolean bubblesArg</dt>
<dd>
Refer to the {{Event/initEvent()}} method for a description of this parameter.
</dd>

<dt>boolean cancelableArg</dt>
<dd>
Refer to the {{Event/initEvent()}} method for a description of this parameter.
</dd>

<dt>Window? view</dt>
<dd>
Specifies {{UIEvent/view}}. This value MAY be <code>null</code>.
</dd>
</dl>
</dd>
</dl>

<h4 id="legacy-textevent-event-types">Legacy {{TextEvent}} event types</h4>

<h5 id="event-type-textInput"><dfn>textInput</dfn></h5>

<table class="event-definition">
<tr>
<th>Type</th>
<td><strong><code>textInput</code></strong></td>
</tr>
<tr>
<th>Interface</th>
<td>{{TextEvent}}</td>
</tr>
<tr>
<th>Sync / Async</th>
<td>Sync</td>
</tr>
<tr>
<th>Bubbles</th>
<td>Yes</td>
</tr>
<tr>
<th>Trusted Targets</th>
<td><code>Element</code></td>
</tr>
<tr>
<th>Cancelable</th>
<td>Yes</td>
</tr>
<tr>
<th>Composed</th>
<td>Yes</td>
</tr>
<tr>
<th>Default action</th>
<td>
EVENT{input} event</td>
</tr>
<tr>
<th>Context<br/>(trusted events)</th>
<td>
<ul>
<li>Issue: TODO</li>
</ul>
</td>
</tr>
</table>

If supported by a <a>user agent</a>, this event MUST be dispatched
as the default action of a EVENT{beforeinput} event.


<h3 id="legacy-mutationevent-events">Legacy {{MutationEvent}} events</h3>

The mutation and mutation name event modules are designed to allow
Expand Down

0 comments on commit 81f7bd4

Please sign in to comment.