Set Popup parameters with data attributes

I wanted to see if there was a way to set popup parameters using data attributes like the following:

<div class="popup" data-swipe-to-close="true">

I tried it but it didn’t seem to work. If not I would love for this ability to set the parameters via data attributes just like we can do with other components. Thanks!

Data attributes only for components who can init by *-init class

Thanks @shastox.

However it would be nice to have this feature because popups are auto initialized by default when you use links to open them with class popup-open and data-popup attributes so why not allow us to define some of the attributes?