Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/auchenberg/element-to-source
Providing utility to map a DOM element to source information, using debug metadata provided by (some) frameworks.
https://github.com/auchenberg/element-to-source
Last synced: 3 months ago
JSON representation
Providing utility to map a DOM element to source information, using debug metadata provided by (some) frameworks.
- Host: GitHub
- URL: https://github.com/auchenberg/element-to-source
- Owner: auchenberg
- Created: 2019-02-09T04:38:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-28T03:21:39.000Z (over 5 years ago)
- Last Synced: 2024-10-28T18:56:03.501Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 34
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - element-to-source - Providing utility to map a DOM element to source information, using debug metadata provided by (some) frameworks. (TypeScript)
README
# element-to-source
-------------------Providing utility to map a DOM element to source information, using debug metadata provided by (some) frameworks.
API:
````javascript
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
- Svelte.js via https://github.com/sveltejs/svelte/issues/1499 (when in Dev Mode)
- React / Create React App via https://medium.com/@sitambas/get-global-element-state-a408a744e99d## 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?