The URL class parses URIs into individual parts. The class also supports resolving relative paths against specified URLs.
Utility for parsing URLs.
Creates a new Url object.
u = newInstance( v, b )
u as UrlInstance: Instance of a Url.
Merges the specified URL with the current window URL (document.URL).
v = qualifyToHost( u )
v as String: Full url derived from the specified partial URL, and the window URL.
On object representation of a specified URL.
Demonstrate how to obtain a full URL from a specified partial URL.
var sFullUrl = HemiEngine.util.url.qualifyToHost("someFile.html");Demonstrate how to obtain a UrlInstance and access its members.
var oUrl = HemiEngine.util.url.newInstance("/path/someFile.html?somequery=1");
var sQuery = oUrl.getQuery();Unique instance identifier.
String = object.object_id
The type of this object.
String = object.object_type
Version of the object class.
String = object.object_version
Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.
int = object.ready_state
Initializes the UrlInstance.
void _init( o )
Returns the domain name.
d = getDomain( )
d as String: The domain name.
Returns any file reference.
f = getFile( )
f as String: The file portion of the URL.
Returns the unique id of the object.
i = getObjectId( )
i as String: The unique object instance id.
Returns the type of the object.
t = getObjectType( )
t as String: The type of the object instance.
Returns the version of the object.
v = getObjectVersion( )
v as String: The version of the object instance.
Returns the URL path.
p = getPath( )
p as String: The URL path.
Returns the URL protocol.
p = getProtocol( )
p as String: The URL protocol.
Returns any query string.
q = getQuery( )
q as String: The query string.
Returns the state of the object.
s = getReadyState( )
s as int: The object ready state.
Merges the specified partial URL with the current context URL of the UrlInstance.
v = qualify( u )
v as String: Full url derived from the specified partial URL, and the context URL.
[ Hemi JavaScript Framework - Stephen W. Cote, 2002 - 2009. ]