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

Chrome: Enable rendering in cross-origin iframes #124

adam-p opened this issue Oct 16, 2013 · 0 comments

Chrome: Enable rendering in cross-origin iframes #124

adam-p opened this issue Oct 16, 2013 · 0 comments


Copy link

@adam-p adam-p commented Oct 16, 2013

Attempts to render Markdown in a different-origin-than-topmost-page iframe results in silent failure and console error output. This causes problems for Wordpress's drop-down editor, Google Groups that are embedded in a webpage, and probably other cases (also embedded Google Hangouts, but that barely works anyway).

This problem isn't present in the Firefox extension. I'm not sure about the Safari extension.

It will probably be necessary to use the all_frames for content_scripts in manifest.json. This will need tons of testing and will probably need changes/fixes to compensate for the content scripts being loaded multiple times in a page.

A tip from this SO answer:

"In case you just need javascript injected in iframe but not in top document you can check inside your content_frame.js file like this:"

if (parent === top) {
    // here you can put your code that will run only inside iframe

Also affects function in Disqus embedded comments. MDH doesn't work in Disqus anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant