hellosign-embedded
Advanced tools
Comparing version 1.0.4 to 1.1.1
{ | ||
"name": "hellosign-embedded", | ||
"version": "1.0.4", | ||
"version": "1.1.1", | ||
"description": "A JavaScript library required for embedding HelloSign features into your webapp. For more information, see our API documentation at https://www.hellosign.com/api/documentation.", | ||
@@ -5,0 +5,0 @@ "main": "src/embedded.js", |
@@ -328,2 +328,3 @@ /** | ||
// - whiteLabelingOptions Object. An associative array to be used to customize the app's signer page | ||
// - healthCheckTimeoutMs Integer. The number of milliseconds to wait for a response from the iframe. If no response after that time the iframe will be closed. 15000 milliseconds is recommended. | ||
@@ -335,2 +336,4 @@ var redirectUrl = this.safeUrl(params['redirectUrl']); | ||
this.isDefaultUX = (this.uxVersion === this.DEFAULT_UX_VERSION); | ||
this.healthCheckTimeoutMs = params['healthCheckTimeoutMs']; | ||
if (this.uxVersion) { | ||
@@ -611,2 +614,11 @@ frameUrl += (frameUrl.indexOf('?') > 0 ? '&' : '?') + 'ux_version=' + this.uxVersion; | ||
// Close the iframe if page fails to initialize within 15 seconds | ||
if (this.healthCheckTimeoutMs) { | ||
this._healthCheckTimeoutHandle = setTimeout(function() { | ||
var message = 'Signer page failed to initialize within ' + self.healthCheckTimeoutMs + ' milliseconds.' | ||
self.reportError(message, document.location.href); | ||
self.close(); | ||
}, this.healthCheckTimeoutMs); | ||
} | ||
// Start listening for messages from the iFrame | ||
@@ -617,2 +629,3 @@ XWM.receive(function _parentWindowCallback(evt){ | ||
if (evt.data === 'initialize' && params['uxVersion'] > 1) { | ||
if (self.healthCheckTimeoutMs) clearTimeout(self._healthCheckTimeoutHandle); | ||
XWM.send(JSON.stringify({ type: 'embeddedConfig', payload: params }), evt.origin, source); | ||
@@ -619,0 +632,0 @@ } else if (evt.data == 'close') { |
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
73955
1078