packages/weex-vue-framework/factory.js
function registerComponentHook (
  componentId,
  type, // hook type, could be "lifecycle" or "instance"
  hook, // hook name
  fn
) {
  if (!document || !document.taskCenter) {
    warn("Can't find available \"document\" or \"taskCenter\".");
    return
  }
  if (typeof document.taskCenter.registerHook === 'function') {
    return document.taskCenter.registerHook(componentId, type, hook, fn)
  }
  warn(("Failed to register component hook \"" + type + "@" + hook + "#" + componentId + "\"."));
}
function registerComponentHook (
  componentId,
  type, // hook type, could be "lifecycle" or "instance"
  hook, // hook name
  fn
) {
  if (!document || !document.taskCenter) {
    warn("Can't find available \"document\" or \"taskCenter\".");
    return
  }
  if (typeof document.taskCenter.registerHook === 'function') {
    return document.taskCenter.registerHook(componentId, type, hook, fn)
  }
  warn(("Failed to register component hook \"" + type + "@" + hook + "#" + componentId + "\"."));
}
function registerComponentHook ( componentId , type , // hook type, could be "lifecycle" or "instance" hook , // hook name fn ) { if ( ! document || ! document . taskCenter ) { warn ( "Can't find available \"document\" or \"taskCenter\"." ) ; return } if ( typeof document . taskCenter . registerHook === 'function' ) { return document . taskCenter . registerHook ( componentId , type , hook , fn ) } warn ( ( "Failed to register component hook \"" + type + "@" + hook + "#" + componentId + "\"." ) ) ; }
Register the component hook to weex native render engine. The hook will be triggered by native, not javascript.
Register the component hook to weex native render engine . The hook will be triggered by native not javascript .