Skip to content

Naming conventions for properties in returned objects #13834

Open
@queengooborg

Description

@queengooborg

In #12840, @ddbeck and @foolip had been discussing a convention for the properties in the objects returned by certain methods. Quoting the conversation here:

Since we don't have a guideline, maybe this is an opportunity to start from scratch? How about returns_audioCapabilities_property with the idea being that we could have a convention for object properties (like this one), types (like returns_DOMMatrix_type), and values (like returns_undefined_value).

We should probably put the word return in the description too. Returns <code>audioCapabilities</code> property?

Originally posted by @ddbeck in #12840 (comment)

More ideas on these lines, to cut down on the wordiness:

  • audioCapabilities in return value object
  • audioCapabilities in returned object
  • Returns object with audioCapabilities
  • Returns object with audioCapabilities property

Originally posted by @ddbeck in #12840 (comment)

This made me think of the possibility of %parameter%_property_returned as the standard key, if that sounds nice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APIdocsIssues or pull requests regarding the documentation of this project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions