Permalink
Browse files

event, feat: support any type of custom field in EventInfo.

  • Loading branch information...
xicilion committed Dec 2, 2017
1 parent f2b6e1f commit 205cef37b7e5b5a24bcf91d0b1bedaaa8e8dca26
Showing with 4 additions and 4 deletions.
  1. +1 −1 fibjs/include/EventInfo.h
  2. +2 −2 fibjs/include/ifs/EventInfo.h
  3. +1 −1 idl/zh-cn/EventInfo.idl
@@ -50,7 +50,7 @@ class EventInfo : public EventInfo_base {
return 0;
}
virtual result_t _named_getter(exlib::string property, int32_t& retVal)
virtual result_t _named_getter(exlib::string property, v8::Local<v8::Value>& retVal)
{
std::map<exlib::string, VariantEx>::iterator it = m_datas.find(property);
@@ -25,7 +25,7 @@ class EventInfo_base : public object_base {
virtual result_t get_reason(exlib::string& retVal) = 0;
virtual result_t get_type(exlib::string& retVal) = 0;
virtual result_t get_target(v8::Local<v8::Object>& retVal) = 0;
virtual result_t _named_getter(exlib::string property, int32_t& retVal) = 0;
virtual result_t _named_getter(exlib::string property, v8::Local<v8::Value>& retVal) = 0;
virtual result_t _named_enumerator(v8::Local<v8::Array>& retVal) = 0;
public:
@@ -127,7 +127,7 @@ inline void EventInfo_base::s_get_target(v8::Local<v8::String> property, const v
inline void EventInfo_base::i_NamedGetter(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& args)
{
int32_t vr;
v8::Local<v8::Value> vr;
METHOD_NAME("EventInfo.undefined[]");
METHOD_INSTANCE(EventInfo_base);
View
@@ -14,5 +14,5 @@ interface EventInfo : object
readonly Object target;
/*! @brief 根据事件类型返回的详细信息 */
readonly Integer operator[String];
readonly Value operator[String];
};

0 comments on commit 205cef3

Please sign in to comment.