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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.