-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split event types source file by event type
This splits the event-types.txt file into smaller files (by event type) so that they are easier to manage. This should help reduce conflicts while converting the event types to an algorithmic description. The generated spec should be identical after this cl.
- Loading branch information
Showing
10 changed files
with
3,444 additions
and
3,416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<h3 id="events-inputevents">Input Events</h3> | ||
|
||
Input events are sent as notifications whenever the DOM is being updated (or about | ||
to be updated) as a direct result of a user action (e.g., keyboard input in an editable | ||
region, deleting or formatting text, ...). | ||
|
||
<h4 id="interface-inputevent">Interface InputEvent</h4> | ||
|
||
<h5 id="idl-inputevent">InputEvent</h5> | ||
|
||
<p class="intro-dom">Introduced in DOM Level 3</p> | ||
|
||
<pre class="idl"> | ||
[Exposed=Window] | ||
interface InputEvent : UIEvent { | ||
constructor(DOMString type, optional InputEventInit eventInitDict = {}); | ||
readonly attribute USVString? data; | ||
readonly attribute boolean isComposing; | ||
readonly attribute DOMString inputType; | ||
}; | ||
</pre> | ||
|
||
<dl dfn-for="InputEvent"> | ||
<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 contain the <a>empty string</a>. | ||
|
||
The <a>un-initialized value</a> of this attribute MUST be | ||
<code>null</code>. | ||
</dd> | ||
|
||
<dt><dfn attribute>isComposing</dfn></dt> | ||
<dd> | ||
<code>true</code> if the input event occurs as part of a | ||
composition session, i.e., after a EVENT{compositionstart} event | ||
and before the corresponding EVENT{compositionend} event. | ||
|
||
The <a>un-initialized value</a> of this attribute MUST be | ||
<code>false</code>. | ||
</dd> | ||
|
||
<dt><dfn attribute>inputType</dfn></dt> | ||
<dd> | ||
<code>inputType</code> contains a string that identifies the type | ||
of input associated with the event. | ||
|
||
For a list of valid values for this attribute, refer to the | ||
[[Input-Events]] specification. | ||
|
||
The <a>un-initialized value</a> of this attribute MUST be | ||
the empty string <code>""</code>. | ||
</dd> | ||
</dl> | ||
|
||
<h5 id="idl-inputeventinit">InputEventInit</h5> | ||
|
||
<pre class="idl"> | ||
dictionary InputEventInit : UIEventInit { | ||
DOMString? data = null; | ||
boolean isComposing = false; | ||
DOMString inputType = ""; | ||
}; | ||
</pre> | ||
|
||
<dl dfn-for="InputEventInit"> | ||
<dt><dfn dict-member>data</dfn></dt> | ||
<dd> | ||
Initializes the <code>data</code> attribute of the InputEvent object. | ||
</dd> | ||
|
||
<dt><dfn dict-member>isComposing</dfn></dt> | ||
<dd> | ||
Initializes the <code>isComposing</code> attribute of the InputEvent object. | ||
</dd> | ||
|
||
<dt><dfn dict-member>inputType</dfn></dt> | ||
<dd> | ||
Initializes the <code>inputType</code> attribute of the InputEvent object. | ||
</dd> | ||
</dl> | ||
|
||
<h4 id="events-inputevent-event-order">Input Event Order</h4> | ||
|
||
The input events defined in this specification MUST occur in a set order | ||
relative to one another. | ||
|
||
++---+-------------+---------------------------------------------------+ | ||
=| # | Event Type | Notes | | ||
+---+-------------+---------------------------------------------------+ | ||
+| 1 | beforeinput | | | ||
+| | | <em>DOM element is updated</em> | | ||
+| 2 | input | | | ||
++---+-------------+---------------------------------------------------+ | ||
|
||
<h4 id="events-input-types">Input Event Types</h4> | ||
|
||
<h5 id="event-type-beforeinput"><dfn>beforeinput</dfn></h5> | ||
|
||
++------------------+--------------------------------------------------------------------------------------+ event-definition | ||
=| % | | | ||
+------------------+--------------------------------------------------------------------------------------+ | ||
+| Type | <strong><code>beforeinput</code></strong> | | ||
+| Interface | {{InputEvent}} | | ||
+| Sync / Async | Sync | | ||
+| Bubbles | Yes | | ||
+| Trusted Targets | <code>Element</code> (specifically: control types such as | | ||
| | <code>HTMLInputElement</code>, etc.) or any <code>Element</code> with | | ||
| | <code>contenteditable</code> attribute enabled | | ||
+| Cancelable | Yes | | ||
+| Composed | Yes | | ||
+| Default action | Update the DOM element | | ||
+| Context<br> | <ul> | | ||
| (trusted events) | <li>{{Event}}.{{Event/target}} : <a>event target</a> that is about to be updated</li>| | ||
| | <li>{{UIEvent}}.{{UIEvent/view}} : <a><code>Window</code></a></li> | | ||
| | <li>{{UIEvent}}.{{UIEvent/detail}} : <code>0</code></li> | | ||
| | <li>{{InputEvent}}.{{InputEvent/data}} : the string containing the data that will | | ||
| | be added to the element, which MAY be <code>null</code> if the content will | | ||
| | be deleted</li> | | ||
| | <li>{{InputEvent}}.{{InputEvent/isComposing}} : <code>true</code> if this event is | | ||
| | dispatched during a <a href="#keys-dead">dead key</a> sequence or while an | | ||
| | <a>input method editor</a> is active (such that | | ||
| | <a href="#events-compositionevents">composition events</a> are being dispatched);| | ||
| | <code>false</code> otherwise.</li> | | ||
| | </ul> | | ||
++------------------+--------------------------------------------------------------------------------------+ | ||
|
||
A <a>user agent</a> MUST dispatch this event when the DOM is about | ||
to be updated. | ||
|
||
<h5 id="event-type-input"><dfn>input</dfn></h5> | ||
|
||
++------------------+--------------------------------------------------------------------------------------+ event-definition | ||
=| % | | | ||
+------------------+--------------------------------------------------------------------------------------+ | ||
+| Type | <strong><code>input</code></strong> | | ||
+| Interface | {{InputEvent}} | | ||
+| Sync / Async | Sync | | ||
+| Bubbles | Yes | | ||
+| Trusted Targets | <code>Element</code> (specifically: control types such as | | ||
| | <code>HTMLInputElement</code>, etc.) or any <code>Element</code> with | | ||
| | <code>contenteditable</code> attribute enabled | | ||
+| Cancelable | No | | ||
+| Composed | Yes | | ||
+| Default action | None | | ||
+| Context<br> | <ul> | | ||
| (trusted events) | <li>{{Event}}.{{Event/target}} : <a>event target</a> that was just updated</li> | | ||
| | <li>{{UIEvent}}.{{UIEvent/view}} : <a><code>Window</code></a></li> | | ||
| | <li>{{UIEvent}}.{{UIEvent/detail}} : <code>0</code></li> | | ||
| | <li>{{InputEvent}}.{{InputEvent/data}} : the string containing the data that has | | ||
| | been added to the element, which MAY be the <a>empty string</a> if the content | | ||
| | has been deleted</li> | | ||
| | <li>{{InputEvent}}.{{InputEvent/isComposing}} : <code>true</code> if this event is | | ||
| | dispatched during a <a href="#keys-dead">dead key</a> sequence or while an | | ||
| | <a>input method editor</a> is active (such that | | ||
| | <a href="#events-compositionevents">composition events</a> are being dispatched);| | ||
| | <code>false</code> otherwise.</li> | | ||
| | </ul> | | ||
++------------------+--------------------------------------------------------------------------------------+ | ||
|
||
A <a>user agent</a> MUST dispatch this event immediately after the | ||
DOM has been updated. | ||
|
||
|
Oops, something went wrong.