blob: efc704da948f5628dc41ab40f222bcc21a5d1f98 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// Copyright 2014 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Lei Zhanga6d9f0e2015-06-13 00:48:38 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclairf766ad22016-03-14 13:51:24 -04007#include "fpdfsdk/javascript/event.h"
Tom Sepez37458412015-10-06 11:33:46 -07008
Dan Sinclairf766ad22016-03-14 13:51:24 -04009#include "fpdfsdk/javascript/Field.h"
Dan Sinclairf766ad22016-03-14 13:51:24 -040010#include "fpdfsdk/javascript/JS_Define.h"
11#include "fpdfsdk/javascript/JS_EventHandler.h"
12#include "fpdfsdk/javascript/JS_Object.h"
13#include "fpdfsdk/javascript/JS_Value.h"
Tom Sepezd6ae2af2017-02-16 11:49:55 -080014#include "fpdfsdk/javascript/cjs_event_context.h"
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070015
Tom Sepez04557b82017-02-16 09:43:10 -080016JSConstSpec CJS_Event::ConstSpecs[] = {{0, JSConstSpec::Number, 0, 0}};
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070017
Tom Sepez04557b82017-02-16 09:43:10 -080018JSPropertySpec CJS_Event::PropertySpecs[] = {
Tom Sepez4d5b8c52017-02-21 15:17:07 -080019 {"change", get_change_static, set_change_static},
20 {"changeEx", get_changeEx_static, set_changeEx_static},
21 {"commitKey", get_commitKey_static, set_commitKey_static},
22 {"fieldFull", get_fieldFull_static, set_fieldFull_static},
23 {"keyDown", get_keyDown_static, set_keyDown_static},
24 {"modifier", get_modifier_static, set_modifier_static},
25 {"name", get_name_static, set_name_static},
26 {"rc", get_rc_static, set_rc_static},
27 {"richChange", get_richChange_static, set_richChange_static},
28 {"richChangeEx", get_richChangeEx_static, set_richChangeEx_static},
29 {"richValue", get_richValue_static, set_richValue_static},
30 {"selEnd", get_selEnd_static, set_selEnd_static},
31 {"selStart", get_selStart_static, set_selStart_static},
32 {"shift", get_shift_static, set_shift_static},
33 {"source", get_source_static, set_source_static},
34 {"target", get_target_static, set_target_static},
35 {"targetName", get_targetName_static, set_targetName_static},
36 {"type", get_type_static, set_type_static},
37 {"value", get_value_static, set_value_static},
38 {"willCommit", get_willCommit_static, set_willCommit_static},
Tom Sepez04557b82017-02-16 09:43:10 -080039 {0, 0, 0}};
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070040
Tom Sepez04557b82017-02-16 09:43:10 -080041JSMethodSpec CJS_Event::MethodSpecs[] = {{0, 0}};
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070042
Nico Weber9d8ec5a2015-08-04 13:00:21 -070043IMPLEMENT_JS_CLASS(CJS_Event, event)
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070044
Nico Weber9d8ec5a2015-08-04 13:00:21 -070045event::event(CJS_Object* pJsObject) : CJS_EmbedObj(pJsObject) {}
46
Dan Sinclairf766ad22016-03-14 13:51:24 -040047event::~event() {}
Nico Weber9d8ec5a2015-08-04 13:00:21 -070048
Tom Sepezb1670b52017-02-16 17:01:00 -080049bool event::change(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -080050 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -040051 WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -080052 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -080053 pRuntime->GetCurrentEventContext()->GetEventHandler();
Ryan Harrison275e2602017-09-18 14:23:18 -040054 WideString& wChange = pEvent->Change();
Nico Weber9d8ec5a2015-08-04 13:00:21 -070055 if (vp.IsSetting()) {
tsepezf3dc8c62016-08-10 06:29:29 -070056 if (vp.GetJSValue()->GetType() == CJS_Value::VT_string)
Nico Weber9d8ec5a2015-08-04 13:00:21 -070057 vp >> wChange;
Tom Sepezd6ae2af2017-02-16 11:49:55 -080058 return true;
Nico Weber9d8ec5a2015-08-04 13:00:21 -070059 }
Tom Sepezd6ae2af2017-02-16 11:49:55 -080060 vp << wChange;
tsepez4cf55152016-11-02 14:37:54 -070061 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070062}
63
Tom Sepezb1670b52017-02-16 17:01:00 -080064bool event::changeEx(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -070065 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -040066 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -070067 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -070068 return false;
Nico Weber9d8ec5a2015-08-04 13:00:21 -070069
Tom Sepezd6ae2af2017-02-16 11:49:55 -080070 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -080071 pRuntime->GetCurrentEventContext()->GetEventHandler();
Nico Weber9d8ec5a2015-08-04 13:00:21 -070072
73 vp << pEvent->ChangeEx();
tsepez4cf55152016-11-02 14:37:54 -070074 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070075}
76
Tom Sepezb1670b52017-02-16 17:01:00 -080077bool event::commitKey(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -070078 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -040079 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -070080 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -070081 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070082
Tom Sepezd6ae2af2017-02-16 11:49:55 -080083 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -080084 pRuntime->GetCurrentEventContext()->GetEventHandler();
Nico Weber9d8ec5a2015-08-04 13:00:21 -070085
86 vp << pEvent->CommitKey();
tsepez4cf55152016-11-02 14:37:54 -070087 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070088}
89
Tom Sepezb1670b52017-02-16 17:01:00 -080090bool event::fieldFull(CJS_Runtime* pRuntime,
Nico Weber9d8ec5a2015-08-04 13:00:21 -070091 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -040092 WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -080093 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -080094 pRuntime->GetCurrentEventContext()->GetEventHandler();
Nico Weber9d8ec5a2015-08-04 13:00:21 -070095
tsepez4cf55152016-11-02 14:37:54 -070096 if (!vp.IsGetting() &&
97 wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
98 return false;
99
Tom Sepezb1670b52017-02-16 17:01:00 -0800100 vp << pEvent->FieldFull();
tsepez4cf55152016-11-02 14:37:54 -0700101 return true;
102}
103
Tom Sepezb1670b52017-02-16 17:01:00 -0800104bool event::keyDown(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700105 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400106 WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700107 if (!vp.IsGetting())
108 return false;
109
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800110 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800111 pRuntime->GetCurrentEventContext()->GetEventHandler();
tsepez4cf55152016-11-02 14:37:54 -0700112
Tom Sepezb1670b52017-02-16 17:01:00 -0800113 vp << pEvent->KeyDown();
tsepez4cf55152016-11-02 14:37:54 -0700114 return true;
115}
116
Tom Sepezb1670b52017-02-16 17:01:00 -0800117bool event::modifier(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700118 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400119 WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700120 if (!vp.IsGetting())
121 return false;
122
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800123 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800124 pRuntime->GetCurrentEventContext()->GetEventHandler();
tsepez4cf55152016-11-02 14:37:54 -0700125
Tom Sepezb1670b52017-02-16 17:01:00 -0800126 vp << pEvent->Modifier();
tsepez4cf55152016-11-02 14:37:54 -0700127 return true;
128}
129
Ryan Harrison275e2602017-09-18 14:23:18 -0400130bool event::name(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700131 if (!vp.IsGetting())
132 return false;
133
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800134 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800135 pRuntime->GetCurrentEventContext()->GetEventHandler();
tsepez4cf55152016-11-02 14:37:54 -0700136
137 vp << pEvent->Name();
138 return true;
139}
140
Ryan Harrison275e2602017-09-18 14:23:18 -0400141bool event::rc(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800142 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800143 pRuntime->GetCurrentEventContext()->GetEventHandler();
tsepez4cf55152016-11-02 14:37:54 -0700144
145 bool& bRc = pEvent->Rc();
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800146 if (vp.IsSetting())
tsepez4cf55152016-11-02 14:37:54 -0700147 vp >> bRc;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800148 else
tsepez4cf55152016-11-02 14:37:54 -0700149 vp << bRc;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800150
tsepez4cf55152016-11-02 14:37:54 -0700151 return true;
152}
153
Tom Sepezb1670b52017-02-16 17:01:00 -0800154bool event::richChange(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700155 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400156 WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700157 return true;
158}
159
Tom Sepezb1670b52017-02-16 17:01:00 -0800160bool event::richChangeEx(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700161 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400162 WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700163 return true;
164}
165
Tom Sepezb1670b52017-02-16 17:01:00 -0800166bool event::richValue(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700167 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400168 WideString& sError) {
tsepez4cf55152016-11-02 14:37:54 -0700169 return true;
170}
171
Tom Sepezb1670b52017-02-16 17:01:00 -0800172bool event::selEnd(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800173 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400174 WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800175 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800176 pRuntime->GetCurrentEventContext()->GetEventHandler();
tsepez4cf55152016-11-02 14:37:54 -0700177
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800178 if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
tsepez4cf55152016-11-02 14:37:54 -0700179 return true;
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700180
181 int& iSelEnd = pEvent->SelEnd();
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800182 if (vp.IsSetting())
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700183 vp >> iSelEnd;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800184 else
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700185 vp << iSelEnd;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800186
tsepez4cf55152016-11-02 14:37:54 -0700187 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700188}
189
Tom Sepezb1670b52017-02-16 17:01:00 -0800190bool event::selStart(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700191 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400192 WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800193 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800194 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700195
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800196 if (wcscmp((const wchar_t*)pEvent->Name(), L"Keystroke") != 0)
tsepez4cf55152016-11-02 14:37:54 -0700197 return true;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800198
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700199 int& iSelStart = pEvent->SelStart();
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800200 if (vp.IsSetting())
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700201 vp >> iSelStart;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800202 else
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700203 vp << iSelStart;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800204
tsepez4cf55152016-11-02 14:37:54 -0700205 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700206}
207
Tom Sepezb1670b52017-02-16 17:01:00 -0800208bool event::shift(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800209 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400210 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700211 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700212 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700213
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800214 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800215 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700216
Tom Sepezb1670b52017-02-16 17:01:00 -0800217 vp << pEvent->Shift();
tsepez4cf55152016-11-02 14:37:54 -0700218 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700219}
220
Tom Sepezb1670b52017-02-16 17:01:00 -0800221bool event::source(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800222 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400223 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700224 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700225 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700226
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800227 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800228 pRuntime->GetCurrentEventContext()->GetEventHandler();
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700229
230 vp << pEvent->Source()->GetJSObject();
tsepez4cf55152016-11-02 14:37:54 -0700231 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700232}
233
Tom Sepezb1670b52017-02-16 17:01:00 -0800234bool event::target(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800235 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400236 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700237 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700238 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700239
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800240 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800241 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700242
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700243 vp << pEvent->Target_Field()->GetJSObject();
tsepez4cf55152016-11-02 14:37:54 -0700244 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700245}
246
Tom Sepezb1670b52017-02-16 17:01:00 -0800247bool event::targetName(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700248 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400249 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700250 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700251 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700252
Tom Sepezb1670b52017-02-16 17:01:00 -0800253 CJS_EventHandler* pEvent =
254 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700255
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700256 vp << pEvent->TargetName();
tsepez4cf55152016-11-02 14:37:54 -0700257 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700258}
259
Ryan Harrison275e2602017-09-18 14:23:18 -0400260bool event::type(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700261 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700262 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700263
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800264 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800265 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700266
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700267 vp << pEvent->Type();
tsepez4cf55152016-11-02 14:37:54 -0700268 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700269}
270
Tom Sepezb1670b52017-02-16 17:01:00 -0800271bool event::value(CJS_Runtime* pRuntime,
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800272 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400273 WideString& sError) {
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800274 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800275 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700276
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700277 if (wcscmp((const wchar_t*)pEvent->Type(), L"Field") != 0)
tsepez4cf55152016-11-02 14:37:54 -0700278 return false;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800279
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700280 if (!pEvent->m_pValue)
tsepez4cf55152016-11-02 14:37:54 -0700281 return false;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800282
Ryan Harrison275e2602017-09-18 14:23:18 -0400283 WideString& val = pEvent->Value();
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800284 if (vp.IsSetting())
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700285 vp >> val;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800286 else
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700287 vp << val;
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800288
tsepez4cf55152016-11-02 14:37:54 -0700289 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700290}
291
Tom Sepezb1670b52017-02-16 17:01:00 -0800292bool event::willCommit(CJS_Runtime* pRuntime,
tsepez4cf55152016-11-02 14:37:54 -0700293 CJS_PropValue& vp,
Ryan Harrison275e2602017-09-18 14:23:18 -0400294 WideString& sError) {
Nico Weber9d8ec5a2015-08-04 13:00:21 -0700295 if (!vp.IsGetting())
tsepez4cf55152016-11-02 14:37:54 -0700296 return false;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700297
Tom Sepezd6ae2af2017-02-16 11:49:55 -0800298 CJS_EventHandler* pEvent =
Tom Sepezb1670b52017-02-16 17:01:00 -0800299 pRuntime->GetCurrentEventContext()->GetEventHandler();
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700300
Tom Sepezb1670b52017-02-16 17:01:00 -0800301 vp << pEvent->WillCommit();
tsepez4cf55152016-11-02 14:37:54 -0700302 return true;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700303}