- Documentation
- Guides & Tutorials
- DOM-Aware Binding
Guides & Tutorials
DOM-Aware Binding
Understanding how annotations persist through page changes
Overview
DOM-aware binding ensures that annotations remain attached to the correct elements even when the page structure changes.
How It Works
Inpera uses multiple strategies to track elements:
- Semantic attributes and stable IDs
- Content-based matching
- Visual similarity and context
- Fallback strategies for edge cases
Best Practices
To ensure annotations persist correctly:
- Use stable IDs for important elements
- Avoid frequently changing class names
- Keep semantic HTML structure consistent
- Test annotations after major refactors