You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if it were possible to do some basic templating on the IDOM client web page. Without this, if you want to include custom styles or JS in the <head /> of the HTML markup you have to completely re-create the client.
The alternative I suppose would be to make it easier to create custom clients. I'm not entirely sure what that would look like though. Maybe just a cookie cutter repo? The downside there of course is that you can't automatically update the repo if you update the template.
I like the second approach quite a bit! The killer here is that React doesn't allow you to render and execute <script> tags by default - I tried for an hour yesterday to get a simple <script>alert("hi!")</script> example to run before remembering. If I could run js inline the same way I can define inline css this wouldn't be a problem.
Activity
rmorshea commentedon Jun 15, 2021
This came up again: #400
rmorshea commentedon Jun 16, 2021
@brentbaum The least brittle option I've been able to think of is to try and load a
/custom.jsscript inindex.html:This would allow you to serve a
custom.jsfile that could manipulate the page in any way you might want:Thoughts on this approach?
rmorshea commentedon Jun 16, 2021
I suppose some of these details could be abstracted away by making this a
server_configoption:brentbaum commentedon Jun 17, 2021
I like the second approach quite a bit! The killer here is that React doesn't allow you to render and execute <script> tags by default - I tried for an hour yesterday to get a simple
<script>alert("hi!")</script>example to run before remembering. If I could run js inline the same way I can define inline css this wouldn't be a problem.rmorshea commentedon Jul 16, 2021
@brentbaum what do you think about making something like this into a component that you'd just include in your layout?
Enable standard JS scripts to be linked