[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eww/shr "inspector"

From: Derek Davies
Subject: eww/shr "inspector"
Date: Fri, 07 Feb 2020 15:47:03 -0500
User-agent: mu4e 1.2.0; emacs 26.3

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 :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]