Add in JavaScript functionality.