about ES6 modules

39 views
Skip to first unread message

Levente Bogár

unread,
Feb 20, 2022, 12:32:28 PM2/20/22
to v8-dev
Hello, everyone.
This question might be a little weird, but I just cannot get resources about how the v8 API handles modules. Up until now, I used information from the d8 source when I got stuck, but now even that doesn't help me.
I want to call a function that's defined in a module(not exported) from the c++ side, if that makes sense. Achieving this with scripts is really easy, because the defined functions are contained in the global object of the current context. However, it seems like that's not the case when it comes to modules. I tried everything I possibly could, but it seems like I just can't solve this issue myself.
If anyone could give me some resources, or even a project that implemented this feature, please let me know.

Thanks!

Jakob Kummerow

unread,
Feb 21, 2022, 7:48:13 AM2/21/22
to v8-...@googlegroups.com
Have you checked out test/cctest/test-modules.cc? One of the examples in there might be related to what you're trying to do.


--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/6e649b3c-1c8b-4a16-89df-e34f5f3b7e56n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages