diff options
Diffstat (limited to 'fxjs/cjs_console.h')
-rw-r--r-- | fxjs/cjs_console.h | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/fxjs/cjs_console.h b/fxjs/cjs_console.h index 22c18dec12..56243cf6a5 100644 --- a/fxjs/cjs_console.h +++ b/fxjs/cjs_console.h @@ -11,37 +11,31 @@ #include "fxjs/JS_Define.h" -class console : public CJS_EmbedObj { - public: - explicit console(CJS_Object* pJSObject); - ~console() override; - - public: - CJS_Return clear(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params); - CJS_Return hide(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params); - CJS_Return println(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params); - CJS_Return show(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params); -}; - class CJS_Console : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Console(v8::Local<v8::Object> pObject); - ~CJS_Console() override = default; + ~CJS_Console() override; - JS_STATIC_METHOD(clear, console); - JS_STATIC_METHOD(hide, console); - JS_STATIC_METHOD(println, console); - JS_STATIC_METHOD(show, console); + JS_STATIC_METHOD(clear, CJS_Console); + JS_STATIC_METHOD(hide, CJS_Console); + JS_STATIC_METHOD(println, CJS_Console); + JS_STATIC_METHOD(show, CJS_Console); private: static int ObjDefnID; + static const char kName[]; static const JSMethodSpec MethodSpecs[]; + + CJS_Return clear(CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params); + CJS_Return hide(CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params); + CJS_Return println(CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params); + CJS_Return show(CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params); }; #endif // FXJS_CJS_CONSOLE_H_ |