Skip to content

Commit

Permalink
Fix addEventListener for older version Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmelnikov committed Sep 7, 2014
1 parent 2078b9f commit be9538c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pace.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,12 @@ class XHRRequestTracker
# response, all we can do is increment the progress with backoff such that we
# never hit 100% until it's done.
@progress = @progress + (100 - @progress) / 2
, false

for event in ['load', 'abort', 'timeout', 'error']
request.addEventListener event, =>
@progress = 100
, false

else
_onreadystatechange = request.onreadystatechange
Expand All @@ -467,6 +469,7 @@ class SocketRequestTracker
for event in ['error', 'open']
request.addEventListener event, =>
@progress = 100
, false

class ElementMonitor
constructor: (options={}) ->
Expand Down
6 changes: 3 additions & 3 deletions pace.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be9538c

Please sign in to comment.