7#include "fxjs/xfa/cjx_model.h"
11#include "fxjs/js_resources.h"
12#include "fxjs/xfa/cfxjse_engine.h"
13#include "fxjs/xfa/cfxjse_value.h"
14#include "third_party/base/containers/span.h"
15#include "v8/include/v8-object.h"
16#include "xfa/fxfa/parser/cxfa_delta.h"
17#include "xfa/fxfa/parser/cxfa_document.h"
18#include "xfa/fxfa/parser/xfa_basic_data.h"
21 {
"clearErrorList", clearErrorList_static},
22 {
"createNode", createNode_static},
23 {
"isCompatibleNS", isCompatibleNS_static}};
37 pdfium::span<v8::Local<v8::Value>> params) {
42 pdfium::span<v8::Local<v8::Value>> params) {
43 if (params.empty() || params.size() > 3)
47 if (params.size() > 1)
48 name = runtime->ToWideString(params[1]);
51 if (params.size() == 3)
52 nameSpace = runtime->ToWideString(params[2]);
54 WideString tagName = runtime->ToWideString(params[0]);
55 XFA_Element eType = XFA_GetElementByName(tagName.AsStringView());
64 pNewNode->JSObject()->SetAttributeByEnum(
XFA_Attribute::Name, name,
true);
73 pdfium::span<v8::Local<v8::Value>> params) {
78 if (params.size() >= 1)
79 nameSpace = runtime->ToWideString(params[0]);
81 return CJS_Result::Success(
82 runtime->NewBoolean(TryNamespace().value_or(WideString()) == nameSpace));
86 v8::Local<v8::Value>* pValue,
91 v8::Local<v8::Value>* pValue,
friend class EventParamScope
static CJS_Result Success()
static CJS_Result Failure(JSMessage id)
CJX_Model(CXFA_Node *obj)
bool DynamicTypeIs(TypeTag eType) const override
bool DynamicTypeIs(TypeTag eType) const override
CJX_Node(CXFA_Node *node)
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
CXFA_Node * GetXFANode() const
bool HasAttribute(XFA_Attribute attr) const
CFX_XMLNode * CreateXMLMappingNode()
XFA_PacketType GetPacketType() const