All web applications import the dart:html
Dart library; this is a huge collection of functions and classes needed to program the DOM (look it up at api.dartlang.org). Let's discuss the base classes, which are as follows:
The
Navigator
class contains information about the browser running the app, such as the product (the name of the browser), its vendor, the MIME type supports the installed plugins, and also the geolocation object.Every browser window corresponds to an object of the
Window
class, which contains, among many others, anavigator
object, theclose
,print
,scroll
, andmoveTo
methods, and a whole bunch of event handlers, such asonLoad
,onClick
,onKeyUp
,onMouseOver
,onTouchStart
, andonSubmit
. Use an alert to get a pop-up message in the web page, such as intodo_v2.dart
:window.onLoad.listen( (e) => window.alert("I am at your disposal") );
If your browser has tabs, each tab will open in a separate window. From the
Window...