[PyQt] evaluateJavaScript on every page

Peter Irbizon peterirbizon at gmail.com
Sat Apr 5 10:34:16 BST 2014


thank you Michael! it works :)


2014-04-05 5:31 GMT+02:00 michael h <michaelkenth at gmail.com>:

>
>
> 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/20140405/13a80b76/attachment.html>


More information about the PyQt mailing list