> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.froonze.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Customer Account Page API

For every element and page change we trigger a **JS event**. So if you want to modify an object you just need to listen to the event and modify it.

Here's an example:

```javascript
document.addEventListener('frcp.orders.orderMounted', function(event) {
  const el = event.detail.el;
  const contactBtn = el.querySelector('.frcp-order__contact-btn');
  const newBtn = document.createElement('a');
  newBtn.classList = 'frcp-order__btn frcp-order__contact-btn frcp-btn frcp-btn--secondary';
  newBtn.innerText = contactBtn.innerText;
  newBtn.href = '/pages/get-in-touch-with-us';
  contactBtn.before(newBtn);
  contactBtn.remove()
});
```

This is our list of events:

*   *frcp.mainApp.mounted*
*   *frcp.navigation.mounted*
*   *frcp.addresses.addressMounted -- params { address:, el: }*
*   *frcp.addresses.formMounted*
*   *frcp.addresses.mounted*
*   *frcp.contact.mounted*
*   *frcp.customPage.mounted -- params { pageData:, el: }*
*   *frcp.emptyView.mounted*
*   *frcp.loyalty.mounted*
*   *frcp.loyalty.walletMounted*
*   *frcp.loyalty.earningRulesMounted*
*   *frcp.loyalty.spendingRulesMounted*
*   *frcp.loyalty.activitiesMounted*
*   *frcp.loyalty.modalMounted*
*   *frcp.orders.mounted*
*   *frcp.orders.orderMounted -- params { order:, el: }*
*   *frcp.profile.editFormMounted -- params { el: }*
*   *frcp.profile.mounted*
*   *frcp.recentlyViewed.mainMounted*
*   *frcp.recentlyViewed.productMounted -- params { product:, el: }*
*   *frcp.wishlist.mainMounted*
*   *frcp.wishlist.productMounted -- params { product: , el: }*