• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Object() > Example: Creating a Persistent Reference to this

Example: Creating a Persistent Reference to this

Until recently, I believed the prototype property of objects meant a new copy of prototyped-in properties and methods would exist, instead of a reference to a common object. Though I was wrong, the reference allows me to finally solve a problem that has vexed me for more than two years.

In Chapter 15, “window,” I cover the setTimeout() and setInterval() methods. Essentially, these allow you to create JavaScript commands the browser will execute later. The catch is you cannot use the keyword this in these string commands:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint