fastn-stack / fastn

🚧 (Alpha stage software) fastn - better way to build websites 🚧
https://fastn.com
GNU Affero General Public License v3.0
467 stars 36 forks source link

Link doesn't work with iframe #408

Open AviralVerma13 opened 2 years ago

AviralVerma13 commented 2 years ago

I'm using the following code for movie-db -

--- ftd.iframe:
src: http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1._SX320.jpg
link : /moviepage
height : 500
width : 320

here, src is pointing to an IMDB poster. and link will take us to the respective "moviepage", but the link isn't able to be associated with the entire poster/iframe.

amitu commented 2 years ago

This is interesting. Why are you using ftd.iframe to show an image instead of ftd.image?

I think: in general this is impossible. Any event inside the area defined by iframe can not be visible to the outer frame. This is a security consideration.

We can prototype is using HTML and prove that what I am saying is correct.