How to Mutiple call js file in V8

28 views
Skip to first unread message

louis...@gmail.com

unread,
Sep 27, 2016, 11:23:26 PM9/27/16
to v8-users
Hi every handsome man:

    I have two JavaScript Files.

egg:
       1.js file: function main(){Init(); }
       2.js file: function Init(){...}

question:
       how to include 2.js In 1.js file? I use <script src="2.js" type="text/javascript"></script> error in V8.Excuse me,What's the right way to do it ? 

Thank You! 


Louis Santillan

unread,
Oct 3, 2016, 12:55:32 AM10/3/16
to v8-u...@googlegroups.com
See the HelloWorld example [0]. V8 does not anything about HTML's
script tag by itself.


[0] https://chromium.googlesource.com/v8/v8/+/branch-heads/4.8/samples/hello-world.cc#59
> --
> --
> v8-users mailing list
> v8-u...@googlegroups.com
> 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 v8-users+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Zac Hansen

unread,
Oct 3, 2016, 1:01:05 AM10/3/16
to v8-users

There is no standard way to include a javascript file from inside another javascript file.  You can write your own, similar to how node.js does it, but that is something you'd have to write as a native extension.
Reply all
Reply to author
Forward
0 new messages