-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds docs for add-global, will go into canjs/canjs.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters