| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Someone is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
External scripts recreated by the external-script plugin lose HTML attributes such as data-message, crossorigin, and referrerpolicy. Assigning newScript[attribute.name] creates unrelated JavaScript properties for names that do not match DOM properties, so widgets lose configuration and browser request settings.
Copy attributes with setAttribute(). The browser regression executes a local script and reads document.currentScript.dataset, crossOrigin, and referrerPolicy from the actual replacement element.
Example: <script src="/widget.js" data-message="hello" crossorigin="anonymous" referrerpolicy="no-referrer"></script> now retains all three settings when executed by the plugin.
Related issue, if any:
Reproduced on develop at d823dbe51c1b2dea4c2091e2b952ded0d1e16616; no matching open fix found.
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Validation
Browser coverage: Chromium via Playwright; Firefox, WebKit, and unrelated E2E suites were not run locally.
Developed with assistance from OpenAI Codex; regression and fix validated locally.