From d2178c3c1684725bbbcceba266c4860f3ac5a874 Mon Sep 17 00:00:00 2001 From: Odilitime Date: Thu, 1 Feb 2018 21:56:21 -0800 Subject: [PATCH] flush out browserjs --- src/parsers/scripting/javascript/BrowserJS.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/parsers/scripting/javascript/BrowserJS.h b/src/parsers/scripting/javascript/BrowserJS.h index e072de9..e65bbff 100644 --- a/src/parsers/scripting/javascript/BrowserJS.h +++ b/src/parsers/scripting/javascript/BrowserJS.h @@ -1,4 +1,25 @@ -#ifndef JSPARSER_H -#define JSPARSER_H +#ifndef BROWSERJS_H +#define BROWSERJS_H + +#include "JSParser.h" +#include "../../../interfaces/components/DocumentComponent.h" +#include "../../../interfaces/graphical/renderers/glfw/Window.h" + +#include + +std::vector getConstructs(); +bool isConstruct(std::string construct); +js_internal_storage *executeConstruct(std::string functionName, std::string params, js_function &scope); +js_internal_storage *jsConstruct_querySelector(std::string params, js_function &scope); + +class BrowserJavaScript : public JavaScript { +public: + BrowserJavaScript() { + this->setUpRoot(); + // we can modify rootScope... + } + DocumentComponent *document; + Window *window; +}; #endif