inlay/inline
Self-contained iframe rendering for the <inlay-embed> Lustre component.
A Lustre component always renders into a shadow root. Several providers ship
a placeholder plus a host-page script that scans the document with
querySelectorAll to hydrate or resize the embed, and that scan cannot
reach inside a shadow root. For those providers this module renders the
embed as a self-contained <iframe> that points at the provider’s own embed
page, which needs no host-page script and works inside the shadow root.
The static (inlay.render) path keeps using the script-based embeds, which
work in plain light-DOM HTML
Values
pub fn bluesky_iframe(
did: String,
rkey: String,
height: Int,
) -> element.Element(msg)
Render a Bluesky post as a self-contained embed iframe for a resolved DID.
pub fn instagram_iframe(
post_type: embed.InstagramPostType,
id: String,
height: Int,
) -> element.Element(msg)
Render an Instagram post as a self-contained embed iframe.
pub fn mastodon_iframe(
server: String,
user: String,
id: String,
height: Int,
) -> element.Element(msg)
Render a Mastodon post as a self-contained embed iframe.
pub fn pixelfed_iframe(
server: String,
user: String,
id: String,
height: Int,
) -> element.Element(msg)
Render a Pixelfed post as a self-contained embed iframe.
pub const resize_class: String
Marks an iframe whose height is refined by a provider resize message. The component’s FFI listens for those messages on the shadow root and resizes the matching iframe.
pub fn tiktok_iframe(
id: String,
height: Int,
) -> element.Element(msg)
Render a TikTok video as a self-contained embed iframe.
pub fn tweet_iframe(
id: String,
height: Int,
) -> element.Element(msg)
Render a Tweet as a self-contained embed iframe.