crossvent

WebJar for crossvent

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

crossvent
Последняя версия

Последняя версия

1.5.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

crossvent
WebJar for crossvent
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/bevacqua/crossvent

Скачать crossvent

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/crossvent/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>crossvent</artifactId>
    <version>1.5.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/crossvent/
implementation 'org.webjars.npm:crossvent:1.5.5'
// https://jarcasting.com/artifacts/org.webjars.npm/crossvent/
implementation ("org.webjars.npm:crossvent:1.5.5")
'org.webjars.npm:crossvent:jar:1.5.5'
<dependency org="org.webjars.npm" name="crossvent" rev="1.5.5">
  <artifact name="crossvent" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='crossvent', version='1.5.5')
)
libraryDependencies += "org.webjars.npm" % "crossvent" % "1.5.5"
[org.webjars.npm/crossvent "1.5.5"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : custom-event jar [1.0.0,2)

Модули Проекта

Данный проект не имеет модулей.

crossvent

Cross-platform browser event handling

The event handler API used by dominus.

Install

Using Bower

bower install -S crossvent

Using npm

npm install -S crossvent

API

The API exposes a few methods that let you deal with event handling in a consistent manner across browsers.

crossvent.add(el, type, fn, capturing?)

Adds an event listener fn of type type to DOM element el.

crossvent.add(document.body, 'click', function (e) {
  console.log('clicked document body');
});

crossvent.remove(el, type, fn, capturing?)

Removes an event listener fn of type type from DOM element el.

crossvent.add(document.body, 'click', clicked);
crossvent.remove(document.body, 'click', clicked);

function clicked (e) {
  console.log('clicked document body');
}

crossvent.fabricate(el, type, model?)

Creates a synthetic custom event of type type and dispatches it on el. You can provide a custom model which will be accessible as e.detail.

crossvent.add(document.body, 'sugar', sugary);
crossvent.fabricate(document.body, 'sugar', { onTop: true });

function sugary (e) {
  console.log('synthetic sugar' + e.detail.onTop ? ' on top' : '');
}

License

MIT

Версии библиотеки

Версия
1.5.5
1.5.4
1.5.0