CHAPTER 5

image

Running TypeScript in a Browser

All modern web browsers—on desktops, game consoles, tablets and smart phones—include JavaScript interpreters, making JavaScript the most ubiquitous programming language in history.

—David Flanagan

Although there are many different environments you might target with your TypeScript program, one of the widest categories of runtime will surely be the web browser. This chapter introduces the general design of the web browser before introducing practical examples for interacting with web pages, making asynchronous requests to the web server, storing data on the user’s local machine, and accessing hardware ...

Get Pro TypeScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.