Java Code Examples for com.taobao.weex.common.WXJSBridgeMsgType#INIT_FRAMEWORK

The following examples show how to use com.taobao.weex.common.WXJSBridgeMsgType#INIT_FRAMEWORK . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WXBridgeManager.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize JavaScript framework
 * @param framework String representation of the framework to be init.
 */
public synchronized void initScriptsFramework(String framework) {
  Message msg = mJSHandler.obtainMessage();
  msg.obj = framework;
  msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK;
  msg.setTarget(mJSHandler);
  msg.sendToTarget();
}
 
Example 2
Source File: WXBridgeManagerTest.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@Test
public void testHandleMessage() throws Exception {
  int[] msgs = {
      WXJSBridgeMsgType.INIT_FRAMEWORK,
      WXJSBridgeMsgType.CALL_JS_BATCH,
      WXJSBridgeMsgType.SET_TIMEOUT,
      WXJSBridgeMsgType.MODULE_INTERVAL,
      WXJSBridgeMsgType.MODULE_TIMEOUT
  };
  Message msg = new Message();
  for(int w:msgs) {
    msg.what = w;
    getInstance().handleMessage(msg);
  }
}
 
Example 3
Source File: WXBridgeManager.java    From weex-uikit with MIT License 5 votes vote down vote up
/**
 * Initialize JavaScript framework
 * @param framework String representation of the framework to be init.
 */
public synchronized void initScriptsFramework(String framework) {
  Message msg = mJSHandler.obtainMessage();
  msg.obj = framework;
  msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK;
  msg.setTarget(mJSHandler);
  msg.sendToTarget();
}
 
Example 4
Source File: WXBridgeManagerTest.java    From weex-uikit with MIT License 5 votes vote down vote up
@Test
public void testHandleMessage() throws Exception {
  int[] msgs = {
      WXJSBridgeMsgType.INIT_FRAMEWORK,
      WXJSBridgeMsgType.CALL_JS_BATCH,
      WXJSBridgeMsgType.SET_TIMEOUT,
      WXJSBridgeMsgType.MODULE_INTERVAL,
      WXJSBridgeMsgType.MODULE_TIMEOUT
  };
  Message msg = new Message();
  for(int w:msgs) {
    msg.what = w;
    getInstance().handleMessage(msg);
  }
}
 
Example 5
Source File: WXBridgeManager.java    From weex with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize JavaScript framework
 * @param framework String representation of the framework to be init.
 */
public synchronized void initScriptsFramework(String framework) {
  Message msg = mJSHandler.obtainMessage();
  msg.obj = framework;
  msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK;
  msg.setTarget(mJSHandler);
  msg.sendToTarget();
}