I don't see anything this has to do with browsers. This could be implemented perfectly well in a library.