All Projects → auchenberg → element-to-source

auchenberg / element-to-source

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

Programming Languages

typescript
32286 projects

element-to-source


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

API:

    import { resolve } from 'element-to-source';
    var domElement = document.getElementById('#main');

    var sourceMetadata = resolve(domElement);
    // {
    //     charNumber: 0,
    //     columnNumber: 0,
    //     fileName: 'component.tsx',
    //     lineNumber: 0
    // }

Supported frameworks

Unsupported

I would love to get help finding ways to enable any of these.

  • Angular
  • Vue.js
  • React + Parcel bundler
  • Next.js?
  • Web Components
  • Ionic?
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].