Connect the page signal for GreaseMonkey

Looks like we don't get the mainFrame's loadFinished signal properly.
This commit is contained in:
Florian Bruhin 2017-11-20 07:31:13 +01:00 committed by Jimmy
parent 6933bc05b4
commit db353c4030

View File

@ -86,7 +86,8 @@ class BrowserPage(QWebPage):
self.on_save_frame_state_requested)
self.restoreFrameStateRequested.connect(
self.on_restore_frame_state_requested)
self.connect_userjs_signals(self.mainFrame())
self.loadFinished.connect(
functools.partial(self.inject_userjs, self.mainFrame()))
self.frameCreated.connect(self.connect_userjs_signals)
@pyqtSlot('QWebFrame*')