popovertarget="example-dialog" popovertargetaction="hide"
It’s all binding. This is what JavaScript is for: dynamic content.