emscripten-core / emscripten-core/emscripten

How to customize the emscripten:: val?

Open
#19,075 1 comment 0 reactions 0 assignees View on GitHub
embind
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I want to customize the emscripten::val type as follows:
class myVal : public emscripten::val {
public:
template
explicit myVal(T&& value) : emscripten::val(value) {}

explicit myVal(const char* v) : emscripten::val(v) {}

myVal(myVal&& v) : emscripten::val(v) {}

myVal(const myVal& v) : emscripten::val(v) {}

static myVal object() {
return myVal(emscripten::val::object());
}
};
What rules should I follow to operate?

There are other static class definitions,

static inline myVal module1 = myVal :module_ property("module");

How do I register this class into the system?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.