Add console API

JavaScript console API.