Button in Dataview is not responding

What I’m trying to do

I have the Dataview plugin. I am trying to create a button, upon clicking, it will display a message box. But the button is not responding. This is the code

dv.el("button", "Click Me!", () => {
    alert("Success! The button was clicked.");
});

### Things I have tried

<!-- Below this line, write what terms you searched in the help docs and forum, plus any solutions you tried and what happened. -->

I have make sure all Javascript related options for the plugin are on.  I have disabled all other plugins to avoid potential plugins.  I have opened the developer console to monitor for errors.  There are no errors.

Any ideas? Thank you

div.el() inserts a generic html element, but why did you assume that you can pass to it a callback as a third argument? The documentation only specifies two parameters: the name of the html element and the content.

To insert a clickable button you may use:

let btn = document.createElement("button");
btn.textContent = "Click Me!";
btn.onclick = () => {
    alert("Success! The button was clicked.");
};
dv.container.appendChild(btn);

This first uses “plain” javascript to create the button and assigning the callback, and then dataview machinery to insert that button in the current note.