7#include "fxjs/xfa/cjx_subform.h"
9#include "core/fxcrt/span.h"
10#include "fxjs/cfx_v8.h"
12#include "fxjs/js_resources.h"
13#include "fxjs/xfa/cfxjse_engine.h"
14#include "v8/include/v8-object.h"
15#include "xfa/fxfa/cxfa_eventparam.h"
16#include "xfa/fxfa/cxfa_ffnotify.h"
17#include "xfa/fxfa/fxfa.h"
18#include "xfa/fxfa/parser/cxfa_delta.h"
19#include "xfa/fxfa/parser/cxfa_document.h"
22 {
"execCalculate", execCalculate_static},
23 {
"execEvent", execEvent_static},
24 {
"execInitialize", execInitialize_static},
25 {
"execValidate", execValidate_static}};
28 DefineMethods(MethodSpecs);
38 pdfium::span<v8::Local<v8::Value>> params) {
39 if (params.size() != 1)
42 execSingleEventByName(runtime->ToWideString(params[0]).AsStringView(),
43 XFA_Element::Subform);
49 pdfium::span<v8::Local<v8::Value>> params) {
62 pdfium::span<v8::Local<v8::Value>> params) {
75 pdfium::span<v8::Local<v8::Value>> params) {
89void CJX_Subform::locale(
v8::Isolate* pIsolate,
90 v8::Local<v8::Value>* pValue,
95 fxv8::ReentrantToWideStringHelper(pIsolate, *pValue)
, true,
102 fxv8::NewStringHelper(pIsolate, wsLocaleName
.ToUTF8().AsStringView());
105void CJX_Subform::instanceManager(
v8::Isolate* pIsolate,
106 v8::Local<v8::Value>* pValue,
117 pNode = pNode->GetPrevSibling()) {
121 if (wsInstMgrName.GetLength() >= 1 && wsInstMgrName[0] ==
'_' &&
122 wsInstMgrName.Last(wsInstMgrName.GetLength() - 1) == wsName) {
123 pInstanceMgr = pNode;
128 *pValue = pInstanceMgr ? GetDocument()
130 ->GetOrCreateJSBindingFromMap(pInstanceMgr)
132 : fxv8::NewNullHelper(pIsolate).As<v8::Value>();
friend class EventParamScope
static CJS_Result Success()
static CJS_Result Failure(JSMessage id)
bool DynamicTypeIs(TypeTag eType) const override
CJX_Container(CXFA_Node *node)
void SetCDataImpl(XFA_Attribute eAttr, const WideString &wsValue, bool bNotify, bool bScriptModify)
void ThrowInvalidPropertyException(v8::Isolate *pIsolate) const
CXFA_Document * GetDocument() const
WideString GetCData(XFA_Attribute eAttr) const
CXFA_Node * GetXFANode() const
XFA_EventError ExecEventByDeepFirst(CXFA_Node *pFormNode, XFA_EVENTTYPE eEventType, bool bIsFormReady, bool bRecursive)
XFA_Element GetElementType() const
ByteString ToUTF8() const
fxcrt::WideString WideString