You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@return {@link HandlerRegistration} used to remove the handler
*/
HandlerRegistration addDomHandler(handler, DomEventType type) {
assert (handler != null); // : "handler must not be null";
assert (type != null); // : "type must not be null";
int typeInt = IEvent.getTypeInt(type.eventName);
if (typeInt == -1) {
sinkBitlessEvent(type.eventName);
} else {
sinkEvents(typeInt);
}
return ensureHandlers().addHandler(type, handler);
}
The text was updated successfully, but these errors were encountered:
Remove EventHandler and all extended classes.
Remove EventHandlerAdapter and all extended classes.
Invite typedef solution like that ClickEvent class:
part of dart_web_toolkit_event;
typedef void HandleClick(ClickEvent event);
/**
Represents a native click event.
*/
class ClickEvent extends MouseEvent {
/**
*/
static DomEventType TYPE = new DomEventType(BrowserEvents.CLICK, new ClickEvent());
DomEventType getAssociatedType() {
return TYPE;
}
ClickEvent();
void dispatch(HandleClick handler) {
handler(this);
}
}
Make changes like in FocusWidget
/**
*
*/
HandlerRegistration addClickHandler(HandleClick handler) {
return addDomHandler(handler, ClickEvent.TYPE);
}
HasClickHandler:
part of dart_web_toolkit_event;
/**
A widget that implements this interface provides registration for
{@link ClickHandler} instances.
*/
abstract class HasClickHandlers implements HasHandlers {
/**
*
*/
HandlerRegistration addClickHandler(HandleClick handler);
}
Widget:
/**
*
*/
HandlerRegistration addDomHandler(handler, DomEventType type) {
assert (handler != null); // : "handler must not be null";
assert (type != null); // : "type must not be null";
int typeInt = IEvent.getTypeInt(type.eventName);
if (typeInt == -1) {
sinkBitlessEvent(type.eventName);
} else {
sinkEvents(typeInt);
}
return ensureHandlers().addHandler(type, handler);
}
The text was updated successfully, but these errors were encountered: