Spec-Zone.ru › Dart 2

dart:html

Конструктор Event.eventType

Event.eventType(
  1. Строка тип,
  2. Строка имя,
  3. {Булево canBubble = true,
  4. Булево cancelable = true}
)

Создает новый объект Event указанного типа.

Это аналогично document.createEvent. Обычно события должны создаваться через их конструкторы, если они доступны.

var e = new Event.type('MouseEvent', 'mousedown', true, true);

Реализация

factory Event.eventType(String type, String name,
    {bool canBubble: true, bool cancelable: true}) {
  final Event e = document._createEvent(type);
  e._initEvent(name, canBubble, cancelable);
  return e;
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-html/Event/Event.eventType.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API