MCPcopy Create free account
hub / github.com/PyQt5/PyQt / _exposeInterface

Method _exposeInterface

QWebView/JsSignals.py:30–33  ·  view source on GitHub ↗

向Js暴露调用本地方法接口

(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected