function postMessage()

in salesforce/canvas/public/javascripts/canvas-all.js [870:885]


    function postMessage(message, target_url, target) {
      var sfdcJson = Sfdc.JSON || JSON;
      if ($$.isNil(target_url)) {
        throw 'ERROR: target_url was not supplied on postMessage';
      }
      var otherWindow = $$.stripUrl(target_url);
      target = target || parent;
      if (window.postMessage) {
        if ($$.isObject(message)) {
          message.targetModule = 'Canvas';
        }
        message = sfdcJson.stringify(message);
        $$.console.log('Sending Post Message ', message);
        target.postMessage(message, otherWindow);
      }
    }