Skip to content

WebEngineScript

Qt Base Class: QWebEngineScript

Signature: QWebEngineScript(self) -> None QWebEngineScript(self, other: PySide6.QtWebEngineCore.QWebEngineScript) -> None

Base classes

Name Children Inherits
QWebEngineScript
PySide6.QtWebEngineCore
QWebEngineScript(self) -> None

⋔ Inheritance diagram

graph TD
  1473574722000["webenginecore.WebEngineScript"]
  1473574642944["QtWebEngineCore.QWebEngineScript"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473574642944 --> 1473574722000
  1473291690208 --> 1473574642944
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QWebEngineScript

Source code in prettyqt\webenginecore\webenginescript.py
class WebEngineScript(QtWebEngineCore.QWebEngineScript):
    def set_injection_point(
        self, point: InjectionPointStr | QtWebEngineCore.QWebEngineScript.InjectionPoint
    ):
        """Set injection point.

        Args:
            point: injection point to use
        """
        self.setInjectionPoint(INJECTION_POINT.get_enum_value(point))

    def get_injection_point(self) -> InjectionPointStr:
        """Return injection point.

        Returns:
            injection point
        """
        return INJECTION_POINT.inverse[self.injectionPoint()]

get_injection_point() -> InjectionPointStr

Return injection point.

Source code in prettyqt\webenginecore\webenginescript.py
def get_injection_point(self) -> InjectionPointStr:
    """Return injection point.

    Returns:
        injection point
    """
    return INJECTION_POINT.inverse[self.injectionPoint()]

set_injection_point(point: InjectionPointStr | QtWebEngineCore.QWebEngineScript.InjectionPoint)

Set injection point.

Parameters:

Name Type Description Default
point InjectionPointStr | InjectionPoint

injection point to use

required
Source code in prettyqt\webenginecore\webenginescript.py
def set_injection_point(
    self, point: InjectionPointStr | QtWebEngineCore.QWebEngineScript.InjectionPoint
):
    """Set injection point.

    Args:
        point: injection point to use
    """
    self.setInjectionPoint(INJECTION_POINT.get_enum_value(point))