sparkbun 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
|
@@ -182,7 +182,7 @@ export class BrowserView<T extends RPCWithTransport = RPCWithTransport> {
|
|
|
182
182
|
typeof jsonMessage === "string"
|
|
183
183
|
? jsonMessage
|
|
184
184
|
: JSON.stringify(jsonMessage);
|
|
185
|
-
const wrappedMessage = `window.
|
|
185
|
+
const wrappedMessage = `window.__electrobun.receiveMessageFromHost(${stringifiedMessage})`;
|
|
186
186
|
this.executeJavascript(wrappedMessage);
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -191,7 +191,7 @@ export class BrowserView<T extends RPCWithTransport = RPCWithTransport> {
|
|
|
191
191
|
typeof jsonMessage === "string"
|
|
192
192
|
? jsonMessage
|
|
193
193
|
: JSON.stringify(jsonMessage);
|
|
194
|
-
const wrappedMessage = `window.
|
|
194
|
+
const wrappedMessage = `window.__electrobun.receiveInternalMessageFromHost(${stringifiedMessage})`;
|
|
195
195
|
this.executeJavascript(wrappedMessage);
|
|
196
196
|
}
|
|
197
197
|
|
package/src/bun/proc/native.ts
CHANGED
|
@@ -2595,7 +2595,10 @@ export const Session = {
|
|
|
2595
2595
|
|
|
2596
2596
|
// Stub: native side accepts this parameter but never calls it.
|
|
2597
2597
|
// Remove when native wrappers are recompiled without it.
|
|
2598
|
-
const webviewDecideNavigation =
|
|
2598
|
+
const webviewDecideNavigation = new JSCallback(
|
|
2599
|
+
() => 1,
|
|
2600
|
+
{ args: [FFIType.u32, FFIType.cstring], returns: FFIType.u32 },
|
|
2601
|
+
);
|
|
2599
2602
|
|
|
2600
2603
|
const webviewEventHandler = (id: number, eventName: string, detail: string) => {
|
|
2601
2604
|
BrowserView.ensureWrapped(id);
|