related: how to call a static method without a class instance in webIDL?
/// funs.cpp
class A{
static void fun();
};
/// funs.idl
interface A{
static void fun();
}
/// test.js
Module.A.fun(); // doesn't work
new Module.A().fun(); // works but shouldn't be necessary to have an instance since it's a static method
is that a difference between idlebind and tools/webidl_binder.py ?
what other differences are there?
are free functions (not inside a class) supported (cf other part of https://github.com/kripken/emscripten/issues/6742 ) ?
pasting my example form https://github.com/kripken/emscripten/issues/6742
when using tools/webidl_binder.py as recommended in https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html , calling
Module.A.fun();
from javascript doesn't work ; however I see from your examplesClassA.StaticMethod();
inidlebind/test/test.js
is that a difference between idlebind and tools/webidl_binder.py ? what other differences are there? are free functions (not inside a class) supported (cf other part of https://github.com/kripken/emscripten/issues/6742 ) ?