blob: ea8a0d6880b968a244e6622de5faf6acfa367692 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "cru/platform/web/Js.h"
namespace cru::platform::web {
bool IsNotNullAndInstanceOf(const emscripten::val& value,
const emscripten::val& type) {
return !value.isNull() && !type.isNull() && value.instanceof (type);
}
bool IsNotNullAndInstanceOf(const emscripten::val& value,
const char* global_type) {
return IsNotNullAndInstanceOf(value, emscripten::val::global(global_type));
}
} // namespace cru::platform::web
|