aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/inputevent/index.html
blob: 1bf9b77f4b6d6c9a1e004a968d0957f5467dd1c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: InputEvent
slug: Web/API/InputEvent
translation_of: Web/API/InputEvent
---
<div>{{APIRef("DOM Events")}} {{SeeCompatTable}}</div>

<p>The <strong><code>InputEvent</code></strong> interface represents an event notifying of editable content change.</p>

<p>{{InheritanceDiagram}}</p>

<h2 id="Конструктор">Конструктор</h2>

<dl>
 <dt>{{domxref("InputEvent.InputEvent", "InputEvent()")}}</dt>
 <dd>Создаёт <code>InputEvent</code> объект.</dd>
</dl>

<h2 id="Свойства">Свойства</h2>

<p><em>This interface <em>inherits properties from its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.</em></em></p>

<dl>
 <dt>{{domxref("InputEvent.data")}}{{readOnlyInline}}</dt>
 <dd>Returns a {{domxref("DOMString")}} with the inserted characters. This may be an empty string if the change doesn't insert text (such as when deleting characters, for example).</dd>
 <dt>{{domxref("InputEvent.dataTransfer")}}{{readonlyinline}}</dt>
 <dd>Returns a {{domxref("DataTransfer")}} object containing information about richtext or plaintext data being added to or removed from editable content.</dd>
 <dt>{{domxref("InputEvent.inputType")}}{{readonlyinline}}</dt>
 <dd>Returns the type of change for editable content such as, for example, inserting, deleting, or formatting text. See the property page for a complete list of input types.</dd>
 <dt>{{domxref("InputEvent.isComposing")}}{{readOnlyInline}}</dt>
 <dd>Returns a {{jsxref("Boolean")}} value indicating if the event is fired after {{event("compositionstart")}} and before {{event("compositionend")}}.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p><em>This interface <em>inherits methods from its parents, {{domxref("UIEvent")}} and {{domxref("Event")}}.</em></em></p>

<dl>
 <dt>{{domxref('InputEvent.getTargetRanges()')}}</dt>
 <dd>Returns an array of static ranges that will be affected by a change to the DOM if the input event is not canceled.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="height: 49px; width: 1000px;">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('InputEvents2','#interface-InputEvent','InputEvent')}}</td>
   <td>{{Spec2('InputEvents2')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.InputEvent")}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{ event("beforeinput") }}</li>
 <li><a href="/en-US/docs/Web/API/InputEvent/input_event"><code>input</code> event</a></li>
</ul>