2

I would like to use webkit to create a simple web browser with some special functions. In particular, I would like to have a function that adds a word to a file, if I click on that word. Now, I already have the browser, but I could not figure out how I would read out the word at the mouse position. Could someone suggest either a solution, or some material on this?

Thanks,

v923z

4

2 回答 2

0

gtk webkit 与 python 对话的可能性有限。

这里有一个这样做的指南:

http://www.aclevername.com/articles/python-webgui/

它涉及将javascript发送到浏览器,并让浏览器与python通信以更改网页的标题。

于 2012-08-10T19:30:35.843 回答
0

显然他们修复了使用所选信号的能力,所以这样的事情可能会奏效......

mywebview.connect('selection-changed', nameofmyfunction)

并观察传递给 nameofmyfunction() 的参数。

于 2017-10-14T05:43:37.593 回答