Initial iframe support

Fixes tests and replaces #702.