I wish to assign some frequently used JS functions to global 'val' variables:
#include <emscripten>
#include <emscripten/val.h>
val log;
int main(){
log = val::global("console")["log"];
}
But faced this error:
fatal error: call to deleted constructor of 'emscripten::val'
val log;
All other types are fine to be globals.