How does google docs do their commenting?
They allow you to highlight portions of text, and assign a comment to it... So, how do you associate an object with something that changes all the time? 

Does each word need to be an object? Like... the comment would just have an array of words that it's associated with? and then change what is in that array as the document is edited?


I feel like the each-word-is-an-object approach would result in a slow web app. =\
How does google docs do their commenting?
===

They allow you to highlight portions of text, and assign a comment to it... So, how do you associate an object with something that changes all the time? 

Does each word need to be an object? Like... the comment would just have an array of words that it's associated with? and then change what is in that array as the document is edited?


I feel like the each-word-is-an-object approach would result in a slow web app. =\