For a function, I think you need DEFAULT_LIBRARY_FUNCS_TO_INCLUDE to include it, then also EXPORTED_RUNTIME_METHODS to export it. But createContext is a method on Browser. So you should use DEFAULT_LIBRARY_FUNCS_TO_INCLUDE to make sure Browser is included (like Runtime is, as you can see in the list).
Then you would also need to export that method, but at the top of library_browser.js it looks like it's already exported, as Module["createContext"]. On Thu, May 26, 2016 at 2:37 AM, Alexandre Perrot < [email protected]> wrote: > Hello, > > I am trying to use the library function "createContext" from js, but I can > access it. > > When compiling with the INCLUDE_FULL_LIBRARY flag, all the library > functions are included, how can include only "createContext" ? > I also tried adding "createContext" to the various compile time lists of > functions to export (EXPORTED_RUNTIME_METHODS, EXTRA_EXPORTED_RUNTIME_METHODS > and DEFAULT_LIBRARY_FUNCS_TO_INCLUDE), to no avail. > > So, in short, how can I include a specific library function without the > full library ? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" 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/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" 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/d/optout.
