var spawn = require('child_process').spawn;
var path = require('path');

module.exports = function (options) {
    options = options || {};
    options.url = options.url || 'http://nodejs.org';
    options.name = options.name || 'nodejs';

    var client;
    switch (process.platform) {
    case 'win32':
        client = path.resolve(__dirname + '/cefclient/cefclient');
        break;
    case 'linux':
        client = path.resolve(__dirname + '/build/default/topcube');
        break;
    default:
        console.warn('');
        return null;
        break;
    }

    var args = [];
    for (var key in options) args.push('--' + key + '=' + options[key]);

    var child = spawn(client, args);
    child.on('exit', function(code) {
        process.exit(code);
    });
    child.stdout.pipe(process.stdout);
    child.stderr.pipe(process.stderr);
    return child;
};


@@ -249,16 +249,35 @@
 client;%0A
+    var keys = %5B%5D;%0A
     swit
@@ -296,24 +296,24 @@
 platform) %7B%0A
-
     case 'wi
@@ -381,24 +381,107 @@
 efclient');%0A
+        keys = %5B'url', 'name', 'width', 'height', 'minwidth', 'minheight', 'ico'%5D;%0A
         brea
@@ -566,24 +566,100 @@
 /topcube');%0A
+        keys = %5B'url', 'name', 'width', 'height', 'minwidth', 'minheight'%5D;%0A
         brea
@@ -790,16 +790,70 @@
 options)
+ %7B%0A        if (keys.indexOf(key) !== -1) %7B%0A           
  args.pu
@@ -888,16 +888,32 @@
 s%5Bkey%5D);
+%0A        %7D%0A    %7D
 %0A%0A    va

Define valid keys per platform and filter out invalid options.