- Issue created by @emircan erkul
- Status changed to Closed: works as designed
over 1 year ago 2:50pm 17 October 2023 - 🇫🇷France nod_ Lille
Thanks for the suggestion, the once feature is made to work with DOM nodes so that we can expose the data attributes to the outside. Like you said, window is not the DOM so it can't work with once.
The performance point is not actually an issue. When we rewrote the once feature we did extensive preformance testing and bottleneck will just not be in the once calls. The DOM is much faster these days. Have a look at the benchmarks to see just how fast that is: https://www.measurethat.net/Benchmarks/Show/8844/1/drupal-once-variables...