Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use globalThis shim #779

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: use globalThis shim #779

wants to merge 1 commit into from

Conversation

kumavis
Copy link

@kumavis kumavis commented Mar 5, 2025

This supports environments like https://hardenedjs.org/ that support globalThis but do not support getting the global object via the Function constructor.

@mde
Copy link
Owner

mde commented Mar 7, 2025

Seems like it could be a minor security concern, that people could simply declare their own globalThis variable outside the EJS context. Might it not make more sense to inline the (relatively small) code for this polyfill directly into EJS?

@mde
Copy link
Owner

mde commented Mar 7, 2025

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.

2 participants