idmission-web-sdk 0.0.74 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -575,6 +575,20 @@ IDmissionSDK.renderCustomerIdentification('#target-element', { submissionToken:
575
575
 
576
576
  ## Other Functionality
577
577
 
578
+ ### Detecting the current version of the IDmission Web SDK
579
+
580
+ If you're ever wondering which version you have loaded, you can access it as a property of the global WebSDK bundle via `window.IDmissionSDK.version`.
581
+
582
+ You can also capture this information from the event fired at load time via `e.detail.webSdkVersion` like so:
583
+
584
+ ```html
585
+ <script type="module">
586
+ document.addEventListener('idmission-web-sdk.ready', (e) => {
587
+ console.log('web sdk version:', e.detail.webSdkVersion)
588
+ })
589
+ </script>
590
+ ```
591
+
578
592
  ### Intercepting (and modifying) API calls to IDmission's backend with `onBeforeSubmit`
579
593
 
580
594
  Each customer flow documented above includes an optional `onBeforeSubmit` prop, which bears the type signature `(request: SubmissionRequest) => Promise<SubmissionRequest>`. This can be useful if you would like to include some custom functionality that interrupts the WebSDK's outgoing request to IDmission's servers, allowing you a chance to modify the request before it is dispatched.
@@ -387,7 +387,7 @@ var SubmissionError = function (_super) {
387
387
  return SubmissionError;
388
388
  }(Error);
389
389
 
390
- var webSdkVersion = '0.0.74';
390
+ var webSdkVersion = '0.0.75';
391
391
 
392
392
  var SubmissionProvider = function SubmissionProvider(_a) {
393
393
  var action = _a.action,