Skip to content

Commit

Permalink
don't disable SVG animations in Firefox and Opera (closes #67)
Browse files Browse the repository at this point in the history
  • Loading branch information
attilaolah committed May 10, 2014
1 parent d7c8b23 commit 59a7241
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
11 changes: 8 additions & 3 deletions dist/wow.js

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

2 changes: 1 addition & 1 deletion dist/wow.min.js

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

8 changes: 6 additions & 2 deletions src/wow.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ class @WOW

animationName: (box) ->
try
@vendorCSS(box, 'animation-name')?.cssText
animationName = @vendorCSS(box, 'animation-name').cssText
catch # Opera, fall back to plain property value
window.getComputedStyle(box).getPropertyValue('animation-name') or 'none'
animationName = window.getComputedStyle(box).getPropertyValue('animation-name')
if animationName is 'none'
'' # SVG/Firefox, unable to get animation name?
else
animationName

cacheAnimationName: (box) ->
# https://bugzilla.mozilla.org/show_bug.cgi?id=921834
Expand Down

0 comments on commit 59a7241

Please sign in to comment.