Classes
LandmarkDetector
2
▼
Detect HTML5 landmark elements in template output.
Analyzes Data nodes to find landmark elements l…
LandmarkDetector
2
▼
Detect HTML5 landmark elements in template output.
Analyzes Data nodes to find landmark elements like
Limitations:
- Only detects landmarks in static HTML (Data nodes)
- Cannot detect dynamically generated tags
- May miss landmarks inside included templates
Methods
detect
1
frozenset[str]
▼
Detect landmark elements in a node tree.
detect
1
frozenset[str]
▼
def detect(self, node: Node) -> frozenset[str]
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
AST node to analyze. |
Returns
frozenset[str]
Frozen set of landmark element names found.
Internal Methods 1 ▼
_visit
2
▼
Visit node and collect landmarks.
_visit
2
▼
def _visit(self, node: Any, landmarks: set[str]) -> None
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
|
landmarks |
— |