mozilla

Revision 166734 of Describing microformats in JavaScript

  • Revision slug: Describing_microformats_in_JavaScript
  • Revision title: Describing microformats in JavaScript
  • Revision id: 166734
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment tiny bit more info, will do more soon.

Revision Content

{{template.Fx_minversion_header(3)}} {{template.Draft()}} Microformats are described in JavaScript by using a standardized structure format that has several standard members that describe the object.

Microformat definition format

The microformat definition must contain the following entries:

mfVersion
Specifies the version number of the microformat API to which the definition was written. For Firefox 3, this should be set to 0.8.
mfObject
The JavaScript object that implements the microformat.
className
A string specifying the name of the microformat's class.
properties
A structure describing the properties of the microformat.

Property specifications

Each property in the properties structure is specified by its name, and may include additional attributes if the property so requires.

See also

Using microformats, Parsing microformats in JavaScript

Revision Source

<p>{{template.Fx_minversion_header(3)}}
{{template.Draft()}}
Microformats are described in JavaScript by using a standardized structure format that has several standard members that describe the object.
</p>
<h3 name="Microformat_definition_format">Microformat definition format</h3>
<p>The microformat definition must contain the following entries:
</p>
<dl><dt><code>mfVersion</code>
</dt><dd>Specifies the version number of the microformat API to which the definition was written. For Firefox 3, this should be set to 0.8.
</dd><dt><code>mfObject</code>
</dt><dd>The JavaScript object that implements the microformat.
</dd><dt><code>className</code>
</dt><dd>A string specifying the name of the microformat's class.
</dd><dt><code>properties</code>
</dt><dd>A structure describing the properties of the microformat.
</dd></dl>
<h3 name="Property_specifications">Property specifications</h3>
<p>Each property in the <code>properties</code> structure is specified by its name, and may include additional attributes if the property so requires.
</p>
<h3 name="See_also">See also</h3>
<p><a href="en/Using_microformats">Using microformats</a>, <a href="en/Parsing_microformats_in_JavaScript">Parsing microformats in JavaScript</a>
</p>
Revert to this revision