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

支持eval 和 Function 吗 #11976

Closed
wuweikd opened this issue Jun 22, 2022 · 3 comments
Closed

支持eval 和 Function 吗 #11976

wuweikd opened this issue Jun 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@wuweikd
Copy link

wuweikd commented Jun 22, 2022

这个特性解决了什么问题?

小程序 不支持 ,在考虑从框架角度解决,主要是因为第三方库protobufjs 使用了Function 函数

https://developers.weixin.qq.com/miniprogram/dev/framework/runtime/js-support.html

这个 API 长什么样?

打包的时候可以兼容吗

@taro-bot2 taro-bot2 bot added enhancement New feature or request labels Jun 22, 2022
@moyafaxi
Copy link
Contributor

这得实现一个 JS 解释器,那么理论上前端代码我可以从远端加载然后执行,小程序厂商代码审核机制就无效了。所以就算支持了,大概率也会被小程序厂商禁止

@Chen-jj
Copy link
Contributor

Chen-jj commented Jun 23, 2022

Taro 官方没有实现的计划,可以参考业界的方案:https://github.com/bplok20010/eval5

@spiritree
Copy link
Contributor

spiritree commented Jun 25, 2022

关于禁止小程序JavaScript解释器使用规范要求官方
https://developers.weixin.qq.com/community/minihome/doc/0000ae500e4fd0541f2ea33755b801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants