I confirmed that the output of the function was getting produced properly by also writing it to the console. I even set up a blank page with a very simple example just to test and still, nothing. Below are my settings, along with the output to the console
I was wondering if anyone has had similar trouble before, and how they fixed it, or if there is anything glaringly obvious in my settings that needs to be changed that I somehow missed. Adding to my confusion, is that this did in fact work for a brief moment, before not working again.
As an additional curveball, I just ran JS code server side and was able to successfully pass the result to the same JS to bubble element, so I do wonder if this has something to do with how the HTML Element is getting rendered?
It could be either hidden on page load or you are running the script before it is rendered.
If you can run the function from the console once the page is loaded, it’s likely that the code within the html element is triggering before the JS to bubble exists.
You could play around with a delay, or I think there’s a ‘wait till page rendered’ on the html element itself
Thank you, that does make sense. Something must be incidentally structured in the other parts of my app that are preventing this from being an issue, so I must have lucked out until this point.
Since running it server side is working for now, I will probably continue with that method.
Thank you Jonah, I agree - this is something I have been putting off learning but really need to get around to doing because I admittedly use a lot of custom code in my apps. With all the time I have spent looking for workarounds to figuring out how to build a plugin, I am sure I could have learned the plugin editor many times over at this point!