element-to-source
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

element-to-source


Providing utility to map a DOM element to source information, using debug metadata provided by (some) frameworks.

API:

    let get = import 'element-to-source';
    var domElement = document.getElementById('#main');
 
    var sourceInfo = get(domElement);
    // {
    //     charNumber: 0,
    //     columnNumber: 0,
    //     fileName: 'component.tsx',
    //     lineNumber: 0
    // }

Supported frameworks

Todo

  • Angular
  • Vue.js
  • Web Components
  • Ionic?

Readme

Keywords

none

Package Sidebar

Install

npm i element-to-source

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.55 kB

Total Files

6

Last publish

Collaborators

  • auchenberg