@@ -143,8 +143,6 @@ if (typeof require === "function" && typeof module === "object") {
143
143
* @returns {FakeTimers }
144
144
*/
145
145
function withGlobal ( _global ) {
146
- const userAgent = _global . navigator && _global . navigator . userAgent ;
147
- const isRunningInIE = userAgent && userAgent . indexOf ( "MSIE " ) > - 1 ;
148
146
const maxTimeout = Math . pow ( 2 , 31 ) - 1 ; //see https://heycam.github.io/webidl/#abstract-opdef-converttoint
149
147
const idCounterStart = 1e12 ; // arbitrarily large number to avoid collisions with native timer IDs
150
148
const NOOP = function ( ) {
@@ -188,26 +186,6 @@ function withGlobal(_global) {
188
186
_global . setImmediate && typeof _global . setImmediate === "function" ;
189
187
const intlPresent = _global . Intl && typeof _global . Intl === "object" ;
190
188
191
- // Make properties writable in IE, as per
192
- // https://www.adequatelygood.com/Replacing-setTimeout-Globally.html
193
- /* eslint-disable no-self-assign */
194
- if ( isRunningInIE ) {
195
- _global . setTimeout = _global . setTimeout ;
196
- _global . clearTimeout = _global . clearTimeout ;
197
- _global . setInterval = _global . setInterval ;
198
- _global . clearInterval = _global . clearInterval ;
199
- _global . Date = _global . Date ;
200
- }
201
-
202
- // setImmediate is not a standard function
203
- // avoid adding the prop to the window object if not present
204
- if ( setImmediatePresent ) {
205
- _global . setImmediate = _global . setImmediate ;
206
- _global . clearImmediate = _global . clearImmediate ;
207
- }
208
-
209
- /* eslint-enable no-self-assign */
210
-
211
189
_global . clearTimeout ( timeoutResult ) ;
212
190
213
191
const NativeDate = _global . Date ;
0 commit comments