garfish icon indicating copy to clipboard operation
garfish copied to clipboard

fix: retain currentScript reference when processing async/defer script

Open hemisu opened this issue 6 months ago • 2 comments
trafficstars

Description

retain currentScript reference when processing async/defer scripts to prevent data-* attribute read failures

dev/app-react-18/public/index.html

<script
      src="./scripts/readCurrentScript.js"
      data-appkey="supply"
      async="true"
    ></script>

the currentScript property will not be read

Related Issue

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)

Checklist

  • [x] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [ ] I have updated the documentation.

hemisu avatar Apr 23 '25 07:04 hemisu

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
garfish ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 7:38am

vercel[bot] avatar Apr 23 '25 07:04 vercel[bot]

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 23 '25 07:04 CLAassistant