Reference getURLPath()

getURLPath()

Returns the current URL path as an Array of Strings.

For example, consider a sketch hosted at the URL https://example.com/sketchbook. Calling getURLPath() returns ['sketchbook']. For a sketch hosted at the URL https://example.com/sketchbook/monday, getURLPath() returns ['sketchbook', 'monday'].

Examples

Syntax

getURLPath()

Parameters

Returns

String[]: path components.

Related References