dom/webidl/GamepadHapticActuator.webidl
author Daosheng Mu <daoshengmu@gmail.com>
Thu, 02 Feb 2017 14:30:58 +0800
changeset 349321 56e2fa280d2a9f00e37238c3c2532caa01c3b2a5
child 436243 b417c2d937e8b0a4987e61b1d47efae4435a3fde
permissions -rw-r--r--
Bug 1299937 - Part 1: Implement GamepadHapticActuator in Gamepad API; r=qdot MozReview-Commit-ID: GJZvgxSBVlB

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * The origin of this IDL file is
 * https://w3c.github.io/gamepad/extensions.html#gamepadhapticactuator-interface
 */

enum GamepadHapticActuatorType {
  "vibration"
};

[Pref="dom.gamepad.extensions.enabled",
  HeaderFile="mozilla/dom/GamepadHapticActuator.h"]
interface GamepadHapticActuator
{
  readonly attribute GamepadHapticActuatorType type;
  [Throws, NewObject]
  Promise<boolean> pulse(double value, double duration);
};