getScheme (XSPUrl - JavaScript)

Gets the scheme (protocol) of the URL.

Defined in

XSPUrl (JavaScript)

Syntax

getScheme() : string
Return value Description
string The scheme.

Example

This example gets the scheme of the URL for the current context.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var url : XSPUrl;

try {
	url = context.getUrl();
	p("getScheme = " + url.getScheme());

} catch(e) {
	p("Error = " + e);
}

Print output from the example might be as follows:

<<<getScheme = http>>>