Skip to content

Conversation

@camillobruni
Copy link
Contributor

Function.toString is not necessarily returning the full function body per spec.
We can inject the sources with the preload mechanism which is well defined and more flexible.

@netlify
Copy link

netlify bot commented Oct 27, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 7e4b765
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/69393ec88c0b780008d38681
😎 Deploy Preview https://deploy-preview-228--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

jsTokensSourceCode = "";

async init() {
this.jsTokensSourceCode = await JetStream.getString(JetStream.preload.SOURCE_CODE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we eval or dynamically import this rather than have two copies of the source?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewrote it to reuse js-tokens.js as SOURCE_CODE (requires us to modify the EXPECTED_TOKEN_COUNT whenever we touch it, but thats probably ok)

@camillobruni
Copy link
Contributor Author

Pending on #242 and additional refactorings to support loading a file and preload with the same URL (currently this is silently ignored)

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