code: function createInstance (
    instanceId,
    appCode,
    config,
    data,
    env
  ) {
    if ( appCode === void 0 ) appCode = '';
    if ( config === void 0 ) config = {};
    if ( env === void 0 ) env = {};
  
    // Virtual-DOM object.
    var document = new renderer.Document(instanceId, config.bundleUrl);
  
    // All function/callback of parameters before sent to native
    // will be converted as an id. So `callbacks` is used to store
    // these real functions. When a callback invoked and won't be
    // called again, it should be removed from here automatically.
    var callbacks = [];
  
    // The latest callback id, incremental.
    var callbackId = 1;
  
    var instance = instances[instanceId] = {
      instanceId: instanceId, config: config, data: data,
      document: document, callbacks: callbacks, callbackId: callbackId
    };
  
    // Prepare native module getter and HTML5 Timer APIs.
    var moduleGetter = genModuleGetter(instanceId);
    var timerAPIs = getInstanceTimer(instanceId, moduleGetter);
  
    // Prepare `weex` instance variable.
    var weexInstanceVar = {
      config: config,
      document: document,
      requireModule: moduleGetter
    };
    Object.freeze(weexInstanceVar);
  
    // Each instance has a independent `Vue` module instance
    var Vue = instance.Vue = createVueModuleInstance(instanceId, moduleGetter);
  
    // The function which create a closure the JS Bundle will run in.
    // It will declare some instance variables like `Vue`, HTML5 Timer APIs etc.
    var instanceVars = Object.assign({
      Vue: Vue,
      weex: weexInstanceVar,
      // deprecated
      __weex_require_module__: weexInstanceVar.requireModule // eslint-disable-line
    }, timerAPIs);
    callFunction(instanceVars, appCode);
  
    // Send `createFinish` signal to native.
    renderer.sendTasks(instanceId + '', [{ module: 'dom', method: 'createFinish', args: [] }], -1);
  }
docs: Create an instance with id, code, config and external data.
  @param {string} instanceId
  @param {string} appCode
  @param {object} config
  @param {object} data
  @param {object} env { info, config, services }