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 +14 -0
- package/dist/sdk2.cjs.development.js +1 -1
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.esm.js +1 -1
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +1 -1
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
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.
|