all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* eww/shr "inspector"
@ 2020-02-07 20:47 Derek Davies
  2020-02-10  5:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Derek Davies @ 2020-02-07 20:47 UTC (permalink / raw)
  To: emacs-devel


Hi, I'm new to this list, have searched, but not found, info on eww/shr
functionality for "inspcting".


Hi!  I'm new to this list, searched, but didn't find existing info.

I'm trying to get "inspector" functionality out of (or into) eww/shr.

So for any character position in an *eww* buffer one can find the stack
of dom references, , leaf to root, that produced the character at the
buffer position in question..

I've been hacking on this, but only since I haven't found this
functionality in any emacs package.  Please let me know if it exists.
If not, I'm happy to discuss if and how this might be implemented and
implement it.

So far, I've got hacks to eww source that attempt to use shr hooks to
get the start and end buffer positions of each dom node as shr renders them.

This stack of dom references and buffer position pairs can then be
queried to provide html/dom information corresponding to what has been
rendered at a given buffer position.  For instance, display the "path"
of html elements, from document root to leaf, responsible for what is
rendered at point in the *eww* buffer.

Then it's easy to have "jump to start of leaf html element in page source"

I see CSS related code in eww/shr in 26.3 and would also like to be able to
inspect based on CSS selectors.

It would be great to be able to do web dev in eww and have as much of
what, say, the Firefox inspector offors, as possible.

It would be very nice to not have to duplicate or tamper with eww/shr
source code and provide this as a separate package, of course.

Thanks in advance for your help and interest in this!  Hopefully someone
else has already done the work and you can point me to it :)

Derek



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-10  5:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-07 20:47 eww/shr "inspector" Derek Davies
2020-02-10  5:34 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.