@@ -53,7 +53,8 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
53
53
var childInjectorCompleter; // Used if the ViewFuture is available before the childInjector.
54
54
55
55
var component = _component;
56
- var lightDom = new LightDom (element, scope);
56
+ final shadowRoot = new EmulatedShadowRoot (element);
57
+ final lightDom = new LightDom (element, scope);
57
58
58
59
// Append the component's template as children
59
60
var elementFuture;
@@ -64,12 +65,12 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
64
65
65
66
if (childInjector != null ) {
66
67
lightDom.shadowDomView = viewFactory.call (childInjector.scope, childInjector);
67
- return element ;
68
+ return shadowRoot ;
68
69
} else {
69
70
childInjectorCompleter = new async .Completer ();
70
71
return childInjectorCompleter.future.then ((childInjector) {
71
72
lightDom.shadowDomView = viewFactory.call (childInjector.scope, childInjector);
72
- return element ;
73
+ return shadowRoot ;
73
74
});
74
75
}
75
76
});
@@ -81,7 +82,7 @@ class BoundTranscludingComponentFactory implements BoundComponentFactory {
81
82
Scope shadowScope = scope.createChild (new HashMap ());
82
83
83
84
childInjector = new ComponentDirectiveInjector (injector, this ._injector,
84
- eventHandler, shadowScope, templateLoader, new EmulatedShadowRoot (element) , lightDom, view);
85
+ eventHandler, shadowScope, templateLoader, shadowRoot , lightDom, view);
85
86
86
87
childInjector.bindByKey (_ref.typeKey, _ref.factory , _ref.paramKeys, _ref.annotation.visibility);
87
88
0 commit comments