Spec-Zone.ru › Dart 1

dart:html

Конструктор фабрики Event.eventType

Event.eventType(String type, String name, { bool canBubble: true, bool 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 Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/Event/Event.eventType.html

Spec-Zone.ru

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