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

Returns

String[]: path components.
Notice any errors or typos? Please let us know. Please feel free to edit src/core/environment.js and open a pull request!

Related References