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

Chapter 10. Beyond JavaScript: Interfaci... > Calling C++ Code from JavaScript

Calling C++ Code from JavaScript

In general, calling C++ code from within JavaScript is just like calling a method on any other JavaScript object. You simply use standard JavaScript object.method() notation to call a given method. For example, to create an object of type Date and then call a method on the object, in regular JavaScript code, you would write something like this:

var theDate = new Date(); 
var theDay = theDate.getDay(); 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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