Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: third_party/web-animations-js/sources/target-loader.js

Issue 917523002: Pull web-animations-js into third-party via the third_party/polymer/reproduce.sh script. Add necess… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove .travis-setup.sh and make a note in README.chromium. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/web-animations-js/sources/target-loader.js
diff --git a/third_party/web-animations-js/sources/target-loader.js b/third_party/web-animations-js/sources/target-loader.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4a9d30fd414913d2b342cdd669ae3336cbb0303
--- /dev/null
+++ b/third_party/web-animations-js/sources/target-loader.js
@@ -0,0 +1,13 @@
+(function() {
+ var target = webAnimationsTargetConfig.defaultTarget;
+ if (typeof webAnimationsSourceTarget != 'undefined')
+ target = webAnimationsSourceTarget;
+
+ // Native implementation detection.
+
+ var scripts = document.getElementsByTagName('script');
+ var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, '');
+ webAnimationsTargetConfig[target].src.forEach(function(sourceFile) {
+ document.write('<script src="' + location + sourceFile + '"></script>');
+ });
+})();
« no previous file with comments | « third_party/web-animations-js/sources/target-config.js ('k') | third_party/web-animations-js/sources/templates/boilerplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698