I am creating button like this:

```
    if(this.error_msg) {
        let btn_err = document.createElement('button');
        btn_err.type = "button";
        btn_err.name = "add";
        btn_err.textContent = "Remove";
        btn_err.setAttribute("class", "btn btn-primary btn-sm");

        btn_wrapper.append(btn_err);

        toastBody.append(btn_wrapper);
    }        

```

How can I show `this.error_msg` on button click as alert?