Can aspnet-prerendering handle custom html bits for inlining on the server? #372

Closed
opened 2025-08-09 17:16:02 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @pheuter on 10/8/2017

Continuing from this tweet. I'm using a CSS-in-JS library called glamorous that allows for static rendering of CSS on the server that's designed to be inlined into a <style> tag in head.

From digging around a bit it doesn't seem like aspnet-prerendering supports passing any other information from js back to asp.net other than html and globalshtml appears to be inlined automatically into the element which invoked the asp-prerender-module tag and globals is automatically inserted into a <script> tag.

Is there a way I can pass a chunk of css from glamorous back to asp.net and have it inline in the head somewhere? Any guidance greatly appreciated.

*Originally created by @pheuter on 10/8/2017* Continuing from [this](https://twitter.com/stevensanderson/status/916916828399656960) tweet. I'm using a CSS-in-JS library called [glamorous](https://glamorous.rocks/advanced/#server-side-rendering) that allows for static rendering of CSS on the server that's designed to be inlined into a `<style>` tag in head. From digging around a bit it doesn't seem like `aspnet-prerendering` supports passing any other information from js back to asp.net other than `html` and `globals`—`html` appears to be inlined automatically into the element which invoked the `asp-prerender-module` tag and `globals` is automatically inserted into a `<script`> tag. Is there a way I can pass a chunk of css from glamorous back to asp.net and have it inline in the head somewhere? Any guidance greatly appreciated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#372
No description provided.