#104285
jqwidgetsdev
Participant

Hi Svetoslav,

Ok, I see what you are doing, the event is of course firing now.
My example was indeed simple text, but what if the element value is HTML? Which element method should I then be using?

         {
            name: "settings",
            width: "auto",
            template: (element) => {
              console.log(element);
              element.<strong>innerHTML</strong> = <code><smart-button><i class='fa fa-cog' aria-hidden='true' title='Settings'></i></smart-button></code>;
              element.addEventListener("click", () => {
                console.log("click");
              });
            },
          },

Thanks.