android&iOS:create context set this to undefined

This commit is contained in:
pengfei.zhou
2020-01-08 20:18:19 +08:00
committed by osborn
parent cdaebe46cd
commit 0087c5bda4
10 changed files with 67 additions and 5 deletions

View File

@@ -222,7 +222,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, contextId);
return String.format(DoricConstant.TEMPLATE_CONTEXT_CREATE, content, contextId, contextId);
}
private String packageModuleScript(String moduleName, String content) {

View File

@@ -38,7 +38,7 @@ public class DoricConstant {
public static final String TEMPLATE_CONTEXT_CREATE = "Reflect.apply(" +
"function(doric,context,Entry,require,exports){" + "\n" +
"%s" + "\n" +
"},doric.jsObtainContext(\"%s\"),[" +
"},undefined,[" +
"undefined," +
"doric.jsObtainContext(\"%s\")," +
"doric.jsObtainEntry(\"%s\")," +