Cross domain troubles

It is so nice when things work perfectly on one domain and not on another. Such as all the students domains.

I have done a lot of research around this over the past days. Iframes have been around since the web dinosaurs and still have their place. The problems came when trying to make map/charting components react to the scroll progression of the wrodpress page. A lot of reading around wordpress and iframes have led me down a rabbit hole investigating web components as an alternative in wordpress.

What I tried so far:

  • Tested cross domain troubles acriss a few domains with very inconsistent results.
  • Tried to implement window events as a replacement for function calls, not succesful yet.
  • Researched fixes within WP such as controling the url structure to avoid Cross domain problems
  • REMEMBER TO CHECK UP ON WP HTACCESS FILE
  • Started going down the rabbit hole of using web components
  • Shadow DOM seems to be the way to go, but how much work?

If I am to go down this path I need to re-wrap all my visual leaflet and d3 components as web components, and at this stage I do not know if there is a quick way of achieving this. That is one major obstacle with completely impossible to estimate time costs.

The quick fix is to make the iframe variant work on the existing domains and then keep researching the web component way.

The advantage of web components seems obvious. They promise complete web support, good performance, scoping and avoid frameworks.

Currently reading this:

https://medium.com/bbc-product-technology/goodbye-iframes-6c84a651e137

For now it is back to trying the window events