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: pkg/polymer/lib/src/js/use_native_dartium_shadowdom.js

Issue 182193002: [polymer] interop with polymer-element and polymer.js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.js.map ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/js/use_native_dartium_shadowdom.js
diff --git a/pkg/polymer/lib/src/js/use_native_dartium_shadowdom.js b/pkg/polymer/lib/src/js/use_native_dartium_shadowdom.js
new file mode 100644
index 0000000000000000000000000000000000000000..c2f51c1a60584267105f16d7f87e8b407273fb12
--- /dev/null
+++ b/pkg/polymer/lib/src/js/use_native_dartium_shadowdom.js
@@ -0,0 +1,10 @@
+// Prevent polyfilled JS Shadow DOM in Dartium
+// We need this if we want Dart code to be able to interoperate with Polymer.js
+// code that also uses Shadow DOM.
+// TODO(jmesserly): we can remove this code once platform.js is correctly
+// feature detecting Shadow DOM in Dartium.
+if (navigator.userAgent.indexOf('(Dart)') !== -1) {
+ window.Platform = window.Platform || {};
+ Platform.flags = Platform.flags || {};
+ Platform.flags.shadow = 'native';
+}
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.js.map ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698