Notes:
For the call back functions to the following conditions must be true:
- The function must be present on the global window object
- The function name (the literal name) must be exactly same as appears when you inspect the web-component in the inspect panel
- The function must be present before the component loads. If not, it appears as undefined on the web component (console.dir(elment)).