MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doPostMessage

Method doPostMessage

valdi/src/valdi/runtime/JavaScript/JavaScriptWorker.cpp:117–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 self->close();
116 }
117 return Value::undefined();
118 };
119
120 _workerRuntime->setValueToGlobalObject(STRING_LITERAL("close"),
121 Value(makeShared<ValueFunctionWithCallable>(closeFunc)));
122
123 auto queryStartIndex = _url.indexOf('?');
124 auto scriptUrl = queryStartIndex.has_value() ? _url.substring(0, queryStartIndex.value()) : _url;
125 auto location = makeShared<ValueMap>();

Callers 1

postMessageMethod · 0.95

Calls 2

getGlobalOnMessageFunction · 0.85
dispatchMessageFunction · 0.85

Tested by

no test coverage detected