How to call function to custom js from html?Below code shows error "openConfirm is not defined"

Late reply, you might have it resolved already. But it looks like you only have to remove the quotes around your function reference in the @click attribute and then your code would work. Compare your code carefully to the docs: