
element-source: Resolve DOM Element Source Locations at Runtime
element-source: a JavaScript library that resolves the source file location, component name, and full stack trace for any DOM element at runtime. Key features: Works with React, Preact, Vue, Svelte, and Solid Async API with resolveElementInfo , resolveSource , resolveStack , and resolveComponentName Custom framework resolver support via createSourceResolver Built-in stack formatting with formatStack and formatStackFrame Originally built to power React Grab, a browser tool for feeding source context to AI coding agents 👉 Blog Post 👉 GitHub Repo 👉 Live Demo
Continue reading on Dev.to Webdev
Opens in a new tab



