We ship small embeddable widgets (a club availability view, a court-cost calculator, a data chart) that other sites can put on a page. This post is about the design decisions: how the iframe is locked down, how it resizes without hand-tuning, and how the credit line is built so the attribution is visible, optional to remove, and not a trick.
Two pieces: a loader and an embed route
The host page adds a script and a placeholder:
<script src= "https://meetandplay.mx/embed.js" async ></script> <div data-meetandplay-club= "club-slug" ></div>
Enter fullscreen mode
Exit fullscreen mode
The script finds each placeholder, builds an iframe pointing at a dedicated /embed/... route on our domain, and inserts it.…