Skip to content

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

Merged
mvorisek merged 3 commits intodevelopfrom
wrap_jquery_ready_only_topmost
Oct 26, 2022
Merged

No unneeded/nested jQuery.ready() wrap#1919
mvorisek merged 3 commits intodevelopfrom
wrap_jquery_ready_only_topmost

Conversation

@mvorisek
Copy link
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

1 participant