Browser event record & replay library