iFrame usage example

Prerequisites before testing the example:
  1. Use Eliq API to receive a `ticket-id` with `status = 'completed'`.
  2. Then edit this HTML file and (1) provide that `ticket-id` to the 'initializer-v1' component of the Eliq web-app (which you're loading inside of an iFrame window) by updating the `TICKET_ID` constant value. (2) Update the `IFRAME_DOMAIN` constant to point to where the Eliq web-app is hosted.
  3. Run the server and open this HTML file in the browser.
    Note! Eliq should have already let its web-app to get embedded from where you're deploying this HTML file (origin) to prevent `X-Frame-Options` errors.
  4. First click `Init Initializer` button to load the Eliq web-app in an iFrame window, while it's initializing 'initializer-v1' component! Then click any other button to load the Eliq web-app to load other components inside of it.
    Important! Whenever you like to load the Eliq web-app, you MUST always load it with the 'initializer-v1' component + your desired component. Because 'initializer-v1' prepares the environment for other components to get loaded successfully and show data to the user.
    Note! You can always load the Eliq web-app with the 'initializer-v1' component, but WITHOUT providing it with a `ticket-id` (through URL Query Parameters), if you already know that you have authenticated the user before! Although, you can always provide it to re-authenticate the user with a new `ticket-id`.