Details
Description
I am not sure if this is a bug or simply a documentation gap.
First, the PySide6 bindings for the QWebEnginePage.runJavascript() have distinct call signatures from the C++ or Qt6 bindings, but the documentation contains no information on how to use them. In particular the arguments have no names and type of the final argument (what is presumably the callback function?) is just labelled "Object".
Second, I am not sure if the second call signature, which appears to accept a worldId but not a callback, is correct. The two options that PyQt6 and Qt C++ offer are about whether or not worldId must be specified, with both signatures accepting a callback. This is apparently correct documentation but possibly a mistake in the bindings, where the final argument was truncated instead of the second one.
void QWebEnginePage::runJavaScript(const QString &scriptSource, const std::function<void (const QVariant &)> &resultCallback) void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId = 0, const std::function<void (const QVariant &)> &resultCallback = {})
Attachments
Issue Links
- relates to
-
PYSIDE-946 Missing methods for QWebEnginePage with QWebEngineCallback
- Closed