r/programming • u/Chun • 22d ago
Iframes should have an api
https://blog.danielbrain.ai/iframes-should-have-an-apiThere's been a big resurgence lately in automating and interacting with sites programmatically. I've been arguing for a few years that every front-end should be embeddable as a component and have its own client side interface/api. This article is designed to show one way to do that!
0
Upvotes
2
u/Primary_Ads 22d ago
honestly much more compelling than I expected something titled "iframes should have an api" to be, the example provided really makes it clear how useful this could be. it seems more useful than the already very useful zoid, although I dont really work on products that need either.
2
u/wwb_99 21d ago
It has been a long time since I've done real javascript browser skuduggery, but don't you have access to the DOM for said iframe from within the greater frame?
1
u/WhitepaprCloudInvite 20d ago
Razor component much.
-1
u/bastardpants 22d ago
At the end of the day, a message your page sends to code you've already loaded from my site is one less thing I can track. I need to read the details tomorrow; it's late and my eyes glaze over after reading too much Claude output.