#!/usr/bin/env node

var repl = require('repl');
var Chrome = require('../');

Chrome(function (chrome) {
    var chromeRepl = repl.start({
        'prompt': 'chrome> '
    });

    chromeRepl.on('exit', function () {
        chrome.close();
    });

    for (var domain in chrome) {
        chromeRepl.context[domain] = chrome[domain];
    }
});

@@ -42,16 +42,65 @@
 repl');%0A
+var protocol = require('../lib/Inspector.json');%0A
 var Chro
@@ -316,21 +316,95 @@
 main
+Idx
  in 
-chrome) %7B
+protocol.domains) %7B%0A        var domainName = protocol.domains%5BdomainIdx%5D.domain;
 %0A   
@@ -433,16 +433,20 @@
 t%5Bdomain
+Name
 %5D = chro
@@ -454,16 +454,20 @@
 e%5Bdomain
+Name
 %5D;%0A    %7D

Add protocol API only to the REPL context