|
|
@ -9,6 +9,12 @@ function create_main_fragment ( root, component ) {
|
|
|
|
each_block_iterations[i] = create_each_block( root, each_block_value, each_block_value[i], i, component );
|
|
|
|
each_block_iterations[i] = create_each_block( root, each_block_value, each_block_value[i], i, component );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var text = createText( "\n\n" );
|
|
|
|
|
|
|
|
var p = createElement( 'p' );
|
|
|
|
|
|
|
|
var text_1_value = root.foo;
|
|
|
|
|
|
|
|
var text_1 = createText( text_1_value );
|
|
|
|
|
|
|
|
appendNode( text_1, p );
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
mount: function ( target, anchor ) {
|
|
|
|
mount: function ( target, anchor ) {
|
|
|
|
insertNode( each_block_anchor, target, anchor );
|
|
|
|
insertNode( each_block_anchor, target, anchor );
|
|
|
@ -16,6 +22,9 @@ function create_main_fragment ( root, component ) {
|
|
|
|
for ( var i = 0; i < each_block_iterations.length; i += 1 ) {
|
|
|
|
for ( var i = 0; i < each_block_iterations.length; i += 1 ) {
|
|
|
|
each_block_iterations[i].mount( target, each_block_anchor );
|
|
|
|
each_block_iterations[i].mount( target, each_block_anchor );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insertNode( text, target, anchor );
|
|
|
|
|
|
|
|
insertNode( p, target, anchor );
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
update: function ( changed, root ) {
|
|
|
|
update: function ( changed, root ) {
|
|
|
@ -35,6 +44,10 @@ function create_main_fragment ( root, component ) {
|
|
|
|
|
|
|
|
|
|
|
|
each_block_iterations.length = each_block_value.length;
|
|
|
|
each_block_iterations.length = each_block_value.length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( text_1_value !== ( text_1_value = root.foo ) ) {
|
|
|
|
|
|
|
|
text_1.data = text_1_value;
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
destroy: function ( detach ) {
|
|
|
|
destroy: function ( detach ) {
|
|
|
@ -42,6 +55,8 @@ function create_main_fragment ( root, component ) {
|
|
|
|
|
|
|
|
|
|
|
|
if ( detach ) {
|
|
|
|
if ( detach ) {
|
|
|
|
detachNode( each_block_anchor );
|
|
|
|
detachNode( each_block_anchor );
|
|
|
|
|
|
|
|
detachNode( text );
|
|
|
|
|
|
|
|
detachNode( p );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|