Iframe v Script
summary
Yandex Maps compares script vs iframe embedding and lists concrete wins and failures: script gives tight page integration but breaks when site CSS or globals mutate things (fixed partially with targeted CSS resets and mutationObserver cleanup), iframes isolate styles but cause lost mouse events, scroll capture and heavy parallel loads (mitigated by document-level event handling using the mouse buttons mask and exploring SharedWorker coordination), CSP requires explicit frame-src/script/image directives, and a hybrid script+iframe with postMessage proves the most practical today.
AI-written summary · about
chapters (6)
- 0:00Introduction to widgets
- 4:41Script problems
- 14:27Iframe problems
- 22:53Security and CSP
- 26:26Script vs iframe
- 28:32Q&A
related talks
21miframe abuse
44mIFRAME
29miframes: A look in to the black heart of the browsers
22mNuances of Iframe: Lessons from Contentstack Live Preview
20mWhy MCP and ChatGPT Apps Use Double Iframes
56mThird Party Scripts
25mMaster Scripts & Third Parties in Next.js
30mAchieving the Web Isolation Nirvana - How far along are we?
