use super::prelude::*;
use crate::tree::AttributeMap;
pub fn render_iframe(ctx: &mut HtmlContext, url: &str, attributes: &AttributeMap) {
debug!("Rendering iframe block (url '{url}')");
ctx.html().iframe().attr(attr!(
"src" => url,
"crossorigin";;
attributes
));
}
pub fn render_html(ctx: &mut HtmlContext, contents: &str, attributes: &AttributeMap) {
debug!("Rendering html block (submitting to remote for iframe)");
let iframe_url = ctx.handle().post_html(ctx.info(), contents);
ctx.html().iframe().attr(attr!(
"src" => &iframe_url,
"crossorigin";;
attributes
));
}