Skip to content

Commit f975fac

Browse files
Hanks10100yyx990803
authored andcommitted
feat(weex): wrap IFFE for appCode
1 parent a8146c0 commit f975fac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/platforms/weex/entry-framework.js

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export function createInstance (
9494
weex: weexInstanceVar
9595
}, timerAPIs, env.services)
9696

97+
appCode = `(function(global){ \n${appCode}\n })(Object.create(this))`
98+
9799
if (!callFunctionNative(instanceVars, appCode)) {
98100
// If failed to compile functionBody on native side,
99101
// fallback to 'callFunction()'.

0 commit comments

Comments
 (0)