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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sparkbun",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Build fast, lightweight, cross-platform desktop apps with TypeScript and Bun.",
5
5
  "license": "MIT",
6
6
  "author": "SparkBun Contributors",
@@ -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.__sparkbun.receiveMessageFromHost(${stringifiedMessage})`;
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.__sparkbun.receiveInternalMessageFromHost(${stringifiedMessage})`;
194
+ const wrappedMessage = `window.__electrobun.receiveInternalMessageFromHost(${stringifiedMessage})`;
195
195
  this.executeJavascript(wrappedMessage);
196
196
  }
197
197
 
@@ -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 = null;
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);