Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/wip.gc-enhance' into wip.postmon…
Browse files Browse the repository at this point in the history
…keys

Conflicts:
	js/lib/post_message_shim.js
  • Loading branch information
LeeMallabone committed Jan 22, 2012
2 parents 7adc6a7 + d176032 commit 60caa13
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/lib/post_message_shim.js
Expand Up @@ -34,10 +34,11 @@ lib.postMessageShim = function (_public, _protected, opts) {
var listener = opts.iframe || opts.listener,
recipient = opts.iframe || opts.recipient;

// TODO: make sure "rapportive:true" is being set on all messages.
listener.message(function (msg, reply, e) {
if (_(opts.receive).include(msg.action)) {
_public.trigger(msg.action, msg);
} else {
} else if (msg.rapportive) {
fsLog("Got unexpected postMessage: " + JSON.stringify(msg));
}
});
Expand All @@ -47,7 +48,7 @@ lib.postMessageShim = function (_public, _protected, opts) {
if (recipient.jquery) {
recipient = recipient[0];
}
$.message(recipient, jQuery.extend({action: name}, msg), opts.remote_base_url);
$.message(recipient, jQuery.extend({action: name, rapportive: true}, msg), opts.remote_base_url);
});
});
};

0 comments on commit 60caa13

Please sign in to comment.