Skip to content

Instantly share code, notes, and snippets.

@benvinegar
Created September 5, 2013 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benvinegar/5c8e96bc7f58a8c85f4d to your computer and use it in GitHub Desktop.
Save benvinegar/5c8e96bc7f58a8c85f4d to your computer and use it in GitHub Desktop.
var notifyParent = function (eventName, eventData) {
{% comment %}
// Try to trigger event on Bus directly.
// NOTE: This only works because refreshparent.html should always be
// on the same URL as the Next iframe
//
// Why not use postMessage? Because IE8 and IE9 don't support
// postMessage between a popup window and its parent. Yep.
{% endcomment %}
var opener = window.opener;
if (opener && opener.DISQUS.Bus) {
opener.DISQUS.Bus.trigger(eventName, eventData);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment