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

Unified Diff: pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js

Issue 24324005: Updating Shadow DOM and including some fixes to enable it to work with CustomElements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/shadow_dom/lib/shadow_dom.min.js ('k') | pkg/shadow_dom/tool/build/if-poly.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
diff --git a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
index 57c8c5941c10074b71e8bb260701df0c01e7ed4b..1b0014cf0e0fabe4b8a256552ea4d2142cece750 100644
--- a/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
+++ b/pkg/shadow_dom/lib/src/platform/patches-shadowdom-polyfill.js
@@ -30,8 +30,10 @@
// TODO(jmesserly): do we still need these?
if (obj instanceof NodeList) return 'NodeList';
if (obj instanceof ShadowRoot) return 'ShadowRoot';
- if (obj instanceof MutationRecord) return 'MutationRecord';
- if (obj instanceof MutationObserver) return 'MutationObserver';
+ if (window.MutationRecord && (obj instanceof MutationRecord))
+ return 'MutationRecord';
+ if (window.MutationObserver && (obj instanceof MutationObserver))
+ return 'MutationObserver';
var unwrapped = unwrapIfNeeded(obj);
if (obj !== unwrapped) {
« no previous file with comments | « pkg/shadow_dom/lib/shadow_dom.min.js ('k') | pkg/shadow_dom/tool/build/if-poly.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698