Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Last active February 13, 2019 23:51
Show Gist options
  • Save wbamberg/b4b7edec7799cda1a4525ff58ffcaf5a to your computer and use it in GitHub Desktop.
Save wbamberg/b4b7edec7799cda1a4525ff58ffcaf5a to your computer and use it in GitHub Desktop.

For each page:

Event page updates

  • 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:

  • 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.
  • H2: Browser compatibility:

    • This should use the {{Compat}} macro.
  • H2: See also

    • Apart from any links it already contains, this should link to the on- event handler property (if there is one)
  • 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.

Interface page updates

  • 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 an on- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment