Skip to content

fix: isolate demo bundle for bookmarklet/script injection#431

Open
voidborne-d wants to merge 1 commit intoalibaba:mainfrom
voidborne-d:fix/bookmarklet-bundle-isolation
Open

fix: isolate demo bundle for bookmarklet/script injection#431
voidborne-d wants to merge 1 commit intoalibaba:mainfrom
voidborne-d:fix/bookmarklet-bundle-isolation

Conversation

@voidborne-d
Copy link
Copy Markdown
Contributor

@voidborne-d voidborne-d commented Apr 10, 2026

Summary

  • wrap the generated page-agent.demo.js output in a final closure so injected bookmarklet usage does not leak helper identifiers like St into the page global scope
  • add a small build verification script so future demo bundle builds fail if the output stops being isolated

Testing

  • npm run build:demo --workspace=page-agent

Fixes #426

@CLAassistant
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] After version 1.6.0, directly using the injected script in some cases causes "St has already been declared" error

3 participants