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

No unneeded/nested jQuery.ready() wrap #1919

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

mvorisek
Copy link
Member

only script rendered in the initial html needs to be wrapped

no nested scripts should be wrapped no AJAX atkjs response

@mvorisek mvorisek changed the title No unneeded jQuery.ready() wrap No unneeded/nested jQuery.ready() wrap Oct 26, 2022
@mvorisek mvorisek marked this pull request as ready for review October 26, 2022 23:26
$ready = new JsFunction($actions);

return (new Jquery($ready))->jsRender();
return (new JsExpression('[]()', [new JsFunction($actions)]))->jsRender();
Copy link
Member Author

Choose a reason for hiding this comment

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

this wraps by an extra closure which is not needed

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

1 participant