@dscvr-one/canvas-client-sdk
Advanced tools
Comparing version 1.0.2 to 1.0.5
@@ -5,4 +5,4 @@ // src/client.ts | ||
var CanvasClient = class { | ||
sourceOrigin = "*"; | ||
initResponseMessage = null; | ||
sourceOrigin; | ||
initResponseMessage = void 0; | ||
eventBus = new EventEmitter(); | ||
@@ -14,11 +14,13 @@ constructor() { | ||
window.addEventListener("message", this.handleReceiveMessage); | ||
if (document.referrer) { | ||
this.sourceOrigin = document.referrer; | ||
if (!document.referrer) { | ||
throw new CanvasInterface.ReferrerNotDefinedError(); | ||
} | ||
this.sourceOrigin = document.referrer; | ||
} | ||
destroy() { | ||
this.initResponseMessage = void 0; | ||
window.removeEventListener("message", this.handleReceiveMessage); | ||
} | ||
get isReady() { | ||
return this.initResponseMessage !== null; | ||
return !!this.initResponseMessage; | ||
} | ||
@@ -25,0 +27,0 @@ async ready(onClose) { |
{ | ||
"name": "@dscvr-one/canvas-client-sdk", | ||
"version": "1.0.2", | ||
"version": "1.0.5", | ||
"description": "SDK for iframes apps to connect to dscvr host using postMessage rpc", | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"homepage": "https://github.com/dscvr-one/dscvr-canvas/libs/canvas-client-sdk#readme", | ||
"homepage": "https://github.com/dscvr-one/dscvr-canvas/tree/main/libs/canvas-client-sdk#readme", | ||
"files": [ | ||
@@ -21,3 +21,3 @@ "dist" | ||
"dependencies": { | ||
"@dscvr-one/canvas-interface": "1.0.2", | ||
"@dscvr-one/canvas-interface": "^1.0.0", | ||
"eventemitter3": "^5.0.1" | ||
@@ -24,0 +24,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
29368
314
0
0
+ Added@dscvr-one/canvas-interface@1.2.1(transitive)
- Removed@dscvr-one/canvas-interface@1.0.2(transitive)