#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/base/resource/resource_bundle.h"
+#include "native_mate/dictionary.h"
namespace atom {
v8::Local<v8::Object> ipc;
if (GetIPCObject(isolate, context, &ipc)) {
auto args_vector = ListValueToVector(isolate, args);
- // Insert a dummy Event object.
- args_vector.insert(args_vector.begin(), v8::Object::New(isolate));
+ // Insert the Event object, event.sender is ipc.
+ mate::Dictionary event = mate::Dictionary::CreateEmpty(isolate);
+ event.Set("sender", ipc);
+ args_vector.insert(args_vector.begin(), event.GetHandle());
mate::EmitEvent(isolate, ipc, channel, args_vector);
}
}