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.


  1. Element text and attribute changes invalidate ID at site
  2. This invalidates all parents IDs as well
  3. ID guarantees the contained HTML integrity
  4. Hash-Fragment back-links are permalinks
  5. Referent content change invalidates references to all down-branch IDs