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

Chapter 22. Using Java with JavaScript > Java-to-JavaScript Data Conversion

22.7. Java-to-JavaScript Data Conversion

In the last two sections, we discussed the rules by which values are converted when JavaScript reads and writes Java fields and invokes Java methods. Those rules explained how the JavaScript JavaObject, JavaArray, and JavaClass objects convert data; they apply only to the case of JavaScript manipulating Java. When Java manipulates JavaScript, the conversion is performed by the Java JSObject class, and the conversion rules are different. Figure 22-4 and Figure 22-5 illustrate these conversions.

Figure 22-4. Data conversions performed when Java writes JavaScript values



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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