tags icon indicating copy to clipboard operation
tags copied to clipboard

Can we combine <script> tags from partials at the bottom of the rendered HTML (like in Rails does with yield tags

Open QasimQureshi opened this issue 8 years ago • 2 comments

For HTML rendering speed, it's advisable to have

But when we have Marko partials, can we combine script tags to be yielded/rendered outside the partial's own block?

QasimQureshi avatar Oct 09 '17 05:10 QasimQureshi

I may be misunderstanding your question however it sounds like your issue is actually related to the build tooling (lasso or web pack). In lasso if you have bundlingEnabled: true all bundled javascript will be placed in a single script tag which you can append to the body.

Please let me know if I've misunderstood.

DylanPiercey avatar Dec 21 '17 19:12 DylanPiercey

I think I understand what this issue is asking for now. We can't change the behavior of existing script tags, but we could add something like:

<append-script>
  console.log("hello");
</append-script>

Which would be added to the end of the body or flush. This would be a good edition to the tags repo and so I'll move the issue there.

DylanPiercey avatar Apr 15 '20 14:04 DylanPiercey