MouseEvent( - String type, {
- Window? view,
- int detail = 0,
- int screenX = 0,
- int screenY = 0,
- int clientX = 0,
- int clientY = 0,
- int button = 0,
- bool canBubble = true,
- bool cancelable = true,
- bool ctrlKey = false,
- bool altKey = false,
- bool shiftKey = false,
- bool metaKey = false,
- EventTarget? relatedTarget,
})
Implementation
factory MouseEvent(
String type, {
Window? view,
int detail = 0,
int screenX = 0,
int screenY = 0,
int clientX = 0,
int clientY = 0,
int button = 0,
bool canBubble = true,
bool cancelable = true,
bool ctrlKey = false,
bool altKey = false,
bool shiftKey = false,
bool metaKey = false,
EventTarget? relatedTarget,
}) {
if (view == null) {
view = window;
}
MouseEvent event = document._createEvent('MouseEvent') as MouseEvent;
event._initMouseEvent(
type,
canBubble,
cancelable,
view,
detail,
screenX,
screenY,
clientX,
clientY,
ctrlKey,
altKey,
shiftKey,
metaKey,
button,
relatedTarget,
);
return event;
}