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
cjx_desc.cpp
Go to the documentation of this file.
1// Copyright 2017 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/xfa/cjx_desc.h"
8
9#include "core/fxcrt/span.h"
10#include "fxjs/cfx_v8.h"
11#include "fxjs/js_resources.h"
12#include "fxjs/xfa/cfxjse_value.h"
13#include "v8/include/v8-primitive.h"
14#include "xfa/fxfa/parser/cxfa_desc.h"
15
16const CJX_MethodSpec CJX_Desc::MethodSpecs[] = {{"metadata", metadata_static}};
17
18CJX_Desc::CJX_Desc(CXFA_Desc* desc) : CJX_Node(desc) {
19 DefineMethods(MethodSpecs);
20}
21
22CJX_Desc::~CJX_Desc() = default;
23
24bool CJX_Desc::DynamicTypeIs(TypeTag eType) const {
25 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
26}
27
28CJS_Result CJX_Desc::metadata(CFXJSE_Engine* runtime,
29 pdfium::span<v8::Local<v8::Value>> params) {
30 if (params.size() != 0 && params.size() != 1)
32
33 return CJS_Result::Success(runtime->NewString(""));
34}
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:28
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:35
~CJX_Desc() override
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_desc.cpp:24
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_node.cpp:112
JSMessage