For the Vue.js framework, I sent a PR [1] to achieve it. I think Rax should
do the same thing.

In the PR, I removed legacy framework APIs and use "createInstanceContext"
instead of "createInstance" to create the Vue module instance for each page.

Native render engines should also call "createInstanceContext" instead of
"createInstance", and the source code is no longer needed. Another change
is, the bundle type of the code (Vue or Rax) should be parsed in native and
send it to js framework.

[1] https://github.com/vuejs/vue/pull/7272

2017-12-04 16:22 GMT+08:00 Hanks Zhang <[email protected]>:

> +1. Currently, multiple js bundles are executed in the same js context,
> and the isolation is implemented by js, which is not robust.
>
> In my opinion, the most reasonable solution is to distinguish the "Global
> Context" and the "Instance Context", move the logic of instance management
> and code execution from js to native.
>
> On this basis, I think there are some sub-problems that need to be solved:
>
> (1). How to expose APIs from Global Context to Instance Context?
> (2). How to isolate those exposed APIs?
> (3). Adjustments of Vue and Rax.
> (4). Impact on performance.
> (5). What about the platform APIs and the polyfills? Such as console,
> Object.assign, and timer.
> (6). Redesign the js service.
>
> Feel free to discuss any of these topics, or add one.
>
> Best regards, Hanks
>

Reply via email to