219
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Access to microformats and the microformats APIs will be via the global Microformats object. Access to this object will be via the new JS script loader. To load Microformats, you would need this at the top: | Access to microformats and the microformats APIs will be via the global Microformats object. Access to this object will be via the new JS script loader. To load Microformats, you would need this at the top: | ||
Components.utils.import(" | Components.utils.import("resource://gre/modules/Microformats.js"); | ||
The following APIs will be available for accessing microformat content from a web page: | The following APIs will be available for accessing microformat content from a web page: | ||
| Line 120: | Line 120: | ||
*/ | */ | ||
Microformats.parser.uriGetter(propnode, parentnode); | Microformats.parser.uriGetter(propnode, parentnode); | ||
/** | |||
* Used to specifically retrieve a telephone number in a microformat node. | |||
* Basically this is to handle weird value excerpting | |||
* | |||
* @param propnode The DOMNode to check | |||
* @param parentnode The parent node of the property. If it is a subproperty, | |||
* this is the parent property node. If it is not, this is the | |||
* microformat node. | |||
* @return A string with the telephone number | |||
*/ | |||
Microformats.parser.telGetter(propnode, parentnode); | |||
/** | /** | ||
edits