HTML `<details>` element not triggering `toggle` event in Firefox 120
I'm trying to figure out I'm working with the `<details>` element in HTML to create a collapsible section, but I'm experiencing an scenario in Firefox 120 where the `toggle` event doesn't seem to fire as expected... In Chrome and Edge, it works flawlessly, but Firefox appears to completely ignore the event. I've implemented the following code: ```html <details id="myDetails"> <summary>Click to expand</summary> <p>This is some additional content.</p> </details> ``` And the accompanying JavaScript to listen for the `toggle` event is like this: ```javascript const details = document.getElementById('myDetails'); details.addEventListener('toggle', () => { console.log('Details toggled:', details.open); }); ``` When I click the summary to expand or collapse the details, I don't see any console output in Firefox. However, everything logs correctly in Chrome. I've also tried wrapping the event listener in a `DOMContentLoaded` event, but that didn't change anything. I checked the developer console for any errors, but nothing stands out. This behavior is quite perplexing, considering the `<details>` element is a standard part of HTML5 and should work across all major browsers. Is there something specific about Firefoxβs handling of the `toggle` event that I need to account for? Any insights would be greatly appreciated! My development environment is macOS. I'd really appreciate any guidance on this. I'm working in a Ubuntu 20.04 environment.