Skip to content

Components Response

You can get the response of the component in the detail field of the event object.

For example:

const component = document.getElementsByTagName('camera-snapshot')[0];
function listener(event) {
    if (event.detail) {
        const response = event.detail;
        console.log(response);
    }
}
component.addEventListener('camera-snapshot', listener);