libkernel
Advanced tools
Comparing version 0.0.40 to 0.0.41
@@ -31,2 +31,3 @@ // log provides a wrapper for console.log that prefixes 'libkernel'. | ||
window.postMessage({ | ||
namespace: "libkernel", | ||
method: "bridgeToKernelQuery", | ||
@@ -78,11 +79,9 @@ nonce, | ||
} | ||
// Check that this message is a kernelResponse. | ||
if (!("data" in event) || !("method" in event.data)) { | ||
// Check that this message is a response targeting libkernel. | ||
if (!("data" in event) || !("method" in event.data) || event.data.namespace !== "libkernel") { | ||
return; | ||
} | ||
// Check that the method is a string. | ||
if (typeof event.data.method !== "string") { | ||
return; | ||
} | ||
// Check that the method is an inbound method. | ||
if (!((event.data.method.endsWith("Response")) || (event.data.method.endsWith("ResponseUpdate")))) { | ||
@@ -131,2 +130,3 @@ return; | ||
window.postMessage({ | ||
namespace: "libkernel", | ||
method: "bridgeTestQuery", | ||
@@ -133,0 +133,0 @@ nonce: 0, |
{ | ||
"name": "libkernel", | ||
"version": "0.0.40", | ||
"version": "0.0.41", | ||
"description": "helper library to interact with the skynet kernel", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
11423