feat: add script engine, refine entry/initOnce constraints #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
描述 / Description
基于 Rhino JavaScript 引擎,首次引入脚本能力。用户可直接编写
.js文件作为自定义 Hook,无需编译、无需重启,实现热加载、低门槛的框架扩展。entry:从抽象方法改为非抽象,提供默认实现,子类可不被重写,减少模板代码initOnce:标记为final/ 强制调用,确保不可被跳过、不可被重写,保障初始化逻辑100%执行类型 / Type
修复或解决的问题 / Issues Fixed or Closed by This PR
entry导致的冗余代码问题initOnce被子类覆盖或遗漏调用导致的初始化不可靠问题清单 / Checklist
其他信息 / Additional Information