Renamed APIs to match MDN documentation