Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(weex): adjust framework entry APIs and add flow annotations #7272

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

Hanks10100
Copy link
Contributor

What kind of change does this PR introduce?

  • Refactor

Does this PR introduce a breaking change?

  • No

Other information:

Remove legacy framework APIs

Remove the init, reset, getRoot and receiveTasks APIs, which are already implemented in the new version of weex-js-runtime.

Moreover, the deprecated timer APIs should also be removed when they were supported by native render engines (C++ timers).

No longer execute the js code at front-end

Use createInstanceContext instead of createInstance to create the Vue module instance for each page. The Vue framework only needs to prepare the instance context and no longer execute the js code. The js code will be executed by native render engines.

Flow type declarations

Add more reliable flow type declarations of Weex instance APIs and DOM APIs, and add type annotations for the entry file.

@Hanks10100
Copy link
Contributor Author

This feature is used to achieve multi-instance isolation of Weex. Weex is planning to execute each page's code in different js context. Source codes and js contexts will be managed by the customed js engine within Weex core.

See the discussions on Weex's mailing list: https://lists.apache.org/thread.html/87bf83253ed7ee318a8cf98d693bc534b3e08b4d28655a1290f2e0c7@%3Cdev.weex.apache.org%3E

1. Remove the "init", "reset", "getRoot" and "receiveTasks" APIs, which
are already implemented in the new version of "weex-js-runtime".
2. Use "createInstanceContext" instead of "createInstance". Vue only
needs to prepare the instance context and no longer execute the js
code. The js code will be executed by native.
3. Add flow type declarations and annotations.
@yyx990803 yyx990803 merged commit 472a289 into vuejs:dev Dec 19, 2017
lovelope pushed a commit to lovelope/vue that referenced this pull request Feb 1, 2018
…js#7272)

1. Remove the "init", "reset", "getRoot" and "receiveTasks" APIs, which
are already implemented in the new version of "weex-js-runtime".
2. Use "createInstanceContext" instead of "createInstance". Vue only
needs to prepare the instance context and no longer execute the js
code. The js code will be executed by native.
3. Add flow type declarations and annotations.
f2009 pushed a commit to f2009/vue that referenced this pull request Jan 25, 2019
…js#7272)

1. Remove the "init", "reset", "getRoot" and "receiveTasks" APIs, which
are already implemented in the new version of "weex-js-runtime".
2. Use "createInstanceContext" instead of "createInstance". Vue only
needs to prepare the instance context and no longer execute the js
code. The js code will be executed by native.
3. Add flow type declarations and annotations.
aJean pushed a commit to aJean/vue that referenced this pull request Aug 19, 2020
…js#7272)

1. Remove the "init", "reset", "getRoot" and "receiveTasks" APIs, which
are already implemented in the new version of "weex-js-runtime".
2. Use "createInstanceContext" instead of "createInstance". Vue only
needs to prepare the instance context and no longer execute the js
code. The js code will be executed by native.
3. Add flow type declarations and annotations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants