Custom Javascript?

I’m trying to run javascript to change the background color of a div element based on the contents of that element. This works when I execute the code in the browser console, but how do I get this to execute automatically in the app’s code? I’ve tried custom code block workflow which doesn’t like my code (assuming the functions it allows are very restricted). I’ve also tried the tags script for the app, but I’m unsure if that is supposed to execute Javascript or not. I can’t get it to work either way.

Any help is appreciated. Thanks!

@dyelton

We have function editor to create your own custom javascript function which can be used in any Formula for binding data. Workflow - Code block, works in the backend which doesn’t have access to frontend UI element - div. You can however add Scripts in your Head or Body from Config > Select Styling (Script option isn’t enabled yet) > Script
Save this and publish your app. This script will be added in your Published Application.

Hope this Helps!