Skip to content

Commit 59a7241

Browse files
committed
don't disable SVG animations in Firefox and Opera (closes #67)
1 parent d7c8b23 commit 59a7241

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

dist/wow.js

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wow.coffee

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ class @WOW
120120

121121
animationName: (box) ->
122122
try
123-
@vendorCSS(box, 'animation-name')?.cssText
123+
animationName = @vendorCSS(box, 'animation-name').cssText
124124
catch # Opera, fall back to plain property value
125-
window.getComputedStyle(box).getPropertyValue('animation-name') or 'none'
125+
animationName = window.getComputedStyle(box).getPropertyValue('animation-name')
126+
if animationName is 'none'
127+
'' # SVG/Firefox, unable to get animation name?
128+
else
129+
animationName
126130

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

0 commit comments

Comments
 (0)