Index: pkg/mdv/lib/src/input_bindings.dart |
diff --git a/pkg/mdv/lib/src/input_bindings.dart b/pkg/mdv/lib/src/input_bindings.dart |
index 1e3965432f862d76c9a85ac2d14608c4f97ca0e2..cdd89b53c17978f7f83bb4cc8a86b2e6c87edfc2 100644 |
--- a/pkg/mdv/lib/src/input_bindings.dart |
+++ b/pkg/mdv/lib/src/input_bindings.dart |
@@ -151,7 +151,8 @@ class _SelectedIndexBinding extends _InputBinding { |
// loop to schedule on. (See the the "ensureScheduled" function: |
// https://github.com/Polymer/mdv/commit/9a51ad7ed74a292bf71662cea28acbd151ff65c8) |
// |
- // Instead we use runAsync. Each <template repeat> needs a delay of 2: |
+ // Instead we use scheduleMicrotask. Each <template repeat> needs a delay of |
+ // 2: |
// * once to happen after the child _TemplateIterator is created |
// * once to be after _TemplateIterator.inputs CompoundBinding resolve |
// And then we need to do this delay sequence twice: |
@@ -161,13 +162,13 @@ class _SelectedIndexBinding extends _InputBinding { |
var maxRetries = 4; |
delaySetSelectedIndex() { |
if (newValue > node.length && --maxRetries >= 0) { |
- runAsync(delaySetSelectedIndex); |
+ scheduleMicrotask(delaySetSelectedIndex); |
} else { |
node.selectedIndex = newValue; |
} |
} |
- runAsync(delaySetSelectedIndex); |
+ scheduleMicrotask(delaySetSelectedIndex); |
} |
void nodeValueChanged(e) { |