phantomjs/bridge.js
function sendMessage() {
    var cache = [];
    var args = [].slice.call(arguments);

    // Safe stringifying of cyclical JSON
    function decycle(key, val) {
      if (typeof val === 'object' && val !== null) {
        if (cache.indexOf(val) >= 0) return;
        cache.push(val);
      }
      return val;
    }

    alert(JSON.stringify(args, decycle));
  }
function sendMessage() {
    var cache = [];
    var args = [].slice.call(arguments);

    // Safe stringifying of cyclical JSON
    function decycle(key, val) {
      if (typeof val === 'object' && val !== null) {
        if (cache.indexOf(val) >= 0) return;
        cache.push(val);
      }
      return val;
    }

    alert(JSON.stringify(args, decycle));
  }
function sendMessage ( ) { var cache = [ ] ; var args = [ ] . slice . call ( arguments ) ; // Safe stringifying of cyclical JSON function decycle ( key , val ) { if ( typeof val === 'object' && val !== null ) { if ( cache . indexOf ( val ) >= 0 ) return ; cache . push ( val ) ; } return val ; } alert ( JSON . stringify ( args , decycle ) ) ; }
Send messages to the parent phantom.js process via alert! Good times!!
Send messages to the parent phantom . js process via alert! Good times!!