<
How to display Twitter embedded content in an iframe after rendering

2022-05-22

The conclusion is to find the `twttr` object from `iframe.contentWindow` and write the display process as the second argument of `event.bind("rendered", () => {})`. The background is that you want to display embedded content from a URL like `https://twitter.com/openwc/status/1427617679427440643` on a blog site. The html in the response of `https://publish.twitter.com/oembed?url=${URL}` becomes the embedded content. By setting this to the srcdoc of the iframe, you can display the embedded content....