Skip to content

Update sandbox sample Handlebars bundle#1686

Open
KirtiRamchandani wants to merge 1 commit into
GoogleChrome:mainfrom
KirtiRamchandani:fix/sandbox-handlebars-update
Open

Update sandbox sample Handlebars bundle#1686
KirtiRamchandani wants to merge 1 commit into
GoogleChrome:mainfrom
KirtiRamchandani:fix/sandbox-handlebars-update

Conversation

@KirtiRamchandani

@KirtiRamchandani KirtiRamchandani commented May 25, 2026

Copy link
Copy Markdown

Fixes #1615

Summary

  • Replace the sandbox sample's vendored Handlebars 1.0.0 beta bundle with Handlebars 4.7.9.
  • Update the sample HTML to load the new bundle and refresh the vendored Handlebars license notice.
  • Ignore the vendored handlebars-*.js bundle in ESLint so repo lint checks the sample code rather than third-party distribution output.

Notes

The issue also discussed narrowing postMessage("*"), but the maintainer noted that wildcard targeting is needed for this extension-origin communication path. This PR leaves that messaging behavior unchanged and keeps the scope to the approved Handlebars update.

Tests

  • npm install --ignore-scripts
  • npm run lint
  • npx eslint api-samples/sandbox/sandbox/mainpage.js api-samples/sandbox/sandbox/service-worker.js
  • npx prettier --check api-samples/sandbox/sandbox/sandbox.html api-samples/sandbox/sandbox/manifest.json api-samples/sandbox/sandbox/sandbox.md eslint.config.js
  • Node smoke test loading api-samples/sandbox/sandbox/handlebars-4.7.9.js and rendering both templates from sandbox.html
  • Verified the vendored bundle came from handlebars@4.7.9 dist/handlebars.js, with only trailing whitespace removed for git diff --check
  • git diff --check

@KirtiRamchandani KirtiRamchandani force-pushed the fix/sandbox-handlebars-update branch from 1d91088 to a7fecc0 Compare June 4, 2026 17:33
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.

Modernizing the sandbox sample: Handlebars update and messaging hardening

1 participant