Dorward's Ramblings

JavaScript Timelines

Published on

I have a TODO list, mostly populated with ideas that I will likely never get around to implementing. This is one such entry.

Yesterday, I made one of my rare uses of the INS and DEL elements. These elements include an attribute that allows you to specify when the insertion or deletion took place, which brings to mind an idea…

With document.getElementsByTagName() it is very easy to get all the INS and DEL elements in a document. The datetime attribute uses an ISO data format which you can use to sort the elements (with just a little work to handle the timezone information).

So now you have a list of what has been added and what has been removed and when. So if you add a nice user interface (I'm thinking YUI Slider), you could scroll through the history of the document.

Now that I've got that down, I'm starting to think that this might be something that could be achieved pretty quickly, and maybe it won't live under the fold on my TODO list forever after all. (That said, if someone else wants to write it, then don't let me hold you back, but please let me know.

Follow-up: 21 May