JavaScript instance data property page template
Note: Remove this whole explanatory note before publishing
Page front matter:
The front matter at the top of the page is used to define "page metadata". The values should be updated appropriately for the particular property.
---
title: "Constructor: nameOfTheProperty"
short-title: nameOfTheProperty
slug: Web/JavaScript/Reference/Global_Objects/Constructor/nameOfTheProperty
page-type: javascript-instance-data-property
status:
- deprecated
- experimental
- non-standard
browser-compat: javascript.builtins.Constructor.nameOfTheProperty
sidebar: jsref
---
- title
-
Title heading displayed at the top of the page. Instance data properties are either installed on each instance or on
Constructor.prototype. You need to format the first case asConstructor: nameOfThePropertyand the second case asConstructor.prototype.nameOfTheProperty. For example, thelengthproperty of theArrayclass has a title ofArray: length, while thenameproperty of theErrorclass has a title ofError.prototype.name. Do check the spec to be precise. - short-title
-
A short title used in breadcrumbs and sidebars. Format as
nameOfTheProperty. For example, thelengthproperty has a short-title oflength. - slug
-
The end of the URL path after
https://developer.mozilla.org/en-US/docs/. This will be formatted likeWeb/JavaScript/Reference/Global_Objects/Constructor/nameOfTheProperty. - page-type
-
The
page-typekey for JavaScript instance data properties isjavascript-instance-data-property. - status
-
Flags describing the status of this feature. An array which may contain one or more of the following:
experimental,deprecated,non-standard. This key should not be set manually: it is set automatically based on values in the browser compatibility data for the feature. See "How feature statuses are added or updated". - browser-compat
-
Replace the placeholder value
javascript.builtins.Constructor.nameOfThePropertywith the query string for the property in the Browser compat data repo. The toolchain automatically uses the key to populate the compatibility and specification sections (replacing the{{Compat}}and{{Specifications}}macros).Note that you may first need to create/update an entry for the property in our Browser compat data repo, and the entry for the API will need to include specification information. See our guide on how to do this.
-
This is
jsreffor JavaScript instance data property pages. See Page structures: Sidebars for details.
Top-of-page macros
A number of macro calls appear at the top of the content section (immediately below the page front matter).
These macros are automatically added by the toolchain (there is no need to add/remove):
{{SeeCompatTable}}— this generates a This is an experimental technology banner that indicates the technology is experimental. If it is experimental, and the technology is hidden behind a pref in Firefox, you should also fill in an entry for it in the Experimental features in Firefox page.{{Non-standard_Header}}— this generates a Non-standard banner that indicates that the feature is not part of any specification.
Do not provide status header macros manually. Refer to the section How feature statuses are added or updated to add these statuses to the page.
Samples of the Experimental and Non-standard banners are shown right after this note block.
Remember to remove this whole explanatory note before publishing.
Note: Remember the single most important principle for writing consistent JavaScript reference pages: look around! Many related pages have consistent structures beyond what's required in this template. For example, all proxy handlers, most array methods, etc. Start by looking for existing documentation for similar APIs and copy its structure.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
The nameOfTheProperty data property of a {{jsxref("Constructor")}} instance contains something. If the property is installed on Constructor.prototype, say "The nameOfTheProperty data property of Constructor.prototype is shared by all {{jsxref("Constructor")}} instances. It contains something." This should ideally be 1 or 2 short sentences. Keep this in sync with the constructor's landing page — for example, the landing page should contain lines like this:
- {{jsxref("Constructor/nameOfTheProperty", "nameOfTheProperty")}}
- : Contains something.
Value
A [type] that ...
For example, "a non-negative integer less than ... that represents the number of elements in the array".
{{js_property_attributes(1, 0, 0)}}
The three numbers passed to js_property_attributes represent the configurable, enumerable, and writable attributes, respectively. Read the spec or conduct experiments. If there are multiple possible attribute combinations depending on how the object is created, or if the property is only conditionally present, add a note.
Description
Most of the description of the property should go here. Be as comprehensive as possible. If there are many pages that share the same description, consider adding a new section to the class's landing page and linking to it from here. For example, Array methods and empty slots is linked to from every array method page.
Readers should be able to understand the API in its entirety from this section without reading the examples section below. Examples presented in this section, should they be necessary, should be concise and do not have to be real-world-relevant.
Examples
Note that we use the plural "Examples" even if the page only contains one example.
A descriptive heading
Each example must have an H3 heading naming the example. The heading should be descriptive of what the example is doing. For example, "A simple example" does not say anything about the example and therefore, not a good heading. The heading should be concise. For a longer description, use the paragraph after the heading. The first example may be called "Using nameOfTheProperty".
See our guide on how to add code examples for more information.
Specifications
{{Specifications}}
To use this macro, remove the backticks and backslash in the markdown file.
Browser compatibility
{{Compat}}
To use this macro, remove the backticks and backslash in the markdown file.
See also
Include links to reference pages and guides related to the current property. For more guidelines, see the See also section in the Writing style guide.
- Polyfill of
nameOfThePropertyincore-js - es-shims polyfill of
nameOfTheProperty - link1
- link2
- external_link (year)