lib/kg/kg-4.2.0/runtime/scope.js
function Scope(data, affix, parent) {
  if (data !== undefined) {
    this.data = data;
  } else {
    this.data = {};
  }
  if (parent) {
    this.parent = parent;
    this.root = parent.root;
  } else {
    this.parent = undefined;
    this.root = this;
  }
  this.affix = affix || {};
  this.ready = false;
}
function Scope(data, affix, parent) {
  if (data !== undefined) {
    this.data = data;
  } else {
    this.data = {};
  }
  if (parent) {
    this.parent = parent;
    this.root = parent.root;
  } else {
    this.parent = undefined;
    this.root = this;
  }
  this.affix = affix || {};
  this.ready = false;
}
function Scope ( data , affix , parent ) { if ( data !== undefined ) { this . data = data ; } else { this . data = { } ; } if ( parent ) { this . parent = parent ; this . root = parent . root ; } else { this . parent = undefined ; this . root = this ; } this . affix = affix || { } ; this . ready = false ; }
scope resolution for xtemplate like function in javascript but keep original data unmodified
@author yiminghe@gmail.com
scope resolution for xtemplate like function in javascript but keep original data unmodified