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: auto-detect expression/function in js server #5284

Merged
merged 1 commit into from Feb 3, 2021

Conversation

pavelfeldman
Copy link
Member

No description provided.

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

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

Looks good as long as Dmitry is cool with removing the source maps support.

src/server/injected/utilityScript.ts Show resolved Hide resolved
// This means we might have a function shorthand. Try another
// time prefixing 'function '.
if (expression.startsWith('async '))
expression = 'async function ' + expression.substring('async '.length);
Copy link
Member

Choose a reason for hiding this comment

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

I'd move this to the js client where we now if it's a function or not and just need to update the serialization logic to replace the prefix if needed. Could be done separately.

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to patch 10 call sites for that :/

src/server/webkit/protocol.ts Outdated Show resolved Hide resolved
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.

None yet

3 participants