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.
On Sun, Feb 20, 2022 at 6:32 PM Levente Bogár <[email protected]> wrote: > 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! > > -- > -- > v8-dev mailing list > [email protected] > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/6e649b3c-1c8b-4a16-89df-e34f5f3b7e56n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-dev/6e649b3c-1c8b-4a16-89df-e34f5f3b7e56n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-dev mailing list [email protected] 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAKSzg3SxXqrbiJjFxF_Y7Z9hE35K3_3vSNt1HaM6xY0%2B5awQ%3Dw%40mail.gmail.com.
