Version 1
[yaffs-website] / vendor / jcalderonzumba / gastonjs / src / Client / main.js
diff --git a/vendor/jcalderonzumba/gastonjs/src/Client/main.js b/vendor/jcalderonzumba/gastonjs/src/Client/main.js
new file mode 100644 (file)
index 0000000..c8e3be8
--- /dev/null
@@ -0,0 +1,29 @@
+var Poltergeist, system, _ref, _ref1, _ref2;
+
+//Inheritance tool
+phantom.injectJs("" + phantom.libraryPath + "/Tools/inherit.js");
+
+//Poltergeist main object
+phantom.injectJs("" + phantom.libraryPath + "/poltergeist.js");
+
+//Errors that are controller in the poltergeist code
+phantom.injectJs("" + phantom.libraryPath + "/Errors/error.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/obsolete_node.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/invalid_selector.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/frame_not_found.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/mouse_event_failed.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/javascript_error.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/browser_error.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/status_fail_error.js");
+phantom.injectJs("" + phantom.libraryPath + "/Errors/no_such_window_error.js");
+
+//web server to control the commands
+phantom.injectJs("" + phantom.libraryPath + "/Server/server.js");
+
+phantom.injectJs("" + phantom.libraryPath + "/web_page.js");
+phantom.injectJs("" + phantom.libraryPath + "/node.js");
+phantom.injectJs("" + phantom.libraryPath + "/browser.js");
+
+system = require('system');
+
+new window.Poltergeist(system.args[1], system.args[2], system.args[3], system.args[4] === 'false' ? false : true);