Auto fire a function

Has anyone figured out how to fire off a function if the user clicks on a bric?
I know I can set up a manual button control, but it would be nice to fire off a function when they click on the bric in the edit window.

OR (even better): automatically fire a function whenever a child is added to a parent bric?

Thanks,

Bill
BricsDesign

When a user clicks on a bric, the init function is called. Thats about it I think.

My guess is something like a mutation observer will not work for changes in the HTML of the bric.

I can see there would be a good use case with the bric_container, maybe Norm can add something for this?

Ok, thanks. I think I’ll just call a function from init for right now.

1 Like