Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjs_console.cpp
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fxjs/cjs_console.h"
8
9#include "core/fxcrt/span.h"
10#include "fxjs/cjs_event_context.h"
11#include "fxjs/cjs_object.h"
12#include "fxjs/js_define.h"
13
14const JSMethodSpec CJS_Console::MethodSpecs[] = {{"clear", clear_static},
15 {"hide", hide_static},
16 {"println", println_static},
17 {"show", show_static}};
18
19uint32_t CJS_Console::ObjDefnID = 0;
20const char CJS_Console::kName[] = "console";
21
22// static
23uint32_t CJS_Console::GetObjDefnID() {
24 return ObjDefnID;
25}
26
27// static
28void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine) {
29 ObjDefnID = pEngine->DefineObj(CJS_Console::kName, FXJSOBJTYPE_STATIC,
30 JSConstructor<CJS_Console>, JSDestructor);
31 DefineMethods(pEngine, ObjDefnID, MethodSpecs);
32}
33
34CJS_Console::CJS_Console(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
35 : CJS_Object(pObject, pRuntime) {}
36
37CJS_Console::~CJS_Console() = default;
38
39CJS_Result CJS_Console::clear(CJS_Runtime* pRuntime,
40 pdfium::span<v8::Local<v8::Value>> params) {
42}
43
44CJS_Result CJS_Console::hide(CJS_Runtime* pRuntime,
45 pdfium::span<v8::Local<v8::Value>> params) {
47}
48
49CJS_Result CJS_Console::println(CJS_Runtime* pRuntime,
50 pdfium::span<v8::Local<v8::Value>> params) {
52}
53
54CJS_Result CJS_Console::show(CJS_Runtime* pRuntime,
55 pdfium::span<v8::Local<v8::Value>> params) {
57}
@ FXJSOBJTYPE_STATIC
static uint32_t GetObjDefnID()
~CJS_Console() override
CJS_Console(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
static void DefineJSObjects(CFXJS_Engine *pEngine)
static CJS_Result Success()
Definition cjs_result.h:28