Summary
The given script hashes the page elements inner HTML, setting their ID from the result. The DOM traversal is depth-first post-order, meaning leaves will hash first, then down-branch until the final HTML node. Deeper hash digests will thus appear in the input of their contrainer hash steps. This provides Merkle-Tree properties.
- Element text and attribute changes invalidate ID at site
- This invalidates all parents IDs as well
- ID guarantees the contained HTML integrity
- Hash-Fragment back-links are permalinks
- Referent content change invalidates references to all down-branch IDs