mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-10-10 16:56:40 +00:00
chore: adapt for raw exposed json messages of webview fork
This commit is contained in:
@@ -68,7 +68,7 @@ namespace
|
||||
[&](const std::string& req) -> std::string
|
||||
{
|
||||
const auto name = req.substr(2, req.size() - 4);
|
||||
return std::format("\"Hello from C++ {}!\"", name);
|
||||
return webview::json_escape(std::format("Hello from C++ {}!", name));
|
||||
});
|
||||
|
||||
// A binding that creates a new thread and returns the result at a later time.
|
||||
|
@@ -2,5 +2,6 @@ export interface NativeMethods {
|
||||
greet: (name: string) => Promise<string>;
|
||||
}
|
||||
|
||||
// @ts-expect-error Typescript expects this to be an error, it is not here though
|
||||
export const nativeMethods: NativeMethods = window as NativeMethods;
|
||||
const windowWithWebViewExtensions = window as typeof window & {webview_binds: NativeMethods};
|
||||
|
||||
export const nativeMethods: NativeMethods = windowWithWebViewExtensions.webview_binds;
|
||||
|
2
thirdparty/webview
vendored
2
thirdparty/webview
vendored
Submodule thirdparty/webview updated: 1dfdba9f2b...ef12fdb8a1
Reference in New Issue
Block a user