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

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

Issue 24096027: Dart2js support for custom element lifecycle events (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for IE support 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
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) {

Powered by Google App Engine
This is Rietveld 408576698