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.
精彩评论