Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the add-global/ module #21

Merged
merged 1 commit into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions add-global.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@module {function} can-event-dom-enter/add-global/add-global can-event-dom-enter/add-global/add-global
@parent can-event-dom-enter
@description

Registers a global `enter` event, allowing listening to enter anywhere in your application.

@signature `unregister()`

Importing `can-event-dom-enter/add-global/add-global` registers the __enter__ event globally. Calling `unregister()` removes it from the global registry.

```js
import unregister from 'can-event-dom-enter/add-global/add-global';

// Later time
unregister();
```
1 change: 1 addition & 0 deletions can-event-dom-enter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function isEnterEvent (event) {
* @module {events} can-event-dom-enter
* @parent can-dom-utilities
* @collection can-infrastructure
* @group can-event-dom-enter.modules modules
* @package ./package.json
*
* Watch for when enter keys are pressed on a DomEventTarget.
Expand Down