summaryrefslogtreecommitdiff
path: root/fxjs/cjx_eventpseudomodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjx_eventpseudomodel.cpp')
-rw-r--r--fxjs/cjx_eventpseudomodel.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/fxjs/cjx_eventpseudomodel.cpp b/fxjs/cjx_eventpseudomodel.cpp
index edadb5dafe..f78890bc9f 100644
--- a/fxjs/cjx_eventpseudomodel.cpp
+++ b/fxjs/cjx_eventpseudomodel.cpp
@@ -42,8 +42,15 @@ void BooleanProperty(CFXJSE_Value* pValue, bool& bValue, bool bSetting) {
} // namespace
+const CJX_MethodSpec CJX_EventPseudoModel::MethodSpecs[] = {
+ {"emit", emit_static},
+ {"reset", reset_static},
+ {"", nullptr}};
+
CJX_EventPseudoModel::CJX_EventPseudoModel(CScript_EventPseudoModel* model)
- : CJX_Object(model) {}
+ : CJX_Object(model) {
+ DefineMethods(MethodSpecs);
+}
CJX_EventPseudoModel::~CJX_EventPseudoModel() {}
@@ -143,7 +150,7 @@ void CJX_EventPseudoModel::Target(CFXJSE_Value* pValue,
Property(pValue, XFA_Event::Target, bSetting);
}
-void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) {
+void CJX_EventPseudoModel::emit(CFXJSE_Arguments* pArguments) {
CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext();
if (!pScriptContext)
return;
@@ -163,7 +170,7 @@ void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) {
pWidgetHandler->ProcessEvent(pEventParam->m_pTarget, pEventParam);
}
-void CJX_EventPseudoModel::Reset(CFXJSE_Arguments* pArguments) {
+void CJX_EventPseudoModel::reset(CFXJSE_Arguments* pArguments) {
CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext();
if (!pScriptContext)
return;