> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onChange(handler: LocationChangeHandler) # Method package: wixLocationFrontend # Method menu location: wixLocationFrontend --> onChange # Method Link: https://dev.wix.com/docs/velo/apis/wix-location-frontend/on-change.md # Method Description: Adds an event handler that runs when an application page's URL changes. The event handler set by the `onChange()` method runs when the location changes but the change doesn't trigger navigation. This situation occurs when navigating between subitems on a page that's managed by a full-page application. For example, a store product page is a full-page application. When a product page's path changes because it's switching between items, no actual navigation is taking place. You can use the `onChange()` event handler to determine when a new product is displayed and perform any necessary partial updates on the current page. The `onChange()` method can only be used when browser [rendering](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/about-page-rendering.md) happens, meaning you can only use it in frontend code after the page is ready. To determine if a page is managed by a full-page application, use the Site API's `currentPage` property or `getSiteStructure()` method to retrieve a `StructurePage` object that corresponds to the page. If the object contains an `applicationId` value, then the page is managed by a full-page application. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get the new location path ```javascript import wixLocationFrontend from 'wix-location-frontend'; // ... wixLocationFrontend.onChange( (location) => { let newPath = location.path; } ); ``` ---