inspect-component

0.0.1 • Public • Published

inspect

Inspect objects associated to DOM elements in web inspector.

Installation

$ component install component/inspect

Usage

By utilizing .dataset (and leaking memory) in development you can inspect objects associated with a given DOM element. Calls to inspect(el, obj) in production simply no-op. To enable set localStorage.inspect = true. In web inspector select a DOM node which has a data-inspect attribute, and execute inspect($0).

API

inspect(el, obj)

Associate obj with el.

inspect(el)

Return object associated with el.

License

MIT

/inspect-component/

    Package Sidebar

    Install

    npm i inspect-component

    Weekly Downloads

    3

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • tjholowaychuk