Unfortunatly the documentation for GCS V3 is not very comprehensive. Expecially the examples given are not working as is*
For me the following worked when I added this to the index.js file in my project, having a button named with id "btn_start"
//file index.js (async () => { GcWidget.querySelector('#btn_start').then(button => { button.label = 'Click Me!'; button.addEventListener('click', () => alert('I am clicked')); }); //... })
*gc-widget-button api link
*Getting Started - GUI Composer Library V3
Please update the specifications, it's cumbersome to get simple things going, when the examples are outdated or contain bugs.