dom/event/mouse: add more checks for existence of attributes
dom/event: fix deferred events