Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow iframes to be loaded from data URIs. #793

Merged
merged 1 commit into from
Oct 30, 2015

Conversation

cramforce
Copy link
Member

Fixes #405

@cramforce cramforce force-pushed the iframe-uris branch 2 times, most recently from 291b58c to e090316 Compare October 30, 2015 01:12
'allow-same-origin is not allowed with the srcdoc attribute %s.',
this.element);
var dataUri = 'data:text/html;charset=utf-8;base64,' + btoa(srcdoc);
this.element.setAttribute('src', dataUri);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all the same, I'd rather if amp-iframe kept the original srcdoc and transformation would only be done to set on iframe element.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dvoytenko
Copy link
Contributor

LGTM with one comment.

cramforce added a commit that referenced this pull request Oct 30, 2015
Allow iframes to be loaded from data URIs.
@cramforce cramforce merged commit 482034f into ampproject:master Oct 30, 2015
@cramforce cramforce deleted the iframe-uris branch October 30, 2015 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants