-
In openwebdocs/project#61 @foolip suggests we unify event and event handler pages (in MDN content and in BCD). Example for an event page: XRSession end event (event name to pass into The IDL for this is the following and the event is often announced in specs in the texts like "The [SecureContext, Exposed=Window] interface XRSession : EventTarget {
attribute EventHandler onend;
} Philip says:
I think it is a good idea. We need to agree on how such a unified event page should look like, though, and we need to define one data point in BCD. Currently there are two data points:
So what do you all think? Could there be a page: https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end_event |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 15 replies
-
I'm pro having one page for simplicity sake. We can agree on the structure to include information on |
Beta Was this translation helpful? Give feedback.
-
Not certain about BCD. Often there is more than one onXxxx endpoint to think about - consider the global event handlers. Does that impact this idea? For FF93 I just documented new global onXXX handlers for slotchange and securitypolicyviolation. I think you are suggesting that using this new approach we have a combined (on)event page. Before the update this page might perhaps have an "Event Handler" section that stated that the event can be attached to Window, Document, Element (or whatever) using Further, assuming SVG is also impacted, this would also mention the SVG items that could fire the events and have the handlers? I'm a little concerned how you would show the corresponding compatibility information. From a docs point of view I find this more intuitive - one place for all docs around each event where you list everything that can trigger it and everything that can catch it. A pity we can't also combine the actual "event object" docs in there too. My feeling is we should prototype such a page, including at least one global event handler, all the way through to BCD. If that can be made to work then this would be much better. |
Beta Was this translation helpful? Give feedback.
-
api.AbortSignal.abort_event api.AbortSignal.onabort AbortSignal.onabort Given the current practice is to have MDN pages and BCD entries for both, "_event" and for "onXXX", an agreement to one of these instead of two would spare around 400 pages (ignoring mixins for now). |
Beta Was this translation helpful? Give feedback.
-
mdn/browser-compat-data#12510 proposes to use "_event" BCD entries (and I assume also analog MDN slugs) while removing the "onXXX" entries (and their MDN pages). Thoughts on what we are in favor of? The onXXX properties seem a bit old fashioned, however, they are at least nicely obtainable from IDL. |
Beta Was this translation helpful? Give feedback.
-
Looking at the MDN page I think this is much much better 👍 |
Beta Was this translation helpful? Give feedback.
-
We agreed on a new template for a unified event page: https://developer.mozilla.org/en-US/docs/MDN/Structures/Page_types/API_event_subpage_template The backlog to unify all existing event pages is here: mdn/browser-compat-data#14578 The Serial API (https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/connect_event) is an example how we dealt with bubbling. More details on this will follow as we encounter more bubbling events. The goal is also to get rid of mixins as much as we can. Again, will probably have more details on that once we hit these events in the backlog. Help appreciated as there are a lot of events. |
Beta Was this translation helpful? Give feedback.
-
Closing as answered/settled. |
Beta Was this translation helpful? Give feedback.
We agreed on a new template for a unified event page: https://developer.mozilla.org/en-US/docs/MDN/Structures/Page_types/API_event_subpage_template
The backlog to unify all existing event pages is here: mdn/browser-compat-data#14578
The Serial API (https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/connect_event) is an example how we dealt with bubbling. More details on this will follow as we encounter more bubbling events.
The goal is also to get rid of mixins as much as we can. Again, will probably have more details on that once we hit these events in the backlog.
Help appreciated as there are a lot of events.