An excerpt from the Javascript API's .js file