[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 07 Feb 2020 15:47:03 -0500
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
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 :)
- eww/shr "inspector",
Derek Davies <=