@designestate/dees-comms
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -33,6 +33,9 @@ "use strict"; | ||
this.subscriptionChannel = new BroadcastChannel('dees-comms'); | ||
this.subscriptionChannel.onmessage = (eventArg) => { | ||
this.subscriptionChannel.onmessage = async (eventArg) => { | ||
const message = eventArg.data; | ||
console.log(JSON.stringify(message)); | ||
this.typedrouter.routeAndAddResponse(message); | ||
const response = await this.typedrouter.routeAndAddResponse(message); | ||
if (response) { | ||
this.postMessage(response); | ||
} | ||
}; | ||
@@ -63,2 +66,2 @@ } | ||
exports.DeesComms = DeesComms; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVlcy1jb21tcy5jbGFzc2VzLmRlZXNjb21tcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2RlZXMtY29tbXMuY2xhc3Nlcy5kZWVzY29tbXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLDhEQUFnRDtBQUVoRDs7R0FFRztBQUNILE1BQWEsU0FBUztJQU9wQjtRQU5BLG1CQUFtQjtRQUNYLGdCQUFXLEdBQUcsSUFBSSxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsQ0FBQztRQUNsRCxnQkFBVyxHQUFHLElBQUksT0FBTyxDQUFDLFlBQVksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUVwRCx3QkFBbUIsR0FBRyxJQUFJLGdCQUFnQixDQUFDLFlBQVksQ0FBQyxDQUFDO1FBRy9ELElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxTQUFTLEdBQUcsQ0FBQyxRQUFRLEVBQUUsRUFBRTtZQUNoRCxNQUFNLE9BQU8sR0FBRyxRQUFRLENBQUMsSUFBSSxDQUFDO1lBQzlCLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQ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yxDQUNqQixDQUFDO1FBQ0YsT0FBTyxZQUFZLENBQUM7SUFDdEIsQ0FBQztJQUVEOztPQUVHO0lBQ0ksS0FBSyxDQUFDLFdBQVcsQ0FDdEIsVUFBYTtRQUViLElBQUksQ0FBQyxXQUFXLENBQUMsV0FBVyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQzNDLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUssQ0FBQyxrQkFBa0IsQ0FDN0IsU0FBc0IsRUFDdEIsZUFBeUQ7UUFFekQsSUFBSSxDQUFDLFdBQVcsQ0FBQyxlQUFlLENBQUMsSUFBSSxPQUFPLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBSSxTQUFTLEVBQUUsZUFBZSxDQUFDLENBQUMsQ0FBQztJQUN6RyxDQUFDO0NBQ0Y7QUFwREQsOEJBb0RDIn0= |
{ | ||
"name": "@designestate/dees-comms", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"private": false, | ||
@@ -24,3 +24,3 @@ "description": "a comms module for communicating within the DOM", | ||
"dependencies": { | ||
"@apiglobal/typedrequest": "^1.0.50", | ||
"@apiglobal/typedrequest": "^1.0.53", | ||
"@apiglobal/typedrequest-interfaces": "^1.0.15" | ||
@@ -27,0 +27,0 @@ }, |
@@ -15,6 +15,9 @@ import { TypedRequest } from '@apiglobal/typedrequest'; | ||
constructor() { | ||
this.subscriptionChannel.onmessage = (eventArg) => { | ||
this.subscriptionChannel.onmessage = async (eventArg) => { | ||
const message = eventArg.data; | ||
console.log(JSON.stringify(message)); | ||
this.typedrouter.routeAndAddResponse(message); | ||
const response = await this.typedrouter.routeAndAddResponse(message); | ||
if (response) { | ||
this.postMessage(response); | ||
} | ||
}; | ||
@@ -21,0 +24,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15878
224