| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index 4a510d06ddabc60eaa179e95919a59700529bedb..a3b28b2fb72301ac8ccf82a2e91dbff6c14d06f0 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -8896,7 +8896,7 @@ abstract class Element extends Node implements ElementTraversal {
|
| Element get ref {
|
| _ensureTemplate();
|
|
|
| - Element ref = null;
|
| + Element result = null;
|
| var refId = attributes['ref'];
|
| if (refId != null) {
|
| var treeScope = this;
|
| @@ -8910,11 +8910,17 @@ abstract class Element extends Node implements ElementTraversal {
|
| treeScope is ShadowRoot ||
|
| treeScope is svg.SvgSvgElement) {
|
|
|
| - ref = treeScope.getElementById(refId);
|
| + result = treeScope.getElementById(refId);
|
| }
|
| }
|
|
|
| - return ref != null ? ref : _templateInstanceRef;
|
| + if (result == null) {
|
| + result = _templateInstanceRef;
|
| + if (result == null) return this;
|
| + }
|
| +
|
| + var nextRef = result.ref;
|
| + return nextRef != null ? nextRef : result;
|
| }
|
|
|
| /**
|
|
|