public int handleEvent(nsIDOMEvent _event) { _event.getType(storage); string type = Base.StringGet(storage); string key = String.Intern(target.GetHashCode() + ":" + type); EventHandler eh = Events[key] as EventHandler; if (eh != null) { eh(owner, new EventArgs()); return(0); } Mono.WebBrowser.DOM.NodeEventHandler eh1 = Events[key] as Mono.WebBrowser.DOM.NodeEventHandler; if (eh1 != null) { eh1(owner, new Mono.WebBrowser.DOM.NodeEventArgs((Mono.WebBrowser.DOM.INode)owner)); return(0); } Mono.WebBrowser.DOM.WindowEventHandler eh2 = Events[key] as Mono.WebBrowser.DOM.WindowEventHandler; if (eh2 != null) { eh2(owner, new Mono.WebBrowser.DOM.WindowEventArgs((Mono.WebBrowser.DOM.IWindow)owner)); return(0); } return(0); }
public void RemoveHandler(Mono.WebBrowser.DOM.NodeEventHandler handler, string _event) { string key = String.Intern(target.GetHashCode() + ":" + _event); Events.RemoveHandler(key, handler); Base.StringSet(storage, _event); target.removeEventListener(storage, this, true); }