config Entry

This commit is contained in:
pengfei.zhou
2019-07-22 13:41:38 +08:00
parent 410ee99414
commit bdb5a12735
7 changed files with 119 additions and 72 deletions

View File

@@ -166,7 +166,7 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
}
private String packageContextScript(String contextId, String content) {
return String.format(DoricConstant.TEMPLATE_CONTEXT_CREATE, content, contextId, contextId);
return String.format(DoricConstant.TEMPLATE_CONTEXT_CREATE, content, contextId, contextId, contextId);
}
private String packageModuleScript(String moduleName, String content) {

View File

@@ -18,11 +18,12 @@ public class DoricConstant {
public static final String INJECT_BRIDGE = "nativeBridge";
public static final String TEMPLATE_CONTEXT_CREATE = "Reflect.apply(" +
"function(doric,context,require,exports){" + "\n" +
"function(doric,context,Entry,require,exports){" + "\n" +
"%s" + "\n" +
"},doric.jsObtainContext(\"%s\"),[" +
"undefined," +
"doric.jsObtainContext(\"%s\")," +
"doric.jsObtainEntry(\"%s\")," +
"doric.__require__" +
",{}" +
"])";