GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.html2.WebViewHandler
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx.html2

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.html2.WebViewHandler — wxPython 4.3.2 Docs

phoenix_title wx.html2.WebViewHandler¶

The base class for handling custom schemes in wx.html2.WebView, for example to allow virtual file system support.

A new handler should either implement GetFile or if a more detailed request handling is required (access to headers, post data) StartRequest has to be implemented.

wx.html2.WebView

Added in version 2.9.3.

See also

wx.html2.WebView


class_hierarchy Class Hierarchy¶

Inheritance diagram for class WebViewHandler:

Inheritance diagram of WebViewHandler


sub_classes Known Subclasses¶

wx.html2.WebViewArchiveHandler, wx.html2.WebViewFSHandler


method_summary Methods Summary¶

__init__

Constructor.

GetFile

GetName

GetSecurityURL

GetVirtualHost

SetSecurityURL

Sets a custom security URL.

SetVirtualHost

When using the edge backend handler urls are https urls with a virtual host.


property_summary Properties Summary¶

Name

See GetName

SecurityURL

See GetSecurityURL and SetSecurityURL

VirtualHost

See GetVirtualHost and SetVirtualHost


api Class API¶

class wx.html2.WebViewHandler(object)¶

Possible constructors:

WebViewHandler(scheme) -> None

The base class for handling custom schemes in WebView, for example to allow virtual file system support.


Methods¶

__init__(self, scheme)¶

Constructor.

Takes the name of the scheme that will be handled by this class for example file or zip .

Parameters:

scheme (string)

Return type:

None



GetFile(self, uri)¶
Parameters:

uri (string)

Return type:

FSFile

Returns:

A pointer to the file represented by uri , or nullptr. The caller takes ownership of the returned pointer and is responsible for deleting it.



GetName(self)¶
Return type:

str

Returns:

The name of the scheme, as passed to the constructor.



GetSecurityURL(self)¶
Return type:

str

Returns:

The custom security URL. Only used by WebViewIE .

Added in version 4.1/wxWidgets-3.1.5.



GetVirtualHost(self)¶
Return type:

str

Returns:

The virtual host of this handler

Added in version 4.3/wxWidgets-3.3.0.

See also

SetVirtualHost



SetSecurityURL(self, url)¶

Sets a custom security URL.

Only used by WebViewIE .

Parameters:

url (string)

Return type:

None

Added in version 4.1/wxWidgets-3.1.5.



SetVirtualHost(self, host)¶

When using the edge backend handler urls are https urls with a virtual host.

As default name.wxsite is used as the virtual hostname. If you customize this host, use a non existing site (ideally a reserved subdomain of a domain you control). If localassests.domain.example is used the handlers content will be available under https://localassets.domain.example/

This has to be set before registering the handler via wx.html2.WebView.RegisterHandler .

Parameters:

host (string)

Return type:

None

Added in version 4.3/wxWidgets-3.3.0.


Properties¶

Name¶

See GetName



SecurityURL¶

See GetSecurityURL and SetSecurityURL



VirtualHost¶

See GetVirtualHost and SetVirtualHost

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.