操作: 在 TrustedScriptURL CSP 强制下,使 domManip 运行脚本 [trusted-types]
作者: mgol创建于 2021年11月1日更新于 2026年5月4日
标签Manipulation
This is a followup to gh-4948. In gh-4949, we stopped stringifying attributes, which makes setting the src attribute on a script tag work under trusted types TrustedScriptURL enforcement via Content Security Policy. However, such scripts are still blocked. This is because in domManip, scripts are not inserted directly but instead first disabled and then their src attributes are read and inserted in fresh scripts.
内容来源: jquery/jquery