开发者

On-Site real-time widget using Node/Socket.io + PHP

开发者 https://www.devze.com 2023-04-04 14:28 出处:网络
Gurus of SO 开发者_Go百科I am experimenting with a tiny widget that you can put on any site using a single line of JavaScript code, similar to the many chatting apps available today. My question is w

Gurus of SO

开发者_Go百科

I am experimenting with a tiny widget that you can put on any site using a single line of JavaScript code, similar to the many chatting apps available today. My question is which is the best way to do this - iFrame or not? Also, what are the security measures to think of when introducing your code on third party sites?

Thank you.


On some widgets i've used iframes because it offers me more flexibility and i didn't need to inject some javascript libraries into client's DOM, which could harm the entire page. For auto-resizing based on content i've used window.postMessage.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号