XF 1.5 Event listener to execute some JS after post preview has loaded?

Kevin

Well-known member
#1
I'm working on some trickery that executes currently after the page load has finished. For that I'm using a document event listener with DOMContentLoaded. That part works fine but then I realized I need to take into account content being shown after clicking the post preview button.

Is there an event listener, or alternative, I could use to fire off after the preview button has been clicked and the preview div content loaded? :unsure:
 

Mike

XenForo developer
Staff member
#2
I don't believe we fire anything to indicate this. I suppose you could look at using a mutation observer to try to detect it (though that might be over the top).
 

Kevin

Well-known member
#3
I don't believe we fire anything to indicate this. I suppose you could look at using a mutation observer to try to detect it (though that might be over the top).
Thanks for the response, Mike. (y) I'll take a look at a mutation observer even if it is an overkill in this case since I'll give me a chance to play with something I don't get to use much for the 'day job'.
 
Top