Menu

1 / 3

Building a third-party embed that survives any host page

DEV Community: javascript·Regime Map Team·14 days ago
#s6sfSGA7
#devtojavascript#devto#dev#embed#host
Reading 0:00
15s threshold

We publish Regime Map, a country-by-country register of gambling regulation. The people who write about the subject, lawyers and journalists mostly, need the same picture we already draw: which countries license online casino and which don't. So we made the map embeddable. Paste a snippet, get the map.

The hard part of a third-party embed isn't drawing the thing. It's that you ship code into pages you will never see. Somebody's WordPress theme sets svg { max-width: 50% } . Somebody else's news site has a strict Content-Security-Policy. A third one is a React app that adds your element after your script has already run.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.