feat(elementBinder): introduce element binder.
It is a plain-old-data class to seperate the protoInjector from the textNodes and elementBinding data.
This commit is contained in:
@ -8,7 +8,7 @@ export function run () {
|
||||
var appInjector = new Injector([]);
|
||||
|
||||
var bindings = [A, B, C];
|
||||
var proto = new ProtoElementInjector(null, bindings, [], false);
|
||||
var proto = new ProtoElementInjector(null, bindings);
|
||||
for (var i = 0; i < ITERATIONS; ++i) {
|
||||
var ei = proto.instantiate({view:null});
|
||||
ei.instantiateDirectives(appInjector);
|
||||
|
@ -16,7 +16,7 @@ export function run () {
|
||||
], false)];
|
||||
|
||||
|
||||
var proto = new ProtoElementInjector(null, bindings, [], false);
|
||||
var proto = new ProtoElementInjector(null, bindings);
|
||||
for (var i = 0; i < ITERATIONS; ++i) {
|
||||
var ei = proto.instantiate({view:null});
|
||||
ei.instantiateDirectives(appInjector);
|
||||
@ -39,4 +39,4 @@ class C {
|
||||
constructor(a:A, b:B) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export function run () {
|
||||
var appInjector = new Injector([]);
|
||||
|
||||
var bindings = [A, B, C];
|
||||
var proto = new ProtoElementInjector(null, bindings, [], false);
|
||||
var proto = new ProtoElementInjector(null, bindings);
|
||||
var ei = proto.instantiate({view:null});
|
||||
|
||||
for (var i = 0; i < ITERATIONS; ++i) {
|
||||
@ -33,4 +33,4 @@ class C {
|
||||
constructor(a:A, b:B) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user