For each page:
-
Find the target interface(s) for the event. This should be listed in the event's page. For example, https://developer.mozilla.org/en-US/docs/Web/Events/drag lists
Document
,Element
as the targets. -
Move the page under the target interface, with the name "eventname_event". For example: https://developer.mozilla.org/en-US/docs/Web/API/Document/drag_event. Update the page as described in "Event page updates" below, and update the main interface page as described in "Interface page updates" below.
-
Check for translations of the event page (do this by hovering over the "Languages" item in the header). If the page has translations, move them as well (but don't bother updating the pages at all).
-
If the original page listed multiple targets (e.g. https://developer.mozilla.org/en-US/docs/Web/Events/drag lists
Document
andElement
as the targets), then you will need to do the above process multiple times, except that the second time, rather than move the event page, you will create a new page under the target interface and copy its contents from the page you moved and updated.
-
Change the page title to interfacename: eventname. For example, "Document: drag".
-
Change the sidebar from
{{EventRef}}
to{{APIRef}}
.
The page structure should be like:
-
one sentence summary
-
a blue box like the one here: https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort_event. The blue box should not have an H2. The blue box should contain:
- information on whether the event bubbles or is cancellable
- a link to the target object (e.g. https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction)
- a link to the event's interface (this will often be https://developer.mozilla.org/en-US/docs/Web/API/Event but sometimes will be a derived event object that adds some extra properties.
- a link to the corresponding
on-
event handler property, if there is one
-
H2: Examples:
- Make sure the page contains an example of listening to the event using
addEventListener
. - If the interface also supports the
on-
event handler property version of the event (it usually does), include an example of that as well.
- Make sure the page contains an example of listening to the event using
-
H2: Browser compatibility:
- This should use the
{{Compat}}
macro.
- This should use the
-
H2: See also
- Apart from any links it already contains, this should link to the
on-
event handler property (if there is one)
- Apart from any links it already contains, this should link to the
-
Some pages have different ways to format the info in the blue box. These should be updated to use the format in https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort_event
-
Some pages have a "Properties" section. This should be deleted (it duplicates the info in the event interface link).
-
Some pages have a "Related events" section. This should be deleted.
-
Create a new H2 "Events" after the "Methods" H2. It should look something like: https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction#Events.
-
For every event page you create, add a new list item: the
<dt>
is a link to the new event page, and the<dd>
describes it. If the interface also has anon-
event handler property, add some words like "Also available via the oneventname property." -
The interface page will typically have an "Event handlers" H3 under the "Properties" H2 (e.g. https://developer.mozilla.org/en-US/docs/Web/API/Document#Event_handlers). In that list, find the
on-
event handler property corresponding to the event you just added, and delete it. Ultimately we will retire this "Event handlers" H3, and only link to event pages from the "Events" H2.