https://github.com/component/removed
Invoke a callback when a DOM element is removed from the document
https://github.com/component/removed
Last synced: 8 months ago
JSON representation
Invoke a callback when a DOM element is removed from the document
- Host: GitHub
- URL: https://github.com/component/removed
- Owner: component
- Created: 2012-09-13T19:16:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-03-19T22:09:34.000Z (about 11 years ago)
- Last Synced: 2024-12-04T17:47:14.200Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# removed
Invoke a callback when a DOM element is removed.
## Installation
$ component install component/removed
## Example
```js
var removed = require('removed');
removed(el, function(){
console.log('element was removed!');
});
```
## API
### removed(el, fn)
Invokes `fn` when `el` is removed from the DOM.
### .interval
The `setInterval` fallback uses `removed.interval`, defaulting to 200ms.
# License
MIT