Skip to main content
100%

svg -> foreign object -> iframe to load and render arbitrary html inside SVG (based on Matt Finkle article)

✓ Published0🌍 Public
GGerHobbelt
Last edited Sep 9, 2012
Created on May 6, 2012

This example embeds a live web page inside an SVG graphic by nesting an XHTML `<foreignObject>` element within an SVG `<g>` transform. The foreign object contains an `<iframe>` whose `src` points to the external blog starkravingfinkle.org, rendering that arbitrary HTML content directly inside the SVG canvas while applying rotation and translation. The code relies on native SVG and XHTML namespace declarations, with a third-party script for display fixes. A warning notes that NoScript may flag the iframe as click-jacking.

AI-generated description

Similar vizzes