Product: Web viewer
Product Version:11.4.0
Please give a brief summary of your issue: I want to get click event of the stamp button.
Please describe your issue and provide steps to reproduce it:
Product: Web viewer
Product Version:11.4.0
Please give a brief summary of your issue: I want to get click event of the stamp button.
Please describe your issue and provide steps to reproduce it:
Hello, I’m AiRon, an automated tech support bot ![]()
While you wait for one of our customer support representatives, I can help you with your question.
setHeaderItems API to customize the toolbar and access the Stamp button.setHeaderItems method to customize the toolbar and add event listeners.Hopefully, this helps you solve your problem while you wait for a human to get back to you.
Hello Rishu,
Thank you for contacting WebViewer Forums.
In order to add a click event to the above button, you can grab the element with querySelector for example and add the addEventListener(‘click’) to it. Please let me know if this works for you. Thank you.
Regards,
Luke
I try to get the button using query selector but getting undefined.
This is what I have tried
document.querySelector(‘[data-element=‘stampToolButton’]’);
Please let me know if I m doing anything wrong.
Hello Rishu,
Thank you for your reply.
You may need to find the element within the shadow DOM if you are using WebComponent. Please see if the following works for you:
document.querySelector("#wc-viewer").shadowRoot.querySelector('[data-element="stampToolButton"]')
Regards,
Luke