https://github.com/component/dev
Associate objects with DOM elements in development for easy inspection
https://github.com/component/dev
Last synced: 9 months ago
JSON representation
Associate objects with DOM elements in development for easy inspection
- Host: GitHub
- URL: https://github.com/component/dev
- Owner: component
- Created: 2013-03-29T20:53:22.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-15T23:57:34.000Z (about 12 years ago)
- Last Synced: 2025-04-03T07:05:02.805Z (12 months ago)
- Language: JavaScript
- Size: 124 KB
- Stars: 14
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# dev
Inspect objects associated to DOM elements in web inspector.

## Installation
$ component install component/dev
## Usage
When enabled via `localStorage.dev = true` the object
is assigned as `_` on the element for inspection in the
"properties" panel. This means when the element is selected
`$._` is also available. A name may be passed instead of `_`,
however `_` is nice as it will display early in the properties list.
## API
### inspect(el, obj, [name])
Associate `obj` with `el` as `name` defaulting to "_".
## License
MIT