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

Unified Diff: pkg/polymer/lib/src/instance.dart

Issue 26882005: clarify docs for onmutation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: put the verb first Created 7 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index 67f577b6a8ae966b4489886376cfa0a9d17d421e..2773c411e9a9824ada8c510baba5eff9270c173f 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -264,6 +264,14 @@ class PolymerElement extends CustomElement with ObservableMixin {
}
// TODO(jmesserly): use stream or future here?
+ /**
+ * Run the `listener` callback *once*
+ * when `node` changes, or when its children or subtree changes.
+ *
+ *
+ * See [MutationObserver] if you want to listen to a stream of
+ * changes.
+ */
void onMutation(Node node, void listener(MutationObserver obs)) {
new MutationObserver((records, MutationObserver observer) {
listener(observer);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698