Javascript library, testing a DOM game