CHAPTER 25

image

Integrating Dart and HTML5

In this chapter we’ll cover what the Document Object Model (DOM) is and how you can manage it from Dart using the dart:html library. We’ll see how HTML documents are structured in dart:html and how to retrieve elements with the querySelector and querySelectorAll methods. Later, we’ll look at DOM events and how to create event handlers that are attached to DOM elements.

Throughout this book we have seen some similarities to and differences from JavaScript. Dart’s goal is to solve some problems inherent in current web development, and therefore it allows us to develop in a more uniform and structured way and ...

Get Web Programming with Dart 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.