Js code that will return html code that has button that needs to call js function.
...
return `
<h1>Click button</h1>
<button onclick="myFunction()">Try it</button>
`
How or where should i implement function that would be called when button is clicked?
function myFunction() {
alert("I am an alert box!");
}