including a js file in my v8 js file

806 views
Skip to first unread message

souad agoun

unread,
Apr 23, 2012, 6:04:53 AM4/23/12
to v8-users
hi
i need to call external js functions in my current javascript v8 file.
I tried to include a js file in my v8 js file and it's not working :/
(i can't even run my include ('file.js') i am a new user of v8 :/ )
is there any solution for that ?
thank you in advance

swathi jakkam

unread,
Apr 23, 2012, 6:38:19 AM4/23/12
to v8-users
Hi,

please see the below link.it is very help full for new users of v8.
Download demo - 2.97 MB from below link. this dmeo project explain how
to call the JS functions from v8 and how to declare the variables in
v8.

http://www.codeproject.com/Articles/29109/Using-V8-Google-s-Chrome-JavaScript-Virtual-Machin#

Regards,
swathi.

Mike Schwartz

unread,
Apr 23, 2012, 7:12:59 AM4/23/12
to v8-u...@googlegroups.com
You might also look at the source to SilkJS.  It includes its own built-in JS classes at startup and provides both include() and require() (CommonJS) functions.




David Colmenares

unread,
Feb 22, 2018, 7:06:25 AM2/22/18
to v8-users
in the folder $V8_PATH/src there is a file d8.cpp, inside there is a function called ReadFile, that has the model of how to load files and compile them to js

Reply all
Reply to author
Forward
0 new messages