JavaScript inside a browser
Browser JavaScript can respond to user input, modify the Document Object Model (DOM), request information over HTTP, update the visible interface and interact with supported browser facilities. For example, selecting a flight departure date might update a return-date control, recalculate the displayed duration of a trip and initiate a new search request. The browser can coordinate those interactions, but it should not become the final authority for reservation validity, supplier availability, permission checks or financial transactions. Browser code runs in an environment controlled by the user. Requests and displayed values can be modified independently of the application's intended interface.


