mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
feat(browserTrigger): allow support for custom timeStamps in events
This commit is contained in:
parent
3b3e89d5d6
commit
acc2fb8486
1 changed files with 7 additions and 2 deletions
|
|
@ -101,7 +101,7 @@
|
|||
}
|
||||
catch(e) {
|
||||
evnt = document.createEvent('TransitionEvent');
|
||||
evnt.initTransitionEvent(eventType, null, null, null, eventData.elapsedTime);
|
||||
evnt.initTransitionEvent(eventType, null, null, null, eventData.elapsedTime || 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
catch(e) {
|
||||
evnt = document.createEvent('AnimationEvent');
|
||||
evnt.initAnimationEvent(eventType, null, null, null, eventData.elapsedTime);
|
||||
evnt.initAnimationEvent(eventType, null, null, null, eventData.elapsedTime || 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -128,6 +128,11 @@
|
|||
pressed('shift'), pressed('meta'), 0, element);
|
||||
}
|
||||
|
||||
/* we're unable to change the timeStamp value directly so this
|
||||
* is only here to allow for testing where the timeStamp value is
|
||||
* read */
|
||||
evnt.$manualTimeStamp = eventData.timeStamp;
|
||||
|
||||
if(!evnt) return;
|
||||
|
||||
var originalPreventDefault = evnt.preventDefault,
|
||||
|
|
|
|||
Loading…
Reference in a new issue