[PyQt] evaluateJavaScript on every page

michael h michaelkenth at gmail.com
Sat Apr 5 04:31:23 BST 2014


On Fri, Apr 4, 2014 at 5:40 AM, Peter Irbizon <peterirbizon at gmail.com>wrote:

> Hi Michael,
>
> thank you!  Could you please let me know small example where should I
> initiate Florian's suggestion in my example code? (I am not very
> experienced user with this)
>
>
Use either:
self.page().mainFrame().javaScriptWindowObjectCleared.connect(someMethodToEvalJS)
or
self.view.page().mainFrame().javaScriptWindowObjectCleared.connect(someMethodToEvalJS)

Also, according to the docs, you should use the same signal for
calling addToJavaScriptWindowObject
if you want any added objects to be accessible beyond the first page load.

- MH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140404/c2865566/attachment.html>


More information about the PyQt mailing list