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.
This page is generated from the comments in src/core/environment.js . Please feel free to edit it and submit a pull request!

Related References