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

Unified Diff: pkg/shadow_dom/lib/shadow_dom.debug.js

Issue 22403005: [pkg:shadow_dom] workaround issue in ownerDocument (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/shadow_dom/lib/shadow_dom.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shadow_dom/lib/shadow_dom.debug.js
diff --git a/pkg/shadow_dom/lib/shadow_dom.debug.js b/pkg/shadow_dom/lib/shadow_dom.debug.js
index bd4252dead488cf946bbb3c4aafd425cdc058061..4ea1ab833ae68c1e8f4ffeedf8e3325f28487126 100644
--- a/pkg/shadow_dom/lib/shadow_dom.debug.js
+++ b/pkg/shadow_dom/lib/shadow_dom.debug.js
@@ -1437,10 +1437,19 @@ var ShadowDOMPolyfill = {};
// This only wraps, it therefore only operates on the composed DOM and not
// the logical DOM.
return originalCompareDocumentPosition.call(this.impl, unwrap(otherNode));
+ },
+
+ // TODO(jmesserly): this is a workaround for
+ // https://github.com/Polymer/ShadowDOM/issues/200
+ get ownerDocument() {
+ scope.renderAllPending();
+ return wrap(this.impl.ownerDocument);
}
});
- defineWrapGetter(Node, 'ownerDocument');
+ // TODO(jmesserly): this is commented out to workaround:
+ // https://github.com/Polymer/ShadowDOM/issues/200
+ //defineWrapGetter(Node, 'ownerDocument');
// We use a DocumentFragment as a base and then delete the properties of
// DocumentFragment.prototype from the wrapper Node. Since delete makes
« no previous file with comments | « no previous file | pkg/shadow_dom/lib/shadow_dom.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698