lowcode-engine icon indicating copy to clipboard operation
lowcode-engine copied to clipboard

refactor: compatible with CSP, avoid using "document.write"

Open chvin opened this issue 3 years ago • 3 comments

说明

  • 解决问题 #1053

  • 原来的 createSimulator 逻辑是在 window load 事件触发后进行回调。在改写 document.write 能力后,window load 不会再触发。对此抽象 loadJsCss 方法,在所有资源文件加载完成后,再触发回调,若资源有 404 也会触发回调,与原来的逻辑保持一致。

  • 对于资源 type 信息,使用 data-level 描述在组件标签上,代替原来的 <meta level="*" /> image

chvin avatar Sep 16 '22 11:09 chvin

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 16 '22 11:09 CLAassistant

您好,感谢您的 PR,不过目前有测试用例没有通过,需要您再检查一下,或者修改对应的测试用例。

liujuping avatar Sep 20 '22 03:09 liujuping

已完善测试用例

chvin avatar Sep 20 '22 04:09 chvin

经与作者沟通,该 PR 需要再好好考虑一下,先关闭~

LeoYuan avatar Sep 26 '22 07:09 LeoYuan