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

JsFunction and the this keyword


The this keyword refers to the current instance of a class in Dart and never changes once the class object is instantiated. Generally, we should omit the this keyword and use it only if we have name conflicts between the class members and function arguments or variables. In JavaScript, the this keyword refers to the object that owns the function and behaves differently compared to Dart. It mostly depends on how a function is called. We can't change the value of this during function execution and it can be different every time the function is called. The call and apply methods of Function.prototype were introduced in ECMAScript 3 to bind any particular object on the value of this in the call of these methods:

fun.call(thisArg[, arg1[, arg2[, ...]]])
fun.apply(thisArgs[, argsArray])

While the syntax of both these functions looks similar, the fundamental difference is that the call method accepts an argument list while the apply method accepts a single array of...

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