Expose api within iframe

See issue #53