Skip to content

Commit

Permalink
feat(weex): wrap IFFE for appCode
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanks10100 authored and yyx990803 committed Aug 29, 2017
1 parent a8146c0 commit f975fac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platforms/weex/entry-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export function createInstance (
weex: weexInstanceVar
}, timerAPIs, env.services)

appCode = `(function(global){ \n${appCode}\n })(Object.create(this))`

if (!callFunctionNative(instanceVars, appCode)) {
// If failed to compile functionBody on native side,
// fallback to 'callFunction()'.
Expand Down

0 comments on commit f975fac

Please sign in to comment.