向Js暴露调用本地方法接口
(self)
| 28 | self.page().mainFrame().javaScriptWindowObjectCleared.connect(self._exposeInterface) |
| 29 | |
| 30 | def _exposeInterface(self): |
| 31 | """向Js暴露调用本地方法接口 |
| 32 | """ |
| 33 | self.page().mainFrame().addToJavaScriptWindowObject('Bridge', self) |
| 34 | |
| 35 | # 注意pyqtSlot用于把该函数暴露给js可以调用 |
| 36 | @pyqtSlot(str) |
nothing calls this directly
no outgoing calls
no test coverage detected