MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / ExposeOsObject

Function ExposeOsObject

core/src/renderer/renderer.cc:143–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static void ExposeOsObject(V8Object *window)
144{
145 auto object = V8Object::create();
146
147 object->set(&u"name"_s, V8Value::string(&CefStr(PLATFORM_NAME)), V8_PROPERTY_ATTRIBUTE_READONLY);
148 object->set(&u"version"_s, V8Value::string(&CefStr(platform::get_os_version())), V8_PROPERTY_ATTRIBUTE_READONLY);
149 object->set(&u"build"_s, V8Value::string(&CefStr(platform::get_os_build())), V8_PROPERTY_ATTRIBUTE_READONLY);
150
151 window->set(&u"os"_s, object, V8_PROPERTY_ATTRIBUTE_READONLY);
152}
153
154static void LoadPlugins(V8Object *window)
155{

Callers 1

Calls 4

CefStrClass · 0.85
get_os_versionFunction · 0.85
get_os_buildFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected