Bug 588674 - Convert URL.md to apidocs format. r=adw, a0.7=myk
authorNoelle Murata <fiveinchpixie@gmail.com>
Thu, 19 Aug 2010 02:05:14 -0700
changeset 744 ae6974c3c1ac083697756596ea657a3ea5cfb518
parent 743 f44d7d44595fdedf8a8eabedabc0b7111fb4f7e1
child 745 444fdb7e0708c6862866f048ef1363394b04c54b
push id275
push userdwillcoxon@mozilla.com
push dateThu, 19 Aug 2010 09:08:58 +0000
reviewersadw
bugs588674
Bug 588674 - Convert URL.md to apidocs format. r=adw, a0.7=myk
packages/jetpack-core/docs/url.md
--- a/packages/jetpack-core/docs/url.md
+++ b/packages/jetpack-core/docs/url.md
@@ -1,39 +1,80 @@
-The `url` module provides functionality for the parsing and
-retrieving of URLs.
+<!-- contributed by Atul Varma [atul@mozilla.com]  -->
+<!-- edited by Noelle Murata [fiveinchpixie@gmail.com]  -->
+
+
+The `url` module provides functionality for the parsing and retrieving of URLs.
 
 ## Constructors ##
 
-<code>url.**URL**(*source*, *base*)</code>
-
-The URL constructor creates an object that represents a URL,
-verifying that the provided string is a valid URL in the process.
-Any API in the SDK which has a URL parameter will accept `URL` 
-objects, not raw strings.
-
-The `source` parameter is a string
-to be converted into a URL. If `source` is not a valid URI, this
-constructor will throw an exception.
+<api name="URL">
+@constructor
+  The URL constructor creates an object that represents a URL,  verifying that
+  the provided string is a valid URL in the process.  Any API in the SDK which
+  has a URL parameter will accept `URL` objects, not raw strings, unless
+  otherwise noted.
 
-The optional `base` parameter is an optional string that is used
-to resolve the relative `source` URLs into absolute ones.
-
-URL objects have the following properties:
+@param source {string}
+  A string to be converted into a URL. If `source` is not a valid URI, this
+  constructor will throw an exception.
 
-* [scheme] {string} The name of the protocol in the URL.
-* [userPass] {string} The username:password part of the URL; `null` if not present.
-* [host] {string} The host of the URL, `null` if not present.
-* [port] {int} The port number of the URL, `null` if none was specified.
-* [path] {string} The path component of the URL.
+@param [base] {string}
+  An optional string used to resolve relative `source` URLs into absolute ones.
+</api>
+
 
 ## Functions ##
 
-<code>url.**toFilename**(*url*)</code>
-Attempts to convert the given URL to a native file path.  This
-function will automatically attempt to resolve non-file protocols,
-such as the `resource:` protocol, to their place on the file
-system. An exception is raised if the URL can't be converted;
-otherwise, the native file path is returned as a string.
-The `url` parameter is the string URL to be converted.
+<api name="toFilename">
+@function
+  Attempts to convert the given URL to a native file path.  This function will
+  automatically attempt to resolve non-file protocols, such as the `resource:`
+  protocol, to their place on the file system. An exception is raised if the URL
+  can't be converted; otherwise, the native file path is returned as a string.
+
+@param url {string}
+  The URL, as a string, to be converted.
+
+@returns {string}
+  The converted native file path as a string.
+</api>
+
+<api name="fromFilename">
+@function
+  Converts the given native file path to a `file:` URL.
+
+@param path {string}
+  The native file path, as a string, to be converted.
+
+@returns {string}
+  The converted URL as a string.
+</api>
+
 
-<code>url.**fromFilename**(*path*)</code>
-Converts the given native file path `path` to a `file:` URL.
+## URL Objects ##
+
+Objects created by the `URL` constructor have the following properties:
+
+<api name="scheme">
+@property {string}
+  The name of the protocol in the URL.
+</api>
+
+<api name="userPass">
+@property {string}
+  The username:password part of the URL, `null` if not present.
+</api>
+
+<api name="host">
+@property {string}
+  The host of the URL, `null` if not present.
+</api>
+
+<api name="port">
+@property {integer}
+  The port number of the URL, `null` if none was specified.
+</api>
+
+<api name="path">
+@property {string}
+  The path component of the URL.
+</api>