CustomElementRegistry

Overview

CustomElementRegistry is a class in Aspose.HTML FOSS for Python.

CustomElementRegistry lets developers define, retrieve, and upgrade custom HTML elements at runtime.

This class declares 6 methods for CustomElementRegistry objects in Python programs. Available methods include: __init__, define, get, get_name, upgrade, when_defined. Public members are accessible to any Python application after installing the Aspose.HTML FOSS for Python package.

Methods

SignatureDescription
__init__(document: "Document")Calls init(document) on this CustomElementRegistry instance.
define(name: str, constructor: type, observed_attributes: tuple[str, ...])Calls define(name, constructor, observed_attributes) on this CustomElementRegistry instance.
get(name: str) → "type[HTMLElement] | None"Calls get(name) on this CustomElementRegistry instance.
get_name(constructor: type) → str | NoneCalls get_name(constructor) on this CustomElementRegistry instance.
upgrade(root: "Node")Calls upgrade(root) on this CustomElementRegistry instance.
when_defined(name: str) → str | NoneCalls when_defined(name) on this CustomElementRegistry instance.

See Also