1.0.1 • Published 6 years ago

element-to-source v1.0.1

Weekly downloads
18
License
MIT
Repository
-
Last release
6 years ago

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?
1.0.1

6 years ago

1.0.0

6 years ago