6768697071727374757677
Type<MouseDownHandler> type = MouseDownEvent.getType(); wideScope.addHandler(type, mouse1); narrowScope.addHandler(type, mouse2); wrapped.fireEvent(new MouseDownEvent() { }); assertFired(mouse1, mouse2); reset();
8081828384858687888990
* effect on handlers registered with the wider instance. */ narrowScope.removeHandlers(); wrapped.fireEvent(new MouseDownEvent() { }); assertFired(mouse1); assertNotFired(mouse2); }
96979899100101102103104105106
109110111112113114115116117118119
* the narrower scoped one that wraps it should also be severed. */ wideScope.removeHandlers(); wrapped.fireEvent(new MouseDownEvent() { }); assertNotFired(mouse1); assertNotFired(mouse2); }