Add event apis and js library