BrowsingContext
BrowsingContext
概述
BrowsingContext 是 Aspose.Html FOSS 中用于 Python 的类。
导航生命周期/文档状态的内部拥有者。
此类提供 11 个方法,用于在 Python 程序中处理 BrowsingContext 对象。可用的方法包括:__init__、accept_response、attach_document、begin_navigation、cancel_navigation、complete_non_html、iframe_content_document_for、iframe_content_window_for、mark_complete、mark_parsing、record_dynamic_markup_intent。在安装了 Aspose.Html FOSS for Python 包之后,所有公共成员对任何 Python 应用程序均可访问。属性:active_navigation_token、cleanup_marks、current_document、dynamic_markup_intents、lifecycle_state、navigation_epoch。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
current_document | "Document" | 读取 | 获取当前文档。 |
lifecycle_state | str | 读取 | 获取生命周期状态。 |
cleanup_marks | list[str] | 读取 | 获取清理标记。 |
navigation_epoch | int | 读取 | 获取导航纪元。 |
active_navigation_token | `int | None` | 读取 |
dynamic_markup_intents | tuple[str, ...] | 读取 | 已记录文档 dynamic-markup 意图通过 lifecycle owner 路由。 |
方法
| 签名 | 描述 |
|---|---|
__init__(document: "Document") | Calls init(document) 在此 BrowsingContext 实例上。 |
record_dynamic_markup_intent(operation: str) | 在不变更生命周期所有权的情况下记录 dynamic-markup 意图。 |
iframe_content_document_for(iframe_element: object) → `object | None` |
iframe_content_window_for(iframe_element: object) → `object | None` |
begin_navigation() → bool | 在此 BrowsingContext 实例上调用 begin_navigation。 |
accept_response() | 在此 BrowsingContext 实例上调用 accept_response。 |
attach_document(document: "Document") | 在此 BrowsingContext 实例上调用 attach_document(document)。 |
mark_parsing() | 在此 BrowsingContext 实例上调用 mark_parsing。 |
mark_complete() | 在此 BrowsingContext 实例上调用 mark_complete。 |
complete_non_html() | 在此 BrowsingContext 实例上调用 complete_non_html。 |
cancel_navigation() → bool | 在此 BrowsingContext 实例上调用 cancel_navigation。 |