You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API property template - update for short title (mdn#40672)
* API property template - update for short title
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
> page-type: web-api-instance-property OR web-api-static-property
23
24
> status:
@@ -32,6 +33,8 @@ sidebar: mdnsidebar
32
33
> - : Title heading displayed at the top of the page.
33
34
> Format as "NameOfTheParentInterface: NameOfTheProperty property".
34
35
> For example, the [`capabilities`](/en-US/docs/Web/API/VRDisplay/capabilities) property of the [`VRDisplay`](/en-US/docs/Web/API/VRDisplay) interface has a `title` of `VRDisplay: capabilities property`.
36
+
> - **short-title**
37
+
> - : The name of the property (used in sidebar).
35
38
> - **slug**
36
39
> - : The end of the URL path after `https://developer.mozilla.org/en-US/docs/`.
37
40
> This will be formatted like `Web/API/NameOfTheParentInterface/NameOfTheProperty`.
Begin the content on the page with an introductory paragraph — start by naming the property, saying what interface it is part of, and saying what it does.
87
-
This should ideally be one or two short sentences.
88
-
You could copy most of this from the property's summary on the corresponding API reference page. Include whether it is read-only or not.
89
+
The **`NameOfTheProperty`** [read-only] property of the \{{domxref("NameOfTheParentInterface")}} interface _\<provide concise summary of behavior\>_.
90
+
91
+
_Start by naming the property (indicating whether or not it is read-only) and the interface it is part of, and then say what it does._
92
+
93
+
_This should ideally be one or two short sentences._
94
+
_If you need more than a couple of paragraphs, this should be added in a "Description" section placed before the "Examples" section._
89
95
90
96
## Value
91
97
92
-
Include a description of the property's value, including data type and what it represents. This should be in the form: "A [name of the property type] representing ...". For example:
98
+
A \{{domxref("SomeDataType" }}.
99
+
100
+
_Normally just the data type, and allowed values for that data type if relevant._
101
+
_If the property has different setter and getter behaviour, these should normally be covered in separate sentences._
102
+
103
+
_In some cases you may want to say more about what the data type represents._
104
+
_This is acceptable, but should not duplicate information from the "Description" section (you should include information about what the value means there)._
105
+
106
+
_Note that some property pages are written in the form "Returns a [name of the property type] representing..." but this is not the recommended form.
107
+
Also, some WebIDL extended attributes with specific meanings can be associated with the type. There are standard ways to document them; consult [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#type_of_the_property) for more information._
93
108
94
-
> A string representing...
109
+
<!--
110
+
## Description
95
111
96
-
Note that some property pages are written in the form "Returns a [name of the property type] representing..." but this is not the recommended form.
97
-
Also, some WebIDL extended attributes with specific meanings can be associated with the type. There are standard ways to document them; consult [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#type_of_the_property) for more information.
0 commit comments