hmmm. let's see if I can do this briefly. The reason why I (think I) need the actual nodes is:
- once I have them I start looping through each node, and looping through each word in each node, feeding it to the spellcheck engine (fair enough, could just use the nodeValue for that)
- then if it comes up misspelt, the user gets the option to change it, either by direct input or from a list (ok, that bit was irrelevant)
- but then, the page only registers a change under two conditions (and these I can't do anything about):
1. the text has actually changed
2. the parent node of the text node has gained and lost focus
yeah, so that's the bit - when/if the change does occur I dispatch a focus and blur event to the parentNode of the text node that got changed, thereby registering the change. Which is why I need to know, at the time of that change, which node the text belongs to.
I think. I mean, I could just store a reference to the parentNode that the text belongs to at the time of pushing it onto the array, but then I'm back where I started...
unless there's some better way of going about this?