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

Unified Diff: pkg/mutation_observer/lib/mutation_observer.js

Issue 21191006: [pkg:mutation_observer] fix 12132, ie9 support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | pkg/mutation_observer/lib/mutation_observer.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mutation_observer/lib/mutation_observer.js
diff --git a/pkg/mutation_observer/lib/mutation_observer.js b/pkg/mutation_observer/lib/mutation_observer.js
index 5409ed73066ae8164c7f721a6640a7b011aff1df..cae870950c866adc1f3d0af73812196e8e957d83 100644
--- a/pkg/mutation_observer/lib/mutation_observer.js
+++ b/pkg/mutation_observer/lib/mutation_observer.js
@@ -10,6 +10,7 @@
// https://github.com/Polymer/CustomElements/blob/master/src/sidetable.js
// I also renamed JsMutationObserver -> MutationObserver to correctly interact
// with dart2js interceptors.
+
if (!window.MutationObserver && !window.WebKitMutationObserver) {
(function(global) {
@@ -183,9 +184,6 @@ if (!window.MutationObserver && !window.WebKitMutationObserver) {
}
MutationObserver.prototype = {
- // TODO(jmesserly): why is this necessary?
- get constructor() { return MutationObserver; },
-
observe: function(target, options) {
target = wrapIfNeeded(target);
@@ -278,6 +276,13 @@ if (!window.MutationObserver && !window.WebKitMutationObserver) {
this.oldValue = null;
}
+ // TODO(jmesserly): this fixes the interceptor dispatch on IE.
+ // Not sure why this is necessary.
+ MutationObserver.prototype.constructor = MutationObserver;
+ MutationObserver.name = 'MutationObserver';
+ MutationRecord.prototype.constructor = MutationRecord;
+ MutationRecord.name = 'MutationRecord';
+
function copyMutationRecord(original) {
var record = new MutationRecord(original.type, original.target);
record.addedNodes = original.addedNodes.slice();
« no previous file with comments | « no previous file | pkg/mutation_observer/lib/mutation_observer.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698