webkit增加自定义事件接口onirkeypress,onsystemevent,使页面可以注册实现这两个接口,需要在webkit中做如下改动:
1.DomWindow.idl添加:
attribute EventListener onirkeypress;
attribute EventListener onsystemevent;2.HTMLAttributenames.in添加:
onirkeypress
onsystemevent
3.EventNames.h添加:
macro(irkeypress)
macro(systemevent)
4.Document.idl添加:
attribute [DontEnum] EventListener onirkeypress;attribute [DontEnum] EventListener onsystemevent;
5.Document.h添加:
DEFINE_ATTRIBUTE_EVENT_LISTENER(irkeypress);DEFINE_ATTRIBUTE_EVENT_LISTENER(systemevent);
6.DomWindow.h添加:
DEFINE_ATTRIBUTE_EVENT_LISTENER(irkeypress);
DEFINE_ATTRIBUTE_EVENT_LISTENER(systemevent);
7.自定义Event 实现(可参照UIEvent):
TestEvent.h
TestEvent.cpp
Test