@qbs-ontrace/ect-cmp
v1.0.5
Published
There are two ways to include the component in your project:
Readme
Installation
There are two ways to include the component in your project:
Using NPM npm i @qbs-ontrace/ect-cmp
Using CDN Add these scripts to your HTML file:
<script type="module" src="https://cdn.jsdelivr.net/npm/@qbs-ontrace/ect-cmp@latest/dist/loader/index.js"></script>Evidence Collection Component
To start the Web Component:
<body>
<div id="app"></div>
<script type="module">
import "https://cdn.jsdelivr.net/npm/@qbs-ontrace/ect-cmp@latest/dist/loader/index.js";
// Wait for the custom element to be registered before using it
await customElements.whenDefined("id-kyc");
init(token);
function init(token) {
const config = {
ID: crypto.randomUUID(),
token: token,
};
const component = document.createElement("id-kyc");
component.config = config;
component.addEventListener("events", (event) => {
console.log("EVENT: ", event.detail);
});
document.getElementById("app").appendChild(component);
}
</script>
</body>