Background
With the use “Google script” editor from Chrome browser, I can execute the
following Google script and get the result shown below function
myFunction`` script.
function myFunction(){
// Gets the price of Google's stock.
var info = FinanceApp.getStockInfo('GOOG');
Logger.log('The stock %s is trading at %s', info.name, info.price);}
Output
[14-01-17 21:19:19:440 EST] The stock Google Inc is trading at
1150.530029296875
I am finding that, in addition to the standard Google apps services, one
can select large array of “Advanced Google Services” (Ex: Prediction,
AdSense) from Google script editor “Resource” menu item. This facility let
one to develop small Java script code having very rich functionality.
What I would like to do
I liked to use the “Google Apps Services” from C++ codebase (not from
browser). I believed, one way to get access to the above services is
through V8 C++ based Java script engine.
Hence I downloaded V8 C++ engine, built it and was able to compile and run
the ‘Hello World” test code provided in
https://developers.google.com/v8/get_started.
Then I modified line
Handle<String> source = String::NewFromUtf8(isolate, "'Hello' + ', World!'");
in the “Hello World” program as follows:
Handle<String> source = String::NewFromUtf8(isolate, "var info =
FinanceApp.getStockInfo('GOOG');");
But I am getting “:11: Uncaught ReferenceError: FinanceApp is not defined
(null)”.
I am new to JavaScript. But I can say that the V8 JavaScript engine is
unable to find the “Finance” JavaScript library in my environment. Looks
like, this library is built into Chrome browser by default and works well
in Google Script editor.
My Question
I would like to know whether Google support embedding “Google Apps Service”
library from embedded JavaScript.
Even if not part of standard V8 download, do I have a way of getting the
Google Apps Service libraries into V8 C++ environment in my desktop
environment?
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.