function linkList(opt) {
    var mainData = opt.mainData;
    var datas = opt.datas;

    if (!datas) {
        datas = {main: mainData};
        opt.datasAttr = {main: 'data'};
    }
    opt.datas = opt.mainData = null;

    linkAll(mainData, datas, opt);

    // Porxy data original methods.
    each$7(datas, function (data) {
        each$7(mainData.TRANSFERABLE_METHODS, function (methodName) {
            data.wrapMethod(methodName, curry(transferInjection, opt));
        });

    });

    // Beyond transfer, additional features should be added to `cloneShallow`.
    mainData.wrapMethod('cloneShallow', curry(cloneShallowInjection, opt));

    // Only mainData trigger change, because struct.update may trigger
    // another changable methods, which may bring about dead lock.
    each$7(mainData.CHANGABLE_METHODS, function (methodName) {
        mainData.wrapMethod(methodName, curry(changeInjection, opt));
    });

    // Make sure datas contains mainData.
    assert$1(datas[mainData.dataType] === mainData);
}
Travel this subtree (include this node).
Usage:
   node.eachNode(function () { ... }); // preorder
   node.eachNode('preorder', function () { ... }); // preorder
   node.eachNode('postorder', function () { ... }); // postorder
   node.eachNode(
       {order: 'postorder', attr: 'viewChildren'},
       function () { ... }
   ); // postorder

@param {(Object|string)} options If string, means order.
@param {string=} options.order 'preorder' or 'postorder'
@param {string=} options.attr 'children' or 'viewChildren'
@param {Function} cb If in preorder and return false,
                     its subtree will not be visited.
@param {Object} [context]