Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / InputEvent.webidl
blob1d00e3702c8ee19f782b7c69e69ae3417ef850f9
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://w3c.github.io/input-events/#interface-InputEvent
8  */
10 [Exposed=Window]
11 interface InputEvent : UIEvent
13   constructor(DOMString type, optional InputEventInit eventInitDict = {});
15   readonly attribute boolean       isComposing;
17   readonly attribute DOMString inputType;
19   [NeedsCallerType]
20   readonly attribute DOMString? data;
23 dictionary InputEventInit : UIEventInit
25   boolean isComposing = false;
26   DOMString inputType = "";
27   // NOTE:  Currently, default value of `data` attribute is declared as empty
28   //        string by UI Events.  However, both Chrome and Safari uses `null`,
29   //        and there is a spec issue about this:
30   //        https://github.com/w3c/uievents/issues/139
31   //        So, we take `null` for compatibility with them.
32   DOMString? data = null;
35 // https://w3c.github.io/input-events/#interface-InputEvent
36 // https://rawgit.com/w3c/input-events/v1/index.html#interface-InputEvent
37 partial interface InputEvent
39   [NeedsCallerType]
40   readonly attribute DataTransfer? dataTransfer;
41   // Enable `getTargetRanges()` only when `beforeinput` event is enabled
42   // because this may be used for feature detection of `beforeinput` event
43   // support (due to Chrome not supporting `onbeforeinput` attribute).
44   sequence<StaticRange> getTargetRanges();
47 partial dictionary InputEventInit
49   DataTransfer? dataTransfer = null;
50   sequence<StaticRange> targetRanges = [];