unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: "Perry E. Metzger" <perry@piermont.com>
Cc: Ricardo Wurmus <rekado@elephly.net>, emacs-devel@gnu.org
Subject: Re: fine grained control of webkit browsing
Date: Tue, 19 Jun 2018 20:58:09 +0200	[thread overview]
Message-ID: <87in6e4n9a.fsf@chopper> (raw)
In-Reply-To: <20180619123716.5741c9c0@jabberwock.cb.piermont.com> (Perry E. Metzger's message of "Tue, 19 Jun 2018 12:37:16 -0400")

"Perry E. Metzger" <perry@piermont.com> writes:

> On Tue, 19 Jun 2018 18:19:07 +0200 Ricardo Wurmus
> <rekado@elephly.net> wrote:
>> Perry E. Metzger <perry@piermont.com> writes:
>>
>> > 2) Say one wants to do things like viewing something with
>> > javascript off and without loading remote elements (say because
>> > one wants to safely view some HTML email). What does one need to
>> > do to get this to work?
>>
>> The widget is not fully integrated into Emacs.
>
> It would be neat if it were. One would like, for example,
> to be able to move a cursor around in it with keyboard commands,
> copy text, and move back to another buffer and paste it without
> touching the mouse.
>
>> The extent to which one can conveniently communicate with the widget
>> is by sending a string containing a JavaScript program to the widget
>> and have it return a value.  Everything else requires exposing
>> Webkit API features to Elisp.
>
> Ah, so at the moment, this isn't yet at the point where (for example)
> one could safely use it to view HTML email. (To do that, among other
> things, one needs to shut off JavaScript and to allow programmatic
> control over which images are loaded.)
>
>> Attached is an old patch that I never submitted that allows one to
>> set webkit settings via Elisp.  Unfortunately, disabling JavaScript
>> for the widget also disables JavaScript evaluation of strings that
>> are sent from Emacs -- we use JavaScript for telling the widget to
>> scroll, for example. (See ___xwidget-webkit-scroll-bottom___ or
>> ___xwidget-webkit-show-element___.)
>
> So it would be necessary to tighten the integration a lot more in
> order to make this work as cleanly as one might like?

The original idea was to expose the entire webkit api to emacs using
gobject introspection. There is an initial attempt to do this in one of
the xwidget branches. That work is stalled. I think it would be a
nice project for some enterprising person though.

>
> Perry
-- 
Joakim Verona
joakim@verona.se
+46705459454



  reply	other threads:[~2018-06-19 18:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 15:49 fine grained control of webkit browsing Perry E. Metzger
2018-06-19 16:19 ` Ricardo Wurmus
2018-06-19 16:37   ` Perry E. Metzger
2018-06-19 18:58     ` joakim [this message]
2018-06-19 20:51       ` Perry E. Metzger
2018-06-19 21:31         ` joakim
2018-06-20  0:19     ` T.V Raman
2018-06-19 22:57   ` Richard Stallman
2018-06-20  1:20     ` Perry E. Metzger
2018-06-20 23:26       ` Richard Stallman
2018-06-21  0:00         ` Perry E. Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in6e4n9a.fsf@chopper \
    --to=joakim@verona.se \
    --cc=emacs-devel@gnu.org \
    --cc=perry@piermont.com \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).