summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/input/input_device_capabilities.idl
blob: e7f2fb4ee2540200a5e4fefa3d78e5ee45b90afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Represents capabilities for a group of related input devices.
// To ease implementation, developers cannot rely on comparing two
// InputDeviceCapabilities instances for equality. Now we only have two
// InputDeviceCapabilities instances: one for devices which send touch
// events, and one for those that don't, because currently all we care
// about is if the input device fires touch events or not.

// https://wicg.github.io/InputDeviceCapabilities/#the-inputdevicecapabilities-interface

[
    Exposed=Window
] interface InputDeviceCapabilities {
    constructor(optional InputDeviceCapabilitiesInit deviceInitDict = {});

    // Whether this device dispatches touch events for movement.  This is used to detect
    // mouse events which represent only an action that has already been handled  by
    // touch event handlers.
    [Measure] readonly attribute boolean firesTouchEvents;
};