Skip to content

Instantly share code, notes, and snippets.

@DamonOehlman
Created October 5, 2011 13:12
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 DamonOehlman/1264389 to your computer and use it in GitHub Desktop.
Save DamonOehlman/1264389 to your computer and use it in GitHub Desktop.
Eve Helpers
var reRemote = /^remote\:?(.*)$/i;
// map all eve events to the childframes
eve.on('*', function() {
var message,
eventName = eve.nt(),
lastArg = arguments[arguments.length - 1];
if (! reRemote.test(lastArg)) {
if (slideFrames.length) {
message = JSON.stringify({
name: eventName,
args: Array.prototype.slice.call(arguments, 0)
});
} // if
slideFrames.each(function() {
this.contentWindow.postMessage(message, '*');
});
} // if
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment