OLD | NEW |
1 (function() { | 1 (function() { |
2 var target = webAnimationsTargetConfig.defaultTarget; | 2 var target = webAnimationsTargetConfig.defaultTarget; |
3 if (typeof webAnimationsSourceTarget != 'undefined') | 3 if (typeof webAnimationsSourceTarget != 'undefined') |
4 target = webAnimationsSourceTarget; | 4 target = webAnimationsSourceTarget; |
5 | 5 |
6 // Native implementation detection. | 6 // Native implementation detection. |
7 | 7 |
8 var scripts = document.getElementsByTagName('script'); | 8 var scripts = document.getElementsByTagName('script'); |
9 var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); | 9 var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); |
10 webAnimationsTargetConfig[target].src.forEach(function(sourceFile) { | 10 webAnimationsTargetConfig[target].src.forEach(function(sourceFile) { |
11 document.write('<script src="' + location + sourceFile + '"></script>'); | 11 document.write('<script src="' + location + sourceFile + '"></script>'); |
12 }); | 12 }); |
13 })(); | 13 })(); |
OLD | NEW |