Work in progress frontpoll to javascript