Does not work in Firefox
Hi guys,
The description and example site state that this works in Firefox though it seems that this is not the case. Perhaps an update to Firefox?
Tested and working in latest versions of Chrome, Safari and Opera. Not working in latest versions of Internet Explorer (no surprises there) and Firefox.
@apbarratt -
Thanks :) I honestly haven't played around with this for years though I guess it should work regardless. Maybe I'll poke around and see if I can update it with the holidays coming up.
Jeah. It does not work in FF because of:
TypeError: keyframes.insertRule is not a function
Snowflakes.prototype.updateKeyframeHeight = function() {
if (keyframes = this.findKeyframeAnimation("falling")) {
var height = this.pageContainer.offsetHeight;
if ((window.innerHeight) > height) {
height = window.innerHeight;
}
if (keyframes.cssText.match(new RegExp('webkit'))) {
var newRule = "100% { -webkit-transform: translate3d(0,"+height+"px,0) rotate(360deg); }";
} else if (keyframes.cssText.match(new RegExp('moz'))) {
var newRule = "-moz-transform: translate(0,"+height+"px) rotate(360deg);";
}
keyframes.insertRule(newRule);
}
}
I fond another project where this once was an issue: https://github.com/jlongster/css-animations.js/commit/bedeff09f1e716f8fab5879d385397b0e511ad77
Jo, so I had a few Minutes and added Firefox compatibility in #9