summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/catapult/third_party/polymer2/bower_components/polymer/types/lib/mixins/gesture-event-listeners.d.ts
blob: 714c5e055aaaf2695f6b6fbe4b0820cf0e752e7a (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
/**
 * DO NOT EDIT
 *
 * This file was automatically generated by
 *   https://github.com/Polymer/gen-typescript-declarations
 *
 * To modify these typings, edit the source file(s):
 *   lib/mixins/gesture-event-listeners.html
 */

/// <reference path="../utils/boot.d.ts" />
/// <reference path="../utils/mixin.d.ts" />
/// <reference path="../utils/gestures.d.ts" />

declare namespace Polymer {


  /**
   * Element class mixin that provides API for adding Polymer's cross-platform
   * gesture events to nodes.
   *
   * The API is designed to be compatible with override points implemented
   * in `Polymer.TemplateStamp` such that declarative event listeners in
   * templates will support gesture events when this mixin is applied along with
   * `Polymer.TemplateStamp`.
   */
  function GestureEventListeners<T extends new (...args: any[]) => {}>(base: T): T & GestureEventListenersConstructor;

  interface GestureEventListenersConstructor {
    new(...args: any[]): GestureEventListeners;
  }

  interface GestureEventListeners {

    /**
     * Add the event listener to the node if it is a gestures event.
     *
     * @param node Node to add event listener to
     * @param eventName Name of event
     * @param handler Listener function to add
     */
    _addEventListenerToNode(node: Node, eventName: string, handler: (p0: Event) => void): void;

    /**
     * Remove the event listener to the node if it is a gestures event.
     *
     * @param node Node to remove event listener from
     * @param eventName Name of event
     * @param handler Listener function to remove
     */
    _removeEventListenerFromNode(node: Node, eventName: string, handler: (p0: Event) => void): void;
  }
}