✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Check if Html element already exists? Or Check if Div has Children?

Is there a way to check if an html element with a given ID exists in Dash?

Or, is there a way to check if a Div with a given ID has Children?

I want to use a chart’s selectedData as an input, but only if that chart exists (i.e. has been created by other callbacks)

you might try out pattern matching callbacks - this pattern is well suited for callbacks that respond to with zero or more elements