Events management
Component have a lot of events that you can use to hook into the component's lifecycle. You can find a list of all events on this page.
Events types
You can handle the following events from the component:
progress
- The upload progress event. The event detail is the upload progress in percentage.success
- The upload success event. The event detail is the upload result.error
- The upload error event. The event detail is the error message.
Code example
const btn = document.querySelector('web3-upload-btn')
btn.addEventListener('success', (e) => {
console.log('Result: ', e.detail);
});