nsIMutable
Last changed in Gecko 1.9 (Firefox 3)Implemented by: @mozilla.org/network/standard-url;1
. To create an instance, use:
var standardURL = Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIStandardURL);
void init(in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); |
Attribute | Type | Description |
mutable | boolean | Control whether or not this URL can be modified. Protocol handlers can set this flag before handing out an URL to ensure that it is not inadvertently modified. Obsolete since Gecko 1.9 |
These constants describe how to normalize an URL.
Constant | Value | Description |
URLTYPE_STANDARD | 1 | blah:foo/bar => blah://foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar |
URLTYPE_AUTHORITY | 2 | blah:foo/bar => blah://foo/bar blah:/foo/bar => blah://foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah://foo/bar |
URLTYPE_NO_AUTHORITY | 3 | blah:foo/bar => blah:///foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar |
Normalizes a given URL to an Standard URL.
void init( in unsigned long aUrlType, in long aDefaultPort, in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI );
aUrlType
aDefaultPort
aSpec
aOriginCharset
null
, then provide aBaseURI
implements this interface, the origin charset of aBaseURI
will be assumed, otherwise defaulting to UTF-8 (that is, no charset transformation from aSpec
).aBaseURI
null
, aSpec
must specify an absolute URI. Otherwise, aSpec
will be resolved relative to aBaseURI
.