Skip to content

WebEngineScript

Base classes

Name Children Inherits
QWebEngineScript
PySide6.QtWebEngineCore
QWebEngineScript(self, other: PySide6.QtWebEngineCore.QWebEngineScript, /, *, name: str | None \= None, sourceUrl: PySide6.QtCore.QUrl | None \= None, sourceCode: str | None \= None, injectionPoint: PySide6.QtWebEngineCore.QWebEngineScript.InjectionPoint | None \= None, worldId: int | None \= None, runsOnSubFrames: bool | None \= None) -> None

⋔ Inheritance diagram

graph TD
  2484343975["webenginecore.WebEngineScript"]
  385433963["QtWebEngineCore.QWebEngineScript"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  385433963 --> 2484343975
  37984305 --> 385433963
  2751680898 --> 37984305

🛈 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))

:fa-brands-github: Show source on GitHub