click button using DOM code example
Example 1: javascript click
const element = document.querySelector('element');
element.click();
Example 2: dom button
<button name="favorite">
<svg aria-hidden="true" viewBox="0 0 10 10"><path d="M7 9L5 8 3 9V6L1 4h3l1-3 1 3h3L7 6z"/></svg>
Add to favorites
</button>