pycrossword  0.3
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | List of all members
pycross.browser.WebPage Class Reference

Browser page class derived from QtWebEngineWidgets.QWebEnginePage. More...

Inheritance diagram for pycross.browser.WebPage:

Public Member Functions

def __init__ (self, QtWebEngineWidgets.QWebEngineProfile profile, parent=None)
 
def certificateError (self, QtWebEngineWidgets.QWebEngineCertificateError error)
 Override event to get user choice: ignore or reject certificate error. More...
 
def on_authenticationRequired (self, requestUrl, authenticator)
 Handler called when user authentication is required. More...
 
def on_featurePermissionRequested (self, securityOrigin, feature)
 Handler called when a feature permission like audio/video capture is requested. More...
 
def on_proxyAuthenticationRequired (self, requestUrl, authenticator, proxyHost)
 Handler called when the connection requires proxy authentication Shows a login/password dialog and collects the user data. More...
 
def on_registerProtocolHandlerRequested (self, request)
 Handler called when a website requests permission to handle links. More...
 
def on_selectClientCertificate (self, selection)
 Handler called when an HTTPS certificate is selected. More...
 

Detailed Description

Browser page class derived from QtWebEngineWidgets.QWebEnginePage.

Implements user authentication and customizable feature permissions.

Constructor & Destructor Documentation

◆ __init__()

def pycross.browser.WebPage.__init__ (   self,
QtWebEngineWidgets.QWebEngineProfile  profile,
  parent = None 
)
Parameters
profileQtWebEngineWidgets.QWebEngineProfile web profile
parentQtWidget.QWidget parent widget (WebView)

Member Function Documentation

◆ certificateError()

def pycross.browser.WebPage.certificateError (   self,
QtWebEngineWidgets.QWebEngineCertificateError  error 
)

Override event to get user choice: ignore or reject certificate error.

◆ on_authenticationRequired()

def pycross.browser.WebPage.on_authenticationRequired (   self,
  requestUrl,
  authenticator 
)

Handler called when user authentication is required.

Shows a password dialog and gets the entered login and password.

Parameters
requestUrlQtCore.QUrl URL of the page requiring authentication
authenticatorQAuthenticator authenticator object

◆ on_featurePermissionRequested()

def pycross.browser.WebPage.on_featurePermissionRequested (   self,
  securityOrigin,
  feature 
)

Handler called when a feature permission like audio/video capture is requested.

Asks the user showing a simple Yes/No dialog and sets the corresponding permissions.

Parameters
securityOriginQtCore.QUrl URL on the resource that requested feature permissions
featureQtWebEngineWidgets.QWebEnginePage.Feature requested feature, one of:
  • Geolocation: collect geolocation info
  • MediaAudioCapture: record audio (access to the mic)
  • MediaVideoCapture: record video (access to the webcam)
  • MouseLock: lock user's mouse
  • DesktopVideoCapture: capture screen
  • DesktopAudioVideoCapture: capture screen + sound card
  • Notifications: pop up notifications

◆ on_proxyAuthenticationRequired()

def pycross.browser.WebPage.on_proxyAuthenticationRequired (   self,
  requestUrl,
  authenticator,
  proxyHost 
)

Handler called when the connection requires proxy authentication Shows a login/password dialog and collects the user data.

Parameters
requestUrlQtCore.QUrl URL of the page requiring authentication
authenticatorQAuthenticator authenticator object
proxyHoststr current proxy host address

◆ on_registerProtocolHandlerRequested()

def pycross.browser.WebPage.on_registerProtocolHandlerRequested (   self,
  request 
)

Handler called when a website requests permission to handle links.

Parameters
requestQtWebEngineCore.QWebEngineRegisterProtocolHandlerRequest request for permission

◆ on_selectClientCertificate()

def pycross.browser.WebPage.on_selectClientCertificate (   self,
  selection 
)

Handler called when an HTTPS certificate is selected.

Parameters
selectionQWebEngineClientCertificateSelection certificate object

The documentation for this class was generated from the following file: