Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "inframejs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "use pure Javascript to connect the iframe pages", | ||
@@ -5,0 +5,0 @@ "main": "dist/inframejs.es.min.js", |
@@ -66,3 +66,4 @@ const Inframe = class { | ||
params: data, | ||
lib: this.libName | ||
lib: this.libName, | ||
pageName:this.pageName | ||
} | ||
@@ -83,3 +84,7 @@ this.logger(`${eventName} has been emitted::${JSON.stringify(msg)}`) | ||
// 验证data是由inframe发出的 | ||
if (!e || typeof e.data !== 'object' || !(e.data.lib && e.data.lib === this.libName)) { | ||
if (!e || | ||
typeof e.data !== 'object' || | ||
!(e.data.lib && e.data.lib === this.libName) || | ||
this.pageName === e.data.pageName | ||
) { | ||
return | ||
@@ -86,0 +91,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
12350
291