You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
746B

  1. var kKeyframeRule=window.CSSRule.WEBKIT_KEYFRAMES_RULE;var AnimationManager=Class.create({initialize:function(){var a=document.createElement("style");a.type="text/css";a.media="screen";document.getElementsByTagName("head")[0].appendChild(a);this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.createdAnimations=new Object()},createAnimation:function(a){this.styleSheet.insertRule(kKeyframesPropertyName+" "+a+" {}",0);return this.styleSheet.cssRules[0]},deleteAllAnimations:function(){while(this.styleSheet.cssRules.length>0){this.styleSheet.deleteRule(0)}this.createdAnimations=new Object()},markAnimationsCreated:function(a){this.createdAnimations[a]=true},animationsCreated:function(a){return this.createdAnimations[a]}});