unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* XWidget/WebKit:  Getting Web Content From Webkit To Emacs
@ 2016-01-23 21:14 raman
  2016-01-23 21:56 ` joakim
  0 siblings, 1 reply; 5+ messages in thread
From: raman @ 2016-01-23 21:14 UTC (permalink / raw)
  To: emacs-devel; +Cc: tv.raman.tv

Now that we have XWidget/Webkit --- I was wondering what it would take
to get content from Webkit into Emacs --- this time in the form of
"real content" rather than "What You See Is All You Have Content".

Some Thoughts:

1. Would it be possible to get the DOM (as an html DOM a la EWW) from
Webkit? That would give us content that Emacs ordinarily cannot get --
e.g. content generated through script evaluation.

2. Ability to send events / scripts from Emacs to WebKit -- I see that
some of this might already be possible from looking at the code in
xwidget.el. It's not clear how Emacs can get at structured content
returned by JS.


3. Function xwidget-webkit-copy-selection-as-kill will hopefully let
me get the rendered text contents into the kill ring -- but how do I
select the contents of a webkit buffer (without using a mouse)?

-- 

-- 



^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: XWidget/WebKit: Getting Web Content From Webkit To Emacs
@ 2016-01-25 11:14 Vasilij Schneidermann
  2016-01-25 11:34 ` joakim
  0 siblings, 1 reply; 5+ messages in thread
From: Vasilij Schneidermann @ 2016-01-25 11:14 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel

> Sadly there wasn't a good function for returning values from webkit in
> their api when I wrote the code. I haven't checked if that situation has
> changed recently. The return value is pased by setting the
> document.title. Ahem... I'm not sure about the limits of this mechanism,
> it has been working for the things I've done anyway.


This is still the case for webkit1gtk, webkit2gtk however introduced
the functions webkit_web_view_run_javascript and
webkit_web_view_run_javascript_finish which allow you to evaluate
JavaScript asynchronously and retrieve the return value once it's
done.



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

end of thread, other threads:[~2016-01-25 11:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23 21:14 XWidget/WebKit: Getting Web Content From Webkit To Emacs raman
2016-01-23 21:56 ` joakim
2016-01-25  1:42   ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2016-01-25 11:14 Vasilij Schneidermann
2016-01-25 11:34 ` joakim

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