Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering DART

You're reading from   Mastering DART Master the art of programming high-performance applications with Dart

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher Packt
ISBN-13 9781783989560
Length 346 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sergey Akopkokhyants Sergey Akopkokhyants
Author Profile Icon Sergey Akopkokhyants
Sergey Akopkokhyants
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Beyond Dart's Basics 2. Advanced Techniques and Reflection FREE CHAPTER 3. Object Creation 4. Asynchronous Programming 5. The Stream Framework 6. The Collection Framework 7. Dart and JavaScript Interoperation 8. Internalization and Localization 9. Client-to-server Communication 10. Advanced Storage 11. Supporting Other HTML5 Features 12. Security Aspects Index

The dart:js library


The core set of Dart libraries include dart:js to facilitate interoperation between the Dart and JavaScript code. The Dart code can create new instances, invoke methods, and read and write properties of the code written in JavaScript. While communicating, the dart:js library translates the JavaScript objects to Dart objects and vice versa, or uses proxy classes. Let's take a look at the class hierarchy of the dart:js library:

JsObject

Similar to an Object class in JavaScript, JsObject is a main class in the dart:js library. It represents a proxy of a JavaScript object and provides the following advantages:

  • Access to all the properties of the underlying JavaScript object by indexing the [] and []= operators

  • Access to invoke any methods of the underlying JavaScript object through callMethod

  • Access to the global JavaScript object (usually window) in the web browser through the context property

  • Usage of the instanceOf method to check if the underlying JavaScript object has the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image